Skip to content

Commit 29b44f2

Browse files
Showing platfrom intances only once
1 parent fcabe88 commit 29b44f2

File tree

3 files changed

+7
-13
lines changed

3 files changed

+7
-13
lines changed

datahub-web-react/src/app/previewV2/BrowsePaths.tsx

+5-1
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,16 @@ const BrowsePathSection = ({ path, linksDisabled }: { path: BrowsePathEntry } &
7171
if (!path.entity) {
7272
return <PlatFormTitle>{path.name}</PlatFormTitle>;
7373
}
74+
75+
// Till we have a DataPlatform instance page
76+
const hasDataPlatformInstance = path.name?.includes('dataPlatformInstance');
77+
7478
return (
7579
<ContextPathEntityLink
7680
key={path?.entity?.urn}
7781
entity={path?.entity}
7882
style={{ fontSize: '12px' }}
79-
linkDisabled={linksDisabled}
83+
linkDisabled={linksDisabled || hasDataPlatformInstance}
8084
/>
8185
);
8286
};

datahub-web-react/src/app/previewV2/ContextPath.tsx

+1-11
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ const PlatFormTitle = styled.span`
8282
interface Props {
8383
// eslint-disable-next-line react/no-unused-prop-types
8484
entityLogoComponent?: JSX.Element;
85-
instanceId?: string;
8685
// eslint-disable-next-line react/no-unused-prop-types
8786
typeIcon?: JSX.Element;
8887
type?: string;
@@ -103,7 +102,6 @@ function ContextPath(props: Props) {
103102
entityType,
104103
parentEntities,
105104
browsePaths,
106-
instanceId,
107105
entityTitleWidth = 200,
108106
previewType,
109107
isCompactView,
@@ -118,12 +116,10 @@ function ContextPath(props: Props) {
118116

119117
const divider = <PlatformDivider>|</PlatformDivider>;
120118

121-
const hasPlatformInstance = !!instanceId;
122119
const hasBrowsePath = !!browsePaths?.path?.length && !isDefaultBrowsePath(browsePaths);
123120
const hasParentEntities = !!parentEntities?.length;
124121

125-
const showInstanceIdDivider = hasBrowsePath || hasParentEntities;
126-
const showEntityTypeDivider = hasPlatformInstance || hasBrowsePath || hasParentEntities;
122+
const showEntityTypeDivider = hasBrowsePath || hasParentEntities;
127123

128124
return (
129125
<PlatformContentWrapper>
@@ -136,12 +132,6 @@ function ContextPath(props: Props) {
136132
<PlatFormTitle>{capitalizeFirstLetterOnly(type)}</PlatFormTitle>
137133
{showEntityTypeDivider && divider}
138134
</PlatformText>
139-
{instanceId && (
140-
<PlatformText>
141-
{instanceId}
142-
{showInstanceIdDivider && divider}
143-
</PlatformText>
144-
)}
145135
{hasBrowsePath ? (
146136
<BrowsePaths
147137
browsePaths={browsePaths}

datahub-web-react/src/app/previewV2/ContextPathEntityLink.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ const StyledLink = styled(Link)<{ $disabled?: boolean }>`
4545
4646
:hover {
4747
color: ${({ $disabled }) => ($disabled ? REDESIGN_COLORS.LINK_GREY : colors.violet[500])};
48-
48+
cursor: ${({ $disabled }) => ($disabled ? 'default' : 'pointer')};
4949
&& svg {
5050
color: ${({ $disabled }) => ($disabled ? REDESIGN_COLORS.LINK_GREY : colors.violet[500])};
5151
}

0 commit comments

Comments
 (0)