From 5e10974af6c614df6f4828c5c97a2846d340e081 Mon Sep 17 00:00:00 2001 From: jrusso1020 Date: Sun, 24 Oct 2021 13:28:15 -0400 Subject: [PATCH] Export components so developers can customize the scaffolder page This is the first step to allow developers to customize the scaffolder page. With this work all the scaffolder page is now available to backstage developers and they can customize the current scaffolder page how they like similar to what is available for the catalog page and other plugin pages. Future work that has been discussed is possibly allowing for SwimLane components that will allow developers to surface specific templates or organize templates in specific ways Signed-off-by: jrusso1020 --- .changeset/friendly-olives-drop.md | 5 ++++ plugins/scaffolder/api-report.md | 23 +++++++++++++++++++ .../src/components/TemplateList/index.ts | 1 + plugins/scaffolder/src/index.ts | 3 +++ 4 files changed, 32 insertions(+) create mode 100644 .changeset/friendly-olives-drop.md diff --git a/.changeset/friendly-olives-drop.md b/.changeset/friendly-olives-drop.md new file mode 100644 index 0000000000..371cf0e4db --- /dev/null +++ b/.changeset/friendly-olives-drop.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-scaffolder': patch +--- + +Surfacing all components of the ScaffolderPage outside of the plugin so you can customize the page diff --git a/plugins/scaffolder/api-report.md b/plugins/scaffolder/api-report.md index 740685e922..554fccabb7 100644 --- a/plugins/scaffolder/api-report.md +++ b/plugins/scaffolder/api-report.md @@ -240,6 +240,29 @@ const scaffolderPlugin: BackstagePlugin< export { scaffolderPlugin as plugin }; export { scaffolderPlugin }; +// Warning: (ae-missing-release-tag) "TemplateList" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export const TemplateList: ({ + TemplateCardComponent, +}: TemplateListProps) => JSX.Element; + +// Warning: (ae-missing-release-tag) "TemplateListProps" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export type TemplateListProps = { + TemplateCardComponent?: + | ComponentType<{ + template: TemplateEntityV1beta2; + }> + | undefined; +}; + +// Warning: (ae-missing-release-tag) "TemplateTypePicker" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export const TemplateTypePicker: () => JSX.Element | null; + // Warning: (ae-missing-release-tag) "TextValuePicker" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) diff --git a/plugins/scaffolder/src/components/TemplateList/index.ts b/plugins/scaffolder/src/components/TemplateList/index.ts index b9ec700d74..0b62f9cbb1 100644 --- a/plugins/scaffolder/src/components/TemplateList/index.ts +++ b/plugins/scaffolder/src/components/TemplateList/index.ts @@ -14,3 +14,4 @@ * limitations under the License. */ export { TemplateList } from './TemplateList'; +export type { TemplateListProps } from './TemplateList'; diff --git a/plugins/scaffolder/src/index.ts b/plugins/scaffolder/src/index.ts index 4de701bf7a..0180c24b90 100644 --- a/plugins/scaffolder/src/index.ts +++ b/plugins/scaffolder/src/index.ts @@ -44,3 +44,6 @@ export { TextValuePicker, } from './components/fields'; export { FavouriteTemplate } from './components/FavouriteTemplate'; +export { TemplateList } from './components/TemplateList'; +export type { TemplateListProps } from './components/TemplateList'; +export { TemplateTypePicker } from './components/TemplateTypePicker';