diff --git a/.changeset/tiny-shrimps-beam.md b/.changeset/tiny-shrimps-beam.md new file mode 100644 index 0000000000..b538d465f9 --- /dev/null +++ b/.changeset/tiny-shrimps-beam.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-catalog': patch +--- + +Adding in type and kind entity details to catalog table title for user clarity diff --git a/plugins/catalog/src/components/CatalogTable/CatalogTable.test.tsx b/plugins/catalog/src/components/CatalogTable/CatalogTable.test.tsx index c80b340349..c242372a97 100644 --- a/plugins/catalog/src/components/CatalogTable/CatalogTable.test.tsx +++ b/plugins/catalog/src/components/CatalogTable/CatalogTable.test.tsx @@ -95,6 +95,11 @@ describe('CatalogTable component', () => { () => false, () => false, ), + kind: { + value: 'component', + getCatalogFilters: () => ({ kind: 'component' }), + toQueryValue: () => 'component', + }, }, }} > @@ -107,7 +112,7 @@ describe('CatalogTable component', () => { }, }, ); - expect(screen.getByText(/Owned \(3\)/)).toBeInTheDocument(); + expect(screen.getByText(/Owned components \(3\)/)).toBeInTheDocument(); expect(screen.getByText(/component1/)).toBeInTheDocument(); expect(screen.getByText(/component2/)).toBeInTheDocument(); expect(screen.getByText(/component3/)).toBeInTheDocument(); diff --git a/plugins/catalog/src/components/CatalogTable/CatalogTable.tsx b/plugins/catalog/src/components/CatalogTable/CatalogTable.tsx index 3d0cc75f7c..bddf7715bf 100644 --- a/plugins/catalog/src/components/CatalogTable/CatalogTable.tsx +++ b/plugins/catalog/src/components/CatalogTable/CatalogTable.tsx @@ -226,7 +226,8 @@ export const CatalogTable = (props: CatalogTableProps) => { typeColumn.hidden = !showTypeColumn; } const showPagination = rows.length > 20; - + const currentKind = filters.kind?.value || ''; + const currentType = filters.type?.value || ''; return (