From a77cb4016f0b663a7720ea89abf8953f8de61e37 Mon Sep 17 00:00:00 2001 From: MT Lewis Date: Fri, 20 Sep 2024 11:08:38 +0100 Subject: [PATCH] techdocs: make emptyState input optional on entityContent extension Signed-off-by: MT Lewis --- .changeset/fifty-trainers-watch.md | 6 ++++++ plugins/techdocs/api-report-alpha.md | 4 +++- plugins/techdocs/src/alpha.tsx | 11 +++++++---- 3 files changed, 16 insertions(+), 5 deletions(-) create mode 100644 .changeset/fifty-trainers-watch.md diff --git a/.changeset/fifty-trainers-watch.md b/.changeset/fifty-trainers-watch.md new file mode 100644 index 0000000000..5cef1ad2b2 --- /dev/null +++ b/.changeset/fifty-trainers-watch.md @@ -0,0 +1,6 @@ +--- +'@backstage/plugin-techdocs': patch +--- + +Make `emptyState` input optional on `entity-content:techdocs` extension so that +the default empty state extension works correctly. diff --git a/plugins/techdocs/api-report-alpha.md b/plugins/techdocs/api-report-alpha.md index 19bdccc948..63e078dd43 100644 --- a/plugins/techdocs/api-report-alpha.md +++ b/plugins/techdocs/api-report-alpha.md @@ -229,7 +229,9 @@ const _default: FrontendPlugin< ConfigurableExtensionDataRef< React_2.JSX.Element, 'core.reactElement', - {} + { + optional: true; + } >, { singleton: true; diff --git a/plugins/techdocs/src/alpha.tsx b/plugins/techdocs/src/alpha.tsx index 2299b56be9..e0e1c1761e 100644 --- a/plugins/techdocs/src/alpha.tsx +++ b/plugins/techdocs/src/alpha.tsx @@ -157,10 +157,13 @@ const techDocsReaderPage = PageBlueprint.make({ */ const techDocsEntityContent = EntityContentBlueprint.makeWithOverrides({ inputs: { - emptyState: createExtensionInput([coreExtensionData.reactElement], { - singleton: true, - optional: true, - }), + emptyState: createExtensionInput( + [coreExtensionData.reactElement.optional()], + { + singleton: true, + optional: true, + }, + ), }, factory(originalFactory, context) { return originalFactory(