diff --git a/.changeset/great-ads-yawn.md b/.changeset/great-ads-yawn.md new file mode 100644 index 0000000000..3271dde108 --- /dev/null +++ b/.changeset/great-ads-yawn.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-catalog': patch +--- + +Allow `defaultKind` from `CatalogTable.column.creatNameColumn` to be configurable diff --git a/.changeset/tender-trees-notice.md b/.changeset/tender-trees-notice.md new file mode 100644 index 0000000000..cf8c395a2d --- /dev/null +++ b/.changeset/tender-trees-notice.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-api-docs': patch +--- + +Move `EntityTypePicker` to be consistent with `CatalogPage` and remove `api:` prefix from entity names diff --git a/plugins/api-docs/src/components/ApiExplorerPage/ApiExplorerPage.tsx b/plugins/api-docs/src/components/ApiExplorerPage/ApiExplorerPage.tsx index 6d551ea0c6..2a04c5e3d7 100644 --- a/plugins/api-docs/src/components/ApiExplorerPage/ApiExplorerPage.tsx +++ b/plugins/api-docs/src/components/ApiExplorerPage/ApiExplorerPage.tsx @@ -47,6 +47,16 @@ const useStyles = makeStyles(theme => ({ }, })); +const defaultColumns: TableColumn[] = [ + CatalogTable.columns.createNameColumn({ defaultKind: 'API' }), + CatalogTable.columns.createSystemColumn(), + CatalogTable.columns.createOwnerColumn(), + CatalogTable.columns.createSpecTypeColumn(), + CatalogTable.columns.createSpecLifecycleColumn(), + CatalogTable.columns.createMetadataDescriptionColumn(), + CatalogTable.columns.createTagsColumn(), +]; + export type ApiExplorerPageProps = { initiallySelectedFilter?: UserListFilterKind; columns?: TableColumn[]; @@ -79,13 +89,13 @@ export const ApiExplorerPage = ({
- +
diff --git a/plugins/catalog/src/components/CatalogTable/columns.tsx b/plugins/catalog/src/components/CatalogTable/columns.tsx index 4f65e4b0c7..56eec730b1 100644 --- a/plugins/catalog/src/components/CatalogTable/columns.tsx +++ b/plugins/catalog/src/components/CatalogTable/columns.tsx @@ -19,13 +19,22 @@ import { OverflowTooltip, TableColumn } from '@backstage/core'; import { Chip } from '@material-ui/core'; import { EntityRow } from './types'; -export function createNameColumn(): TableColumn { +type NameColumnProps = { + defaultKind?: string; +}; + +export function createNameColumn( + props?: NameColumnProps, +): TableColumn { return { title: 'Name', field: 'resolved.name', highlight: true, render: ({ entity }) => ( - + ), }; }