Brijesh619 commented on code in PR #728:
URL: https://github.com/apache/atlas/pull/728#discussion_r3842375213
##########
dashboard/src/views/DashboardOverview/LatestEntitiesList.tsx:
##########
@@ -136,6 +138,9 @@ const formatRelativeTime = (raw: unknown): string => {
return formatCreatedRelativeFromMs(ms);
};
+const nameWrapperSx = { display: "block", flex: "0 1 auto", width: "auto" };
Review Comment:
Resolved. Updated `typeWrapperSx` to use `flex: "0 1 auto"` and `minWidth:
0` so that long type names will shrink properly instead of overflowing.
(ATLAS-5373)
##########
dashboard/src/views/DashboardOverview/LatestEntitiesList.scss:
##########
@@ -0,0 +1,92 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+.latest-entities-paper {
+ padding: 16px;
+ border-radius: 8px;
+ min-height: 340px;
+ min-width: 0;
+ width: 100%;
+ flex: 1;
+ box-sizing: border-box;
+ transition: box-shadow 0.3s ease;
+
+ &:hover {
+ box-shadow: 0px 2px 4px -1px rgba(0,0,0,0.2), 0px 4px 5px 0px
rgba(0,0,0,0.14), 0px 1px 10px 0px rgba(0,0,0,0.12);
+ }
+}
+
+.latest-entities-header {
+ padding-bottom: 16px;
+ border-bottom: 1px solid rgba(0, 0, 0, 0.12);
+}
+
+.latest-entities-title {
+ font-size: 1rem;
+ font-weight: 600;
+ color: rgba(0, 0, 0, 0.87);
+}
+
+.latest-entities-view-all {
+ font-size: 0.875rem;
+ cursor: pointer;
+ text-decoration: none;
+}
+
+.latest-entities-empty {
+ padding-top: 16px;
+}
+
+.latest-entities-list {
+ padding-top: 16px;
+}
+
+.latest-entities-list-item {
+ padding-top: 8px;
+ padding-bottom: 8px;
+ border-bottom: 1px solid rgba(0, 0, 0, 0.12);
+
+ &:last-child {
+ border-bottom: none;
+ }
+}
+
+.latest-entities-entity-name {
+ font-size: 0.875rem;
+}
+
+.latest-entities-entity-name-link {
+ cursor: pointer;
+}
+
+.latest-entities-entity-name-fallback {
+ font-weight: 500;
+ color: rgba(0, 0, 0, 0.87);
+}
+
+.latest-entities-type-name {
Review Comment:
Resolved. Added truncation to `.latest-entities-type-name` (`overflow:
hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0`) as
suggested.
##########
dashboard/src/views/DashboardOverview/LatestEntitiesList.tsx:
##########
@@ -104,30 +106,30 @@ const formatCreatedRelativeFromMs = (ms: number): string
=> {
const deltaMs = now - ms;
if (!Number.isFinite(deltaMs)) return INVALID_TS_LABEL;
if (deltaMs < 0) {
- return `Created ${moment(ms).fromNow()}`;
+ return moment(ms).fromNow();
Review Comment:
Resolved. Restored the "Created " prefix to all relative time formats in the
UI as requested to avoid undocumented UX changes. Also updated the
corresponding test cases in `LatestEntitiesList.test.tsx`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]