feat(ui/summary): add the new summary tab to glossary node entity (#14541)

This commit is contained in:
purnimagarg1 2025-08-22 21:04:33 +05:30 committed by GitHub
parent 8234cbec8f
commit 5dd2a3633a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -17,6 +17,9 @@ import SidebarNotesSection from '@app/entityV2/shared/sidebarSection/SidebarNote
import SidebarStructuredProperties from '@app/entityV2/shared/sidebarSection/SidebarStructuredProperties';
import { DocumentationTab } from '@app/entityV2/shared/tabs/Documentation/DocumentationTab';
import { PropertiesTab } from '@app/entityV2/shared/tabs/Properties/PropertiesTab';
import { EntityTab } from '@app/entityV2/shared/types';
import SummaryTab from '@app/entityV2/summary/SummaryTab';
import { useShowAssetSummaryPage } from '@app/entityV2/summary/useShowAssetSummaryPage';
import { FetchedEntity } from '@app/lineage/types';
import { useGetGlossaryNodeQuery } from '@graphql/glossaryNode.generated';
@ -85,26 +88,7 @@ class GlossaryNodeEntity implements Entity<GlossaryNode> {
useEntityQuery={useGetGlossaryNodeQuery}
getOverrideProperties={this.getOverridePropertiesFromEntity}
isNameEditable
tabs={[
{
name: 'Contents',
component: ChildrenTab,
icon: AppstoreOutlined,
},
{
name: 'Documentation',
component: DocumentationTab,
icon: FileOutlined,
properties: {
hideLinksButton: true,
},
},
{
name: 'Properties',
component: PropertiesTab,
icon: UnorderedListOutlined,
},
]}
tabs={this.getProfileTabs()}
sidebarSections={this.getSidebarSections()}
// NOTE: Hiding this for now as we've moved the actions to the content of ChildrenTab.tsx
// The buttons are too big and causes other actions to overflow.
@ -142,6 +126,43 @@ class GlossaryNodeEntity implements Entity<GlossaryNode> {
},
];
getProfileTabs = (): EntityTab[] => {
const showSummaryTab = useShowAssetSummaryPage();
return [
...(showSummaryTab
? [
{
name: 'Summary',
component: SummaryTab,
},
]
: []),
{
name: 'Contents',
component: ChildrenTab,
icon: AppstoreOutlined,
},
...(!showSummaryTab
? [
{
name: 'Documentation',
component: DocumentationTab,
icon: FileOutlined,
properties: {
hideLinksButton: true,
},
},
]
: []),
{
name: 'Properties',
component: PropertiesTab,
icon: UnorderedListOutlined,
},
];
};
getSidebarTabs = () => [
{
name: 'Properties',