From 29b44f201b24c50d399eb0ef2035a5e574f46dc6 Mon Sep 17 00:00:00 2001 From: Saketh Varma Date: Thu, 6 Mar 2025 12:49:19 -0300 Subject: [PATCH 1/2] Showing platfrom intances only once --- datahub-web-react/src/app/previewV2/BrowsePaths.tsx | 6 +++++- datahub-web-react/src/app/previewV2/ContextPath.tsx | 12 +----------- .../src/app/previewV2/ContextPathEntityLink.tsx | 2 +- 3 files changed, 7 insertions(+), 13 deletions(-) diff --git a/datahub-web-react/src/app/previewV2/BrowsePaths.tsx b/datahub-web-react/src/app/previewV2/BrowsePaths.tsx index 32ce1cb7806643..e35c6eae6a098b 100644 --- a/datahub-web-react/src/app/previewV2/BrowsePaths.tsx +++ b/datahub-web-react/src/app/previewV2/BrowsePaths.tsx @@ -71,12 +71,16 @@ const BrowsePathSection = ({ path, linksDisabled }: { path: BrowsePathEntry } & if (!path.entity) { return {path.name}; } + + // Till we have a DataPlatform instance page + const hasDataPlatformInstance = path.name?.includes('dataPlatformInstance'); + return ( ); }; diff --git a/datahub-web-react/src/app/previewV2/ContextPath.tsx b/datahub-web-react/src/app/previewV2/ContextPath.tsx index b957ee50b3a746..d5e93de24dc514 100644 --- a/datahub-web-react/src/app/previewV2/ContextPath.tsx +++ b/datahub-web-react/src/app/previewV2/ContextPath.tsx @@ -82,7 +82,6 @@ const PlatFormTitle = styled.span` interface Props { // eslint-disable-next-line react/no-unused-prop-types entityLogoComponent?: JSX.Element; - instanceId?: string; // eslint-disable-next-line react/no-unused-prop-types typeIcon?: JSX.Element; type?: string; @@ -103,7 +102,6 @@ function ContextPath(props: Props) { entityType, parentEntities, browsePaths, - instanceId, entityTitleWidth = 200, previewType, isCompactView, @@ -118,12 +116,10 @@ function ContextPath(props: Props) { const divider = |; - const hasPlatformInstance = !!instanceId; const hasBrowsePath = !!browsePaths?.path?.length && !isDefaultBrowsePath(browsePaths); const hasParentEntities = !!parentEntities?.length; - const showInstanceIdDivider = hasBrowsePath || hasParentEntities; - const showEntityTypeDivider = hasPlatformInstance || hasBrowsePath || hasParentEntities; + const showEntityTypeDivider = hasBrowsePath || hasParentEntities; return ( @@ -136,12 +132,6 @@ function ContextPath(props: Props) { {capitalizeFirstLetterOnly(type)} {showEntityTypeDivider && divider} - {instanceId && ( - - {instanceId} - {showInstanceIdDivider && divider} - - )} {hasBrowsePath ? ( ` :hover { color: ${({ $disabled }) => ($disabled ? REDESIGN_COLORS.LINK_GREY : colors.violet[500])}; - + cursor: ${({ $disabled }) => ($disabled ? 'default' : 'pointer')}; && svg { color: ${({ $disabled }) => ($disabled ? REDESIGN_COLORS.LINK_GREY : colors.violet[500])}; } From 8606ebeb6b6d8c0b2bdb86db0d36f3b544590082 Mon Sep 17 00:00:00 2001 From: Saketh Varma Date: Thu, 6 Mar 2025 13:02:41 -0300 Subject: [PATCH 2/2] Lint ignore --- datahub-web-react/src/app/previewV2/ContextPath.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/datahub-web-react/src/app/previewV2/ContextPath.tsx b/datahub-web-react/src/app/previewV2/ContextPath.tsx index d5e93de24dc514..85ddb3549cf1d3 100644 --- a/datahub-web-react/src/app/previewV2/ContextPath.tsx +++ b/datahub-web-react/src/app/previewV2/ContextPath.tsx @@ -83,6 +83,8 @@ interface Props { // eslint-disable-next-line react/no-unused-prop-types entityLogoComponent?: JSX.Element; // eslint-disable-next-line react/no-unused-prop-types + instanceId?: string; + // eslint-disable-next-line react/no-unused-prop-types typeIcon?: JSX.Element; type?: string; entityType: EntityType;