From 0c117fdf9ec0a04f1fd6960508fc85e7b2938acb Mon Sep 17 00:00:00 2001 From: Yakubov Nikita Date: Tue, 24 Dec 2024 08:40:49 +0000 Subject: [PATCH] feat(globaltags to glossaryterm): add globaltags property to glossaryterm and glossarynode entities - fix linters --- .../glossaryNode/GlossaryNodeEntity.tsx | 8 ++-- .../glossaryTerm/GlossaryTermEntity.tsx | 8 ++-- .../profile/sidebar/SidebarTagsSection.tsx | 44 +++++++++---------- .../src/graphql/glossaryNode.graphql | 4 +- .../src/graphql/glossaryTerm.graphql | 4 +- datahub-web-react/src/graphql/search.graphql | 10 ++--- 6 files changed, 39 insertions(+), 39 deletions(-) diff --git a/datahub-web-react/src/app/entity/glossaryNode/GlossaryNodeEntity.tsx b/datahub-web-react/src/app/entity/glossaryNode/GlossaryNodeEntity.tsx index 269472e3143b3..b1baf55a32ec7 100644 --- a/datahub-web-react/src/app/entity/glossaryNode/GlossaryNodeEntity.tsx +++ b/datahub-web-react/src/app/entity/glossaryNode/GlossaryNodeEntity.tsx @@ -102,11 +102,11 @@ class GlossaryNodeEntity implements Entity { { component: SidebarOwnerSection, }, - { + { component: SidebarTagsSection, properties: { hasTags: true, - hasTerms: false, + hasTerms: false, }, }, { @@ -136,7 +136,7 @@ class GlossaryNodeEntity implements Entity { name={this.displayName(data)} description={data?.properties?.description || ''} owners={data?.ownership?.owners} - globalTags={data.globalTags} + globalTags={data.globalTags} /> ); }; @@ -158,7 +158,7 @@ class GlossaryNodeEntity implements Entity { EntityCapabilityType.OWNERS, EntityCapabilityType.DEPRECATION, EntityCapabilityType.SOFT_DELETE, - EntityCapabilityType.TAGS + EntityCapabilityType.TAGS, ]); }; diff --git a/datahub-web-react/src/app/entity/glossaryTerm/GlossaryTermEntity.tsx b/datahub-web-react/src/app/entity/glossaryTerm/GlossaryTermEntity.tsx index 2d7eb11f94097..244f3ed090199 100644 --- a/datahub-web-react/src/app/entity/glossaryTerm/GlossaryTermEntity.tsx +++ b/datahub-web-react/src/app/entity/glossaryTerm/GlossaryTermEntity.tsx @@ -125,11 +125,11 @@ export class GlossaryTermEntity implements Entity { { component: SidebarOwnerSection, }, - { + { component: SidebarTagsSection, properties: { hasTags: true, - hasTerms: false, + hasTerms: false, }, }, { @@ -164,7 +164,7 @@ export class GlossaryTermEntity implements Entity { description={data?.properties?.description || ''} owners={data?.ownership?.owners} domain={data.domain?.domain} - globalTags={data.globalTags} + globalTags={data.globalTags} /> ); }; @@ -190,7 +190,7 @@ export class GlossaryTermEntity implements Entity { EntityCapabilityType.OWNERS, EntityCapabilityType.DEPRECATION, EntityCapabilityType.SOFT_DELETE, - EntityCapabilityType.TAGS + EntityCapabilityType.TAGS, ]); }; diff --git a/datahub-web-react/src/app/entity/shared/containers/profile/sidebar/SidebarTagsSection.tsx b/datahub-web-react/src/app/entity/shared/containers/profile/sidebar/SidebarTagsSection.tsx index 5f869e906e81b..4c2584ac766a6 100644 --- a/datahub-web-react/src/app/entity/shared/containers/profile/sidebar/SidebarTagsSection.tsx +++ b/datahub-web-react/src/app/entity/shared/containers/profile/sidebar/SidebarTagsSection.tsx @@ -51,28 +51,28 @@ export const SidebarTagsSection = ({ properties, readOnly }: Props) => { /> {canAddTerm && ( - <> - - - - - - - )} + <> + + + + + + + )} ); }; diff --git a/datahub-web-react/src/graphql/glossaryNode.graphql b/datahub-web-react/src/graphql/glossaryNode.graphql index 81e0fe1a65734..8e9d2c5bbde94 100644 --- a/datahub-web-react/src/graphql/glossaryNode.graphql +++ b/datahub-web-react/src/graphql/glossaryNode.graphql @@ -37,9 +37,9 @@ query getGlossaryNode($urn: String!) { forms { ...formsFields } - globalTags { + globalTags { ...globalTagsFields - } + } children: relationships(input: { types: ["IsPartOf"], direction: INCOMING, start: 0, count: 10000 }) { total relationships { diff --git a/datahub-web-react/src/graphql/glossaryTerm.graphql b/datahub-web-react/src/graphql/glossaryTerm.graphql index 00e9938b110fa..57f75ef4cc29e 100644 --- a/datahub-web-react/src/graphql/glossaryTerm.graphql +++ b/datahub-web-react/src/graphql/glossaryTerm.graphql @@ -63,9 +63,9 @@ query getGlossaryTerm($urn: String!, $start: Int, $count: Int) { domain { ...entityDomain } - globalTags { + globalTags { ...globalTagsFields - } + } institutionalMemory { ...institutionalMemoryFields } diff --git a/datahub-web-react/src/graphql/search.graphql b/datahub-web-react/src/graphql/search.graphql index e725026514116..d080f17625010 100644 --- a/datahub-web-react/src/graphql/search.graphql +++ b/datahub-web-react/src/graphql/search.graphql @@ -150,9 +150,9 @@ fragment autoCompleteFields on Entity { ... on GlossaryTerm { name hierarchicalName - globalTags { + globalTags { ...globalTagsFields - } + } properties { name } @@ -726,7 +726,7 @@ fragment searchResultsWithoutSchemaField on Entity { parentNodes { ...parentNodesFields } - globalTags { + globalTags { ...globalTagsFields } domain { @@ -743,9 +743,9 @@ fragment searchResultsWithoutSchemaField on Entity { parentNodes { ...parentNodesFields } - globalTags { + globalTags { ...globalTagsFields - } + } structuredProperties { properties { ...structuredPropertiesFields