diff --git a/.changeset/healthy-lions-sin.md b/.changeset/healthy-lions-sin.md new file mode 100644 index 0000000000..632b87067c --- /dev/null +++ b/.changeset/healthy-lions-sin.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-scaffolder': patch +--- + +The `ScaffolderPage` now uses the `CatalogFilterLayout`, which means the filters are put in a drawer on smaller screens. diff --git a/plugins/scaffolder/src/components/ScaffolderPage/ScaffolderPage.tsx b/plugins/scaffolder/src/components/ScaffolderPage/ScaffolderPage.tsx index 0b3fccc07c..75c04d98d9 100644 --- a/plugins/scaffolder/src/components/ScaffolderPage/ScaffolderPage.tsx +++ b/plugins/scaffolder/src/components/ScaffolderPage/ScaffolderPage.tsx @@ -27,13 +27,13 @@ import { Entity } from '@backstage/catalog-model'; import { TemplateEntityV1beta3 } from '@backstage/plugin-scaffolder-common'; import { useRouteRef } from '@backstage/core-plugin-api'; import { + CatalogFilterLayout, EntityKindPicker, EntityListProvider, EntitySearchBar, EntityTagPicker, UserListPicker, } from '@backstage/plugin-catalog-react'; -import { makeStyles } from '@material-ui/core'; import React, { ComponentType } from 'react'; import { registerComponentRouteRef } from '../../routes'; import { TemplateList } from '../TemplateList'; @@ -41,15 +41,6 @@ import { TemplateTypePicker } from '../TemplateTypePicker'; import { catalogEntityCreatePermission } from '@backstage/plugin-catalog-common'; import { usePermission } from '@backstage/plugin-permission-react'; -const useStyles = makeStyles(theme => ({ - contentWrapper: { - display: 'grid', - gridTemplateAreas: "'filters' 'grid'", - gridTemplateColumns: '250px 1fr', - gridColumnGap: theme.spacing(2), - }, -})); - export type ScaffolderPageProps = { TemplateCardComponent?: | ComponentType<{ template: TemplateEntityV1beta3 }> @@ -66,7 +57,6 @@ export const ScaffolderPageContents = ({ TemplateCardComponent, groups, }: ScaffolderPageProps) => { - const styles = useStyles(); const registerComponentLink = useRouteRef(registerComponentRouteRef); const otherTemplatesGroup = { title: groups ? 'Other Templates' : 'Templates', @@ -104,8 +94,8 @@ export const ScaffolderPageContents = ({ -
-
+ +
-
+ + {groups && groups.map((group, index) => ( -
-
+ + );