From b4118c7863f61e3f33529cc50f931bf04ce9a72d Mon Sep 17 00:00:00 2001 From: Sachin Chaurasiya Date: Mon, 7 Mar 2022 21:56:40 +0530 Subject: [PATCH] Minor UI Changes (#3222) --- .../ui/src/assets/svg/request-icon.svg | 8 ++--- .../ActivityFeedList/ActivityFeedList.tsx | 34 +++++++++--------- .../ActivityThreadPanel.tsx | 26 +++++++------- .../EntityTable/EntityTable.component.tsx | 35 ++++++++++++------- .../PipelineDetails.component.tsx | 16 ++++++--- .../TableProfiler/TableProfiler.component.tsx | 2 +- .../common/description/Description.tsx | 20 +++++++---- .../main/resources/ui/src/utils/FeedUtils.ts | 16 +++++---- .../resources/ui/src/utils/TableUtils.tsx | 18 ++++++---- 9 files changed, 106 insertions(+), 69 deletions(-) diff --git a/openmetadata-ui/src/main/resources/ui/src/assets/svg/request-icon.svg b/openmetadata-ui/src/main/resources/ui/src/assets/svg/request-icon.svg index a216d951fcf..1c77a565518 100644 --- a/openmetadata-ui/src/main/resources/ui/src/assets/svg/request-icon.svg +++ b/openmetadata-ui/src/main/resources/ui/src/assets/svg/request-icon.svg @@ -1,6 +1,6 @@ - - - - + + + + diff --git a/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedList/ActivityFeedList.tsx b/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedList/ActivityFeedList.tsx index 42aadae1b6f..6b4ba1aec23 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedList/ActivityFeedList.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedList/ActivityFeedList.tsx @@ -107,23 +107,25 @@ const FeedListBody: FC = ({ /> {postLength > 0 ? ( -
-
- { - onThreadIdSelect(''); - onThreadSelect(id); - onViewMore(); - }} - /> + {postLength > 1 ? ( +
+
+ { + onThreadIdSelect(''); + onThreadSelect(id); + onViewMore(); + }} + /> +
-
+ ) : null} = ({ /> {postLength > 0 ? ( -
-
- onThreadSelect(thread.id)} - /> + {postLength > 1 ? ( +
+
+ onThreadSelect(thread.id)} + /> +
-
+ ) : null}
) : ( -
-
- -
-

{`${passingTests.length} tests`}

-
+ + {passingTests.length ? ( +
+
+ +
+

{`${passingTests.length} tests`}

+
+ ) : ( +

{`${columnTestLength} tests`}

+ )} +
)}
) : ( @@ -591,18 +597,23 @@ const EntityTable = ({ ) ) && !cell.value ? ( ) : null} {getFieldThreadElement( diff --git a/openmetadata-ui/src/main/resources/ui/src/components/PipelineDetails/PipelineDetails.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/PipelineDetails/PipelineDetails.component.tsx index 3e47c2b4822..28c3ed09c66 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/PipelineDetails/PipelineDetails.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/PipelineDetails/PipelineDetails.component.tsx @@ -43,6 +43,7 @@ import ActivityThreadPanel from '../ActivityFeed/ActivityThreadPanel/ActivityThr import Description from '../common/description/Description'; import EntityPageInfo from '../common/entityPageInfo/EntityPageInfo'; import NonAdminAction from '../common/non-admin-action/NonAdminAction'; +import PopOver from '../common/popover/PopOver'; import RichTextEditorPreviewer from '../common/rich-text-editor/RichTextEditorPreviewer'; import TabsPane from '../common/TabsPane/TabsPane'; import PageContainer from '../containers/PageContainer'; @@ -472,11 +473,16 @@ const PipelineDetails = ({ `tasks/${task.name}/description` ) }> - + + + ) : null} {getFieldThreadElement( diff --git a/openmetadata-ui/src/main/resources/ui/src/components/TableProfiler/TableProfiler.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/TableProfiler/TableProfiler.component.tsx index 08fa6981efc..eef13628400 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/TableProfiler/TableProfiler.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/TableProfiler/TableProfiler.component.tsx @@ -54,7 +54,7 @@ const PercentageGraph = ({ position="top" title={`${percentage}% ${title}`} trigger="mouseenter"> -
+
onEntityFieldSelect?.('description')}> - + + + ) : null} {!isUndefined(descriptionThread) ? (

onThreadLinkSelect?.(descriptionThread.entityLink) }> diff --git a/openmetadata-ui/src/main/resources/ui/src/utils/FeedUtils.ts b/openmetadata-ui/src/main/resources/ui/src/utils/FeedUtils.ts index 0e870c0204d..45ab0bb791a 100644 --- a/openmetadata-ui/src/main/resources/ui/src/utils/FeedUtils.ts +++ b/openmetadata-ui/src/main/resources/ui/src/utils/FeedUtils.ts @@ -143,7 +143,7 @@ export async function suggestions(searchTerm: string, mentionChar: string) { return { id: hit._id, - value: `@${hit._source.display_name}`, + value: `@${hit._source.name ?? hit._source.display_name}`, link: `${document.location.protocol}//${document.location.host}/${ entityUrlMap[entityType as keyof typeof entityUrlMap] }/${hit._source.name}`, @@ -158,7 +158,7 @@ export async function suggestions(searchTerm: string, mentionChar: string) { return { id: hit._id, - value: `@${hit._source.display_name}`, + value: `@${hit._source.name ?? hit._source.display_name}`, link: `${document.location.protocol}//${document.location.host}/${ entityUrlMap[entityType as keyof typeof entityUrlMap] }/${hit._source.name}`, @@ -174,10 +174,12 @@ export async function suggestions(searchTerm: string, mentionChar: string) { const hits = data.data.hits.hits; // eslint-disable-next-line @typescript-eslint/no-explicit-any hashValues = hits.map((hit: any) => { + const entityType = hit._source.entity_type; + return { id: hit._id, - value: `#${hit._source.name}`, - link: `${document.location.protocol}//${document.location.host}/${hit._source.entity_type}/${hit._source.fqdn}`, + value: `#${entityType}/${hit._source.name}`, + link: `${document.location.protocol}//${document.location.host}/${entityType}/${hit._source.fqdn}`, }; }); } else { @@ -185,10 +187,12 @@ export async function suggestions(searchTerm: string, mentionChar: string) { const hits = data.data.suggest['table-suggest'][0]['options']; // eslint-disable-next-line @typescript-eslint/no-explicit-any hashValues = hits.map((hit: any) => { + const entityType = hit._source.entity_type; + return { id: hit._id, - value: `#${hit._source.name}`, - link: `${document.location.protocol}//${document.location.host}/${hit._source.entity_type}/${hit._source.fqdn}`, + value: `#${entityType}/${hit._source.name}`, + link: `${document.location.protocol}//${document.location.host}/${entityType}/${hit._source.fqdn}`, }; }); } diff --git a/openmetadata-ui/src/main/resources/ui/src/utils/TableUtils.tsx b/openmetadata-ui/src/main/resources/ui/src/utils/TableUtils.tsx index dd886d537ec..7cf64c1aee4 100644 --- a/openmetadata-ui/src/main/resources/ui/src/utils/TableUtils.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/utils/TableUtils.tsx @@ -315,12 +315,18 @@ export const getTableTestsValue = (tableTestCase: TableTest[]) => {

{`${failingTests.length}/${tableTestLength} tests failing`}

) : ( -
-
- -
-

{`${passingTests.length} tests`}

-
+ + {passingTests.length ? ( +
+
+ +
+

{`${passingTests.length} tests`}

+
+ ) : ( +

{`${tableTestLength} tests`}

+ )} +
)} ) : null}