From 39f1abc1ee01b9bcb206eb9a9ae1ace83239d869 Mon Sep 17 00:00:00 2001 From: Tyler Davis Date: Thu, 14 Nov 2024 09:46:20 +1100 Subject: [PATCH 01/10] Make title consistent across CatalogTable impls Signed-off-by: Tyler Davis --- .changeset/lemon-bulldogs-study.md | 5 +++++ plugins/catalog/report.api.md | 2 ++ .../components/CatalogTable/CatalogTable.tsx | 20 +++++++++---------- .../CursorPaginatedCatalogTable.tsx | 5 +---- .../OffsetPaginatedCatalogTable.tsx | 4 ++-- 5 files changed, 19 insertions(+), 17 deletions(-) create mode 100644 .changeset/lemon-bulldogs-study.md diff --git a/.changeset/lemon-bulldogs-study.md b/.changeset/lemon-bulldogs-study.md new file mode 100644 index 0000000000..7bb15b8193 --- /dev/null +++ b/.changeset/lemon-bulldogs-study.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-catalog': minor +--- + +Consistent title behaviour across CatalogTable, CursorPaginatedCatalogTable, and OffsetPaginatedCatalogTable. diff --git a/plugins/catalog/report.api.md b/plugins/catalog/report.api.md index 6b8f246514..bc74b9b3d1 100644 --- a/plugins/catalog/report.api.md +++ b/plugins/catalog/report.api.md @@ -214,6 +214,8 @@ export interface CatalogTableProps { subtitle?: string; // (undocumented) tableOptions?: TableProps['options']; + // (undocumented) + title?: string; } // @public (undocumented) diff --git a/plugins/catalog/src/components/CatalogTable/CatalogTable.tsx b/plugins/catalog/src/components/CatalogTable/CatalogTable.tsx index 2d5e78a0d6..cd32e6bfef 100644 --- a/plugins/catalog/src/components/CatalogTable/CatalogTable.tsx +++ b/plugins/catalog/src/components/CatalogTable/CatalogTable.tsx @@ -60,6 +60,7 @@ export interface CatalogTableProps { actions?: TableProps['actions']; tableOptions?: TableProps['options']; emptyContent?: ReactNode; + title?: string; subtitle?: string; } @@ -173,14 +174,11 @@ export const CatalogTable = (props: CatalogTableProps) => { const currentCount = typeof totalItems === 'number' ? `(${totalItems})` : ''; // TODO(timbonicus): remove the title from the CatalogTable once using EntitySearchBar const titlePreamble = capitalize(filters.user?.value ?? 'all'); - const title = [ - titlePreamble, - currentType, - pluralize(currentKind), - currentCount, - ] - .filter(s => s) - .join(' '); + const title = + props.title || + [titlePreamble, currentType, pluralize(currentKind), currentCount] + .filter(s => s) + .join(' '); const actions = props.actions || defaultActions; const options = { @@ -197,8 +195,8 @@ export const CatalogTable = (props: CatalogTableProps) => { columns={tableColumns} emptyContent={emptyContent} isLoading={loading} - title={title} actions={actions} + title={title} subtitle={subtitle} options={options} data={entities.map(toEntityRow)} @@ -212,8 +210,8 @@ export const CatalogTable = (props: CatalogTableProps) => { columns={tableColumns} emptyContent={emptyContent} isLoading={loading} - title={title} actions={actions} + title={title} subtitle={subtitle} options={options} data={entities.map(toEntityRow)} @@ -235,9 +233,9 @@ export const CatalogTable = (props: CatalogTableProps) => { pageSizeOptions: [20, 50, 100], ...options, }} - title={title} data={rows} actions={actions} + title={title} subtitle={subtitle} emptyContent={emptyContent} /> diff --git a/plugins/catalog/src/components/CatalogTable/CursorPaginatedCatalogTable.tsx b/plugins/catalog/src/components/CatalogTable/CursorPaginatedCatalogTable.tsx index 7198f8a60c..843d5be2c8 100644 --- a/plugins/catalog/src/components/CatalogTable/CursorPaginatedCatalogTable.tsx +++ b/plugins/catalog/src/components/CatalogTable/CursorPaginatedCatalogTable.tsx @@ -30,12 +30,10 @@ type PaginatedCatalogTableProps = { */ export function CursorPaginatedCatalogTable(props: PaginatedCatalogTableProps) { - const { columns, data, next, prev, title, isLoading, options, ...restProps } = - props; + const { columns, data, next, prev, options, ...restProps } = props; return ( ); diff --git a/plugins/catalog/src/components/CatalogTable/OffsetPaginatedCatalogTable.tsx b/plugins/catalog/src/components/CatalogTable/OffsetPaginatedCatalogTable.tsx index 7febfc2d32..7ebf791046 100644 --- a/plugins/catalog/src/components/CatalogTable/OffsetPaginatedCatalogTable.tsx +++ b/plugins/catalog/src/components/CatalogTable/OffsetPaginatedCatalogTable.tsx @@ -27,7 +27,7 @@ import { CatalogTableToolbar } from './CatalogTableToolbar'; export function OffsetPaginatedCatalogTable( props: TableProps, ) { - const { columns, data, isLoading, options } = props; + const { columns, data, options, ...restProps } = props; const { setLimit, setOffset, limit, totalItems, offset } = useEntityList(); const [page, setPage] = React.useState( @@ -65,7 +65,7 @@ export function OffsetPaginatedCatalogTable( }} totalCount={totalItems} localization={{ pagination: { labelDisplayedRows: '' } }} - isLoading={isLoading} + {...restProps} /> ); } From 3b44e572e711b507a80dfa938546797fd821ba91 Mon Sep 17 00:00:00 2001 From: Tyler Davis Date: Thu, 14 Nov 2024 14:09:53 +1100 Subject: [PATCH 02/10] another api report? Signed-off-by: Tyler Davis --- plugins/catalog/report-alpha.api.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/plugins/catalog/report-alpha.api.md b/plugins/catalog/report-alpha.api.md index 3a9f0c6c33..0e01aa5659 100644 --- a/plugins/catalog/report-alpha.api.md +++ b/plugins/catalog/report-alpha.api.md @@ -182,6 +182,27 @@ const _default: FrontendPlugin< factory: AnyApiFactory; }; }>; + 'nav-item:catalog': ExtensionDefinition<{ + kind: 'nav-item'; + name: undefined; + config: {}; + configInput: {}; + output: ConfigurableExtensionDataRef< + { + title: string; + icon: IconComponent; + routeRef: RouteRef; + }, + 'core.nav-item.target', + {} + >; + inputs: {}; + params: { + title: string; + icon: IconComponent; + routeRef: RouteRef; + }; + }>; 'api:catalog/starred-entities': ExtensionDefinition<{ kind: 'api'; name: 'starred-entities'; From 11f867f5d03d8b98510ee82e39a2900e4cb3a0a9 Mon Sep 17 00:00:00 2001 From: Tyler Davis Date: Thu, 14 Nov 2024 15:49:27 +1100 Subject: [PATCH 03/10] add tests Signed-off-by: Tyler Davis --- .../CatalogTable/CatalogTable.test.tsx | 13 +++++++++++ .../CursorPaginatedCatalogTable.test.tsx | 16 ++++++++++++++ .../OffsetPaginatedCatalogTable.test.tsx | 22 +++++++++++++++++++ 3 files changed, 51 insertions(+) diff --git a/plugins/catalog/src/components/CatalogTable/CatalogTable.test.tsx b/plugins/catalog/src/components/CatalogTable/CatalogTable.test.tsx index 5b7f28e26a..13ee7593b9 100644 --- a/plugins/catalog/src/components/CatalogTable/CatalogTable.test.tsx +++ b/plugins/catalog/src/components/CatalogTable/CatalogTable.test.tsx @@ -84,6 +84,19 @@ describe('CatalogTable component', () => { ).resolves.toBeInTheDocument(); }); + it('should a custom title and subtitle when passed in', async () => { + await renderInTestApp( + + + + + , + ); + + expect(screen.queryByText('My Title')).toBeInTheDocument(); + expect(screen.queryByText('My Subtitle')).toBeInTheDocument(); + }); + it('should display entity names when loading has finished and no error occurred', async () => { await renderInTestApp( diff --git a/plugins/catalog/src/components/CatalogTable/CursorPaginatedCatalogTable.test.tsx b/plugins/catalog/src/components/CatalogTable/CursorPaginatedCatalogTable.test.tsx index adc69794ae..b0deec9679 100644 --- a/plugins/catalog/src/components/CatalogTable/CursorPaginatedCatalogTable.test.tsx +++ b/plugins/catalog/src/components/CatalogTable/CursorPaginatedCatalogTable.test.tsx @@ -63,6 +63,22 @@ describe('CursorPaginatedCatalogTable', () => { ); }; + it('should display the title and subtitle when passed in', async () => { + await renderInTestApp( + wrapInContext( + , + ), + ); + + expect(screen.queryByText('My Title')).toBeInTheDocument(); + expect(screen.queryByText('My Subtitle')).toBeInTheDocument(); + }); + it('should display all the items', async () => { await renderInTestApp( wrapInContext( diff --git a/plugins/catalog/src/components/CatalogTable/OffsetPaginatedCatalogTable.test.tsx b/plugins/catalog/src/components/CatalogTable/OffsetPaginatedCatalogTable.test.tsx index aad9b7cb3d..e2e73c5af8 100644 --- a/plugins/catalog/src/components/CatalogTable/OffsetPaginatedCatalogTable.test.tsx +++ b/plugins/catalog/src/components/CatalogTable/OffsetPaginatedCatalogTable.test.tsx @@ -62,6 +62,28 @@ describe('OffsetPaginatedCatalogTable', () => { ); }; + it('should display the title and subtitle when passed in', async () => { + await renderInTestApp( + wrapInContext( + , + { + setOffset: jest.fn(), + limit: Number.MAX_SAFE_INTEGER, + offset: 0, + totalItems: data.length, + }, + ), + ); + + expect(screen.queryByText('My Title')).toBeInTheDocument(); + expect(screen.queryByText('My Subtitle')).toBeInTheDocument(); + }); + it('should display all the items', async () => { await renderInTestApp( wrapInContext( From a7c8659e4b324ddcba5c1b114a500fd6dd3487d7 Mon Sep 17 00:00:00 2001 From: Tyler Davis Date: Thu, 14 Nov 2024 18:00:55 +1100 Subject: [PATCH 04/10] update catalogtable docs Signed-off-by: Tyler Davis --- .../src/components/CatalogTable/CatalogTable.tsx | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/plugins/catalog/src/components/CatalogTable/CatalogTable.tsx b/plugins/catalog/src/components/CatalogTable/CatalogTable.tsx index cd32e6bfef..af6dd632cb 100644 --- a/plugins/catalog/src/components/CatalogTable/CatalogTable.tsx +++ b/plugins/catalog/src/components/CatalogTable/CatalogTable.tsx @@ -60,6 +60,10 @@ export interface CatalogTableProps { actions?: TableProps['actions']; tableOptions?: TableProps['options']; emptyContent?: ReactNode; + /** + * A static title to use for the table. If not provided, a title will be + * generated based on the current Kind and Type filters and total number of items. + */ title?: string; subtitle?: string; } @@ -74,7 +78,16 @@ const refCompare = (a: Entity, b: Entity) => { return toRef(a).localeCompare(toRef(b)); }; -/** @public */ +/** + * CatalogTable is a wrapper around the Table component that is pre-configured + * to display catalog entities. + * + * @remarks + * + * See {@link https://backstage.io/docs/features/software-catalog/catalog-customization} + * + * @public + */ export const CatalogTable = (props: CatalogTableProps) => { const { columns = defaultCatalogTableColumnsFunc, From 495623fef5a42ee810fbc19a333a1f64bd1bcacc Mon Sep 17 00:00:00 2001 From: Tyler Davis Date: Thu, 14 Nov 2024 18:42:12 +1100 Subject: [PATCH 05/10] api report after docs update Signed-off-by: Tyler Davis --- plugins/catalog/report-alpha.api.md | 8 ++++---- plugins/catalog/report.api.md | 9 ++++----- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/plugins/catalog/report-alpha.api.md b/plugins/catalog/report-alpha.api.md index 0e01aa5659..6a8007a199 100644 --- a/plugins/catalog/report-alpha.api.md +++ b/plugins/catalog/report-alpha.api.md @@ -98,8 +98,8 @@ export const catalogTranslationRef: TranslationRef< readonly 'entityLinksCard.title': 'Links'; readonly 'entityLinksCard.emptyDescription': 'No links defined for this entity. You can add links to your entity YAML as shown in the highlighted example below:'; readonly 'entityLinksCard.readMoreButtonTitle': 'Read more'; - readonly 'entityNotFound.title': 'Entity was not found'; readonly 'entityNotFound.description': 'Want to help us build this? Check out our Getting Started documentation.'; + readonly 'entityNotFound.title': 'Entity was not found'; readonly 'entityNotFound.docButtonTitle': 'DOCS'; readonly entityProcessingErrorsDescription: 'The error below originates from'; readonly entityRelationWarningDescription: "This entity has relations to other entities, which can't be found in the catalog.\n Entities not found are: "; @@ -114,8 +114,8 @@ export const catalogTranslationRef: TranslationRef< readonly 'hasSystemsCard.title': 'Has systems'; readonly 'hasSystemsCard.emptyMessage': 'No system is part of this domain'; readonly 'relatedEntitiesCard.emptyHelpLinkTitle': 'Learn how to change this'; - readonly 'systemDiagramCard.title': 'System Diagram'; readonly 'systemDiagramCard.description': 'Use pinch & zoo to move around the diagram.'; + readonly 'systemDiagramCard.title': 'System Diagram'; readonly 'systemDiagramCard.edgeLabels.dependsOn': 'depends on'; readonly 'systemDiagramCard.edgeLabels.partOf': 'part of'; readonly 'systemDiagramCard.edgeLabels.provides': 'provides'; @@ -127,15 +127,15 @@ const _default: FrontendPlugin< { catalogIndex: RouteRef; catalogEntity: RouteRef<{ - name: string; kind: string; + name: string; namespace: string; }>; }, { viewTechDoc: ExternalRouteRef<{ - name: string; kind: string; + name: string; namespace: string; }>; createComponent: ExternalRouteRef; diff --git a/plugins/catalog/report.api.md b/plugins/catalog/report.api.md index bc74b9b3d1..b352ced580 100644 --- a/plugins/catalog/report.api.md +++ b/plugins/catalog/report.api.md @@ -105,8 +105,8 @@ export const catalogPlugin: BackstagePlugin< { catalogIndex: RouteRef; catalogEntity: RouteRef<{ - name: string; kind: string; + name: string; namespace: string; }>; }, @@ -114,8 +114,8 @@ export const catalogPlugin: BackstagePlugin< createComponent: ExternalRouteRef; viewTechDoc: ExternalRouteRef< { - name: string; kind: string; + name: string; namespace: string; }, true @@ -156,7 +156,7 @@ export interface CatalogSearchResultListItemProps { result?: IndexableDocument; } -// @public (undocumented) +// @public export const CatalogTable: { (props: CatalogTableProps): React_2.JSX.Element; columns: Readonly<{ @@ -214,7 +214,6 @@ export interface CatalogTableProps { subtitle?: string; // (undocumented) tableOptions?: TableProps['options']; - // (undocumented) title?: string; } @@ -519,7 +518,7 @@ export const FilterContainer: (props: { | 'lg' | 'xl' | undefined; - drawerAnchor?: 'left' | 'top' | 'bottom' | 'right' | undefined; + drawerAnchor?: 'top' | 'bottom' | 'left' | 'right' | undefined; } | undefined; }) => JSX_2.Element; From 87dc91dda0ad579fb891e0257d2efa4271fd3ee5 Mon Sep 17 00:00:00 2001 From: Tyler Davis Date: Thu, 14 Nov 2024 18:52:41 +1100 Subject: [PATCH 06/10] update catalog api reports again for some reason Signed-off-by: Tyler Davis --- plugins/catalog/report-alpha.api.md | 50 ++++++++++++++--------------- plugins/catalog/report.api.md | 6 ++-- 2 files changed, 28 insertions(+), 28 deletions(-) diff --git a/plugins/catalog/report-alpha.api.md b/plugins/catalog/report-alpha.api.md index 6a8007a199..be7f3386c5 100644 --- a/plugins/catalog/report-alpha.api.md +++ b/plugins/catalog/report-alpha.api.md @@ -98,8 +98,8 @@ export const catalogTranslationRef: TranslationRef< readonly 'entityLinksCard.title': 'Links'; readonly 'entityLinksCard.emptyDescription': 'No links defined for this entity. You can add links to your entity YAML as shown in the highlighted example below:'; readonly 'entityLinksCard.readMoreButtonTitle': 'Read more'; - readonly 'entityNotFound.description': 'Want to help us build this? Check out our Getting Started documentation.'; readonly 'entityNotFound.title': 'Entity was not found'; + readonly 'entityNotFound.description': 'Want to help us build this? Check out our Getting Started documentation.'; readonly 'entityNotFound.docButtonTitle': 'DOCS'; readonly entityProcessingErrorsDescription: 'The error below originates from'; readonly entityRelationWarningDescription: "This entity has relations to other entities, which can't be found in the catalog.\n Entities not found are: "; @@ -114,8 +114,8 @@ export const catalogTranslationRef: TranslationRef< readonly 'hasSystemsCard.title': 'Has systems'; readonly 'hasSystemsCard.emptyMessage': 'No system is part of this domain'; readonly 'relatedEntitiesCard.emptyHelpLinkTitle': 'Learn how to change this'; - readonly 'systemDiagramCard.description': 'Use pinch & zoo to move around the diagram.'; readonly 'systemDiagramCard.title': 'System Diagram'; + readonly 'systemDiagramCard.description': 'Use pinch & zoo to move around the diagram.'; readonly 'systemDiagramCard.edgeLabels.dependsOn': 'depends on'; readonly 'systemDiagramCard.edgeLabels.partOf': 'part of'; readonly 'systemDiagramCard.edgeLabels.provides': 'provides'; @@ -127,15 +127,15 @@ const _default: FrontendPlugin< { catalogIndex: RouteRef; catalogEntity: RouteRef<{ - kind: string; name: string; + kind: string; namespace: string; }>; }, { viewTechDoc: ExternalRouteRef<{ - kind: string; name: string; + kind: string; namespace: string; }>; createComponent: ExternalRouteRef; @@ -182,27 +182,6 @@ const _default: FrontendPlugin< factory: AnyApiFactory; }; }>; - 'nav-item:catalog': ExtensionDefinition<{ - kind: 'nav-item'; - name: undefined; - config: {}; - configInput: {}; - output: ConfigurableExtensionDataRef< - { - title: string; - icon: IconComponent; - routeRef: RouteRef; - }, - 'core.nav-item.target', - {} - >; - inputs: {}; - params: { - title: string; - icon: IconComponent; - routeRef: RouteRef; - }; - }>; 'api:catalog/starred-entities': ExtensionDefinition<{ kind: 'api'; name: 'starred-entities'; @@ -867,6 +846,27 @@ const _default: FrontendPlugin< routeRef?: RouteRef | undefined; }; }>; + 'nav-item:catalog': ExtensionDefinition<{ + kind: 'nav-item'; + name: undefined; + config: {}; + configInput: {}; + output: ConfigurableExtensionDataRef< + { + title: string; + icon: IconComponent; + routeRef: RouteRef; + }, + 'core.nav-item.target', + {} + >; + inputs: {}; + params: { + title: string; + icon: IconComponent; + routeRef: RouteRef; + }; + }>; 'search-result-list-item:catalog': ExtensionDefinition<{ kind: 'search-result-list-item'; name: undefined; diff --git a/plugins/catalog/report.api.md b/plugins/catalog/report.api.md index b352ced580..8bc620d221 100644 --- a/plugins/catalog/report.api.md +++ b/plugins/catalog/report.api.md @@ -105,8 +105,8 @@ export const catalogPlugin: BackstagePlugin< { catalogIndex: RouteRef; catalogEntity: RouteRef<{ - kind: string; name: string; + kind: string; namespace: string; }>; }, @@ -114,8 +114,8 @@ export const catalogPlugin: BackstagePlugin< createComponent: ExternalRouteRef; viewTechDoc: ExternalRouteRef< { - kind: string; name: string; + kind: string; namespace: string; }, true @@ -518,7 +518,7 @@ export const FilterContainer: (props: { | 'lg' | 'xl' | undefined; - drawerAnchor?: 'top' | 'bottom' | 'left' | 'right' | undefined; + drawerAnchor?: 'left' | 'top' | 'bottom' | 'right' | undefined; } | undefined; }) => JSX_2.Element; From 8f4921e3e69cd218b35e68c039abdb9ea2f1b257 Mon Sep 17 00:00:00 2001 From: Tyler Davis Date: Thu, 14 Nov 2024 19:23:52 +1100 Subject: [PATCH 07/10] manually revert changes Signed-off-by: Tyler Davis --- packages/core-components/report-alpha.api.md | 4 +- plugins/catalog/report-alpha.api.md | 42 ++++++++++---------- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/packages/core-components/report-alpha.api.md b/packages/core-components/report-alpha.api.md index 1f4b999232..0a3f1fb350 100644 --- a/packages/core-components/report-alpha.api.md +++ b/packages/core-components/report-alpha.api.md @@ -20,12 +20,12 @@ export const coreComponentsTranslationRef: TranslationRef< readonly 'signIn.customProvider.continue': 'Continue'; readonly 'signIn.customProvider.idToken': 'ID Token (optional)'; readonly 'signIn.guestProvider.title': 'Guest'; - readonly 'signIn.guestProvider.enter': 'Enter'; readonly 'signIn.guestProvider.subtitle': 'Enter as a Guest User.\n You will not have a verified identity, meaning some features might be unavailable.'; + readonly 'signIn.guestProvider.enter': 'Enter'; readonly skipToContent: 'Skip to content'; readonly 'copyTextButton.tooltipText': 'Text copied to clipboard'; - readonly 'simpleStepper.finish': 'Finish'; readonly 'simpleStepper.reset': 'Reset'; + readonly 'simpleStepper.finish': 'Finish'; readonly 'simpleStepper.next': 'Next'; readonly 'simpleStepper.skip': 'Skip'; readonly 'simpleStepper.back': 'Back'; diff --git a/plugins/catalog/report-alpha.api.md b/plugins/catalog/report-alpha.api.md index be7f3386c5..0e01aa5659 100644 --- a/plugins/catalog/report-alpha.api.md +++ b/plugins/catalog/report-alpha.api.md @@ -182,6 +182,27 @@ const _default: FrontendPlugin< factory: AnyApiFactory; }; }>; + 'nav-item:catalog': ExtensionDefinition<{ + kind: 'nav-item'; + name: undefined; + config: {}; + configInput: {}; + output: ConfigurableExtensionDataRef< + { + title: string; + icon: IconComponent; + routeRef: RouteRef; + }, + 'core.nav-item.target', + {} + >; + inputs: {}; + params: { + title: string; + icon: IconComponent; + routeRef: RouteRef; + }; + }>; 'api:catalog/starred-entities': ExtensionDefinition<{ kind: 'api'; name: 'starred-entities'; @@ -846,27 +867,6 @@ const _default: FrontendPlugin< routeRef?: RouteRef | undefined; }; }>; - 'nav-item:catalog': ExtensionDefinition<{ - kind: 'nav-item'; - name: undefined; - config: {}; - configInput: {}; - output: ConfigurableExtensionDataRef< - { - title: string; - icon: IconComponent; - routeRef: RouteRef; - }, - 'core.nav-item.target', - {} - >; - inputs: {}; - params: { - title: string; - icon: IconComponent; - routeRef: RouteRef; - }; - }>; 'search-result-list-item:catalog': ExtensionDefinition<{ kind: 'search-result-list-item'; name: undefined; From 0e89a7a20c7cd67fc491a3e15dcecb1be2f39ba8 Mon Sep 17 00:00:00 2001 From: Tyler Davis Date: Fri, 15 Nov 2024 09:43:12 +1100 Subject: [PATCH 08/10] remove unwanted changes Signed-off-by: Tyler Davis --- packages/core-components/report-alpha.api.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/core-components/report-alpha.api.md b/packages/core-components/report-alpha.api.md index 0a3f1fb350..1f4b999232 100644 --- a/packages/core-components/report-alpha.api.md +++ b/packages/core-components/report-alpha.api.md @@ -20,12 +20,12 @@ export const coreComponentsTranslationRef: TranslationRef< readonly 'signIn.customProvider.continue': 'Continue'; readonly 'signIn.customProvider.idToken': 'ID Token (optional)'; readonly 'signIn.guestProvider.title': 'Guest'; - readonly 'signIn.guestProvider.subtitle': 'Enter as a Guest User.\n You will not have a verified identity, meaning some features might be unavailable.'; readonly 'signIn.guestProvider.enter': 'Enter'; + readonly 'signIn.guestProvider.subtitle': 'Enter as a Guest User.\n You will not have a verified identity, meaning some features might be unavailable.'; readonly skipToContent: 'Skip to content'; readonly 'copyTextButton.tooltipText': 'Text copied to clipboard'; - readonly 'simpleStepper.reset': 'Reset'; readonly 'simpleStepper.finish': 'Finish'; + readonly 'simpleStepper.reset': 'Reset'; readonly 'simpleStepper.next': 'Next'; readonly 'simpleStepper.skip': 'Skip'; readonly 'simpleStepper.back': 'Back'; From 963afb175fa8fe2a64051daf8adf78a499aa731b Mon Sep 17 00:00:00 2001 From: Tyler Davis Date: Thu, 21 Nov 2024 15:49:17 +1100 Subject: [PATCH 09/10] fixup diff Signed-off-by: Tyler Davis --- .../src/components/CatalogTable/CatalogTable.tsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/plugins/catalog/src/components/CatalogTable/CatalogTable.tsx b/plugins/catalog/src/components/CatalogTable/CatalogTable.tsx index af6dd632cb..944e795709 100644 --- a/plugins/catalog/src/components/CatalogTable/CatalogTable.tsx +++ b/plugins/catalog/src/components/CatalogTable/CatalogTable.tsx @@ -49,6 +49,7 @@ import { defaultCatalogTableColumnsFunc } from './defaultCatalogTableColumnsFunc import { useTranslationRef } from '@backstage/core-plugin-api/alpha'; import { catalogTranslationRef } from '../../alpha/translation'; import { FavoriteToggleIcon } from '@backstage/core-components'; +import { CatalogTableToolbar } from './CatalogTableToolbar'; /** * Props for {@link CatalogTable}. @@ -208,8 +209,8 @@ export const CatalogTable = (props: CatalogTableProps) => { columns={tableColumns} emptyContent={emptyContent} isLoading={loading} - actions={actions} title={title} + actions={actions} subtitle={subtitle} options={options} data={entities.map(toEntityRow)} @@ -223,8 +224,8 @@ export const CatalogTable = (props: CatalogTableProps) => { columns={tableColumns} emptyContent={emptyContent} isLoading={loading} - actions={actions} title={title} + actions={actions} subtitle={subtitle} options={options} data={entities.map(toEntityRow)} @@ -246,9 +247,12 @@ export const CatalogTable = (props: CatalogTableProps) => { pageSizeOptions: [20, 50, 100], ...options, }} + components={{ + Toolbar: CatalogTableToolbar, + }} + title={title} data={rows} actions={actions} - title={title} subtitle={subtitle} emptyContent={emptyContent} /> From 504241271f8bbca66fa1cc642d308a86ca333f5f Mon Sep 17 00:00:00 2001 From: Tyler Davis Date: Tue, 26 Nov 2024 21:53:25 +1100 Subject: [PATCH 10/10] fix api report Signed-off-by: Tyler Davis --- plugins/catalog/report-alpha.api.md | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/plugins/catalog/report-alpha.api.md b/plugins/catalog/report-alpha.api.md index 0e01aa5659..3a9f0c6c33 100644 --- a/plugins/catalog/report-alpha.api.md +++ b/plugins/catalog/report-alpha.api.md @@ -182,27 +182,6 @@ const _default: FrontendPlugin< factory: AnyApiFactory; }; }>; - 'nav-item:catalog': ExtensionDefinition<{ - kind: 'nav-item'; - name: undefined; - config: {}; - configInput: {}; - output: ConfigurableExtensionDataRef< - { - title: string; - icon: IconComponent; - routeRef: RouteRef; - }, - 'core.nav-item.target', - {} - >; - inputs: {}; - params: { - title: string; - icon: IconComponent; - routeRef: RouteRef; - }; - }>; 'api:catalog/starred-entities': ExtensionDefinition<{ kind: 'api'; name: 'starred-entities';