Merge pull request #14897 from lucahuettner/fix/one-dropdown-catalog

fix: Change the catalog header to a normal header instead of a dropdown
This commit is contained in:
Johan Haals
2022-12-01 16:52:25 +01:00
committed by GitHub
4 changed files with 21 additions and 16 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-catalog': minor
---
Removed `CatalogKindHeader` from `DefaultCatalogPage`. Deprecated `CatalogKindHeader` in favour of `EntityKindPicker`.
+1 -1
View File
@@ -73,7 +73,7 @@ export const CatalogEntityPage: () => JSX.Element;
// @public (undocumented)
export const CatalogIndexPage: (props: DefaultCatalogPageProps) => JSX.Element;
// @public (undocumented)
// @public @deprecated (undocumented)
export function CatalogKindHeader(props: CatalogKindHeaderProps): JSX.Element;
// @public
@@ -59,7 +59,10 @@ export interface CatalogKindHeaderProps {
initialFilter?: string;
}
/** @public */
/**
* @public
* @deprecated This component has been deprecated in favour of the EntityKindPicker in the list of filters. If you wish to keep this component long term make sure to raise an issue at github.com/backstage/backstage
*/
export function CatalogKindHeader(props: CatalogKindHeaderProps) {
const { initialFilter = 'component', allowedKinds } = props;
const classes = useStyles();
@@ -39,7 +39,6 @@ import {
import React, { ReactNode } from 'react';
import { createComponentRouteRef } from '../../routes';
import { CatalogTable, CatalogTableRow } from '../CatalogTable';
import { CatalogKindHeader } from '../CatalogKindHeader';
import { useCatalogPluginOptions } from '../../options';
/**
@@ -73,17 +72,15 @@ export function DefaultCatalogPage(props: DefaultCatalogPageProps) {
return (
<PageWithHeader title={`${orgName} Catalog`} themeId="home">
<EntityListProvider>
<Content>
<ContentHeader
titleComponent={<CatalogKindHeader initialFilter={initialKind} />}
>
<CreateButton
title={createButtonTitle}
to={createComponentLink && createComponentLink()}
/>
<SupportButton>All your software catalog entities</SupportButton>
</ContentHeader>
<Content>
<ContentHeader title="">
<CreateButton
title={createButtonTitle}
to={createComponentLink && createComponentLink()}
/>
<SupportButton>All your software catalog entities</SupportButton>
</ContentHeader>
<EntityListProvider>
<CatalogFilterLayout>
<CatalogFilterLayout.Filters>
<EntityKindPicker initialFilter={initialKind} />
@@ -103,8 +100,8 @@ export function DefaultCatalogPage(props: DefaultCatalogPageProps) {
/>
</CatalogFilterLayout.Content>
</CatalogFilterLayout>
</Content>
</EntityListProvider>
</EntityListProvider>
</Content>
</PageWithHeader>
);
}