diff --git a/packages/app-next/src/App.tsx b/packages/app-next/src/App.tsx
index ccfeb61b58..d7ec30bf95 100644
--- a/packages/app-next/src/App.tsx
+++ b/packages/app-next/src/App.tsx
@@ -17,7 +17,7 @@
import React from 'react';
import { createApp } from '@backstage/frontend-app-api';
import { pagesPlugin } from './examples/pagesPlugin';
-import { CustomNotFoundErrorPage } from './examples/notFoundErrorPageExtension';
+import notFoundErrorPage from './examples/notFoundErrorPageExtension';
import graphiqlPlugin from '@backstage/plugin-graphiql/alpha';
import techRadarPlugin from '@backstage/plugin-tech-radar/alpha';
import userSettingsPlugin from '@backstage/plugin-user-settings/alpha';
@@ -33,10 +33,7 @@ import {
} from '@backstage/frontend-plugin-api';
import techdocsPlugin from '@backstage/plugin-techdocs/alpha';
import { homePage } from './HomePage';
-import {
- collectLegacyComponents,
- collectLegacyRoutes,
-} from '@backstage/core-compat-api';
+import { collectLegacyRoutes } from '@backstage/core-compat-api';
import { FlatRoutes } from '@backstage/core-app-api';
import { Route } from 'react-router';
import { CatalogImportPage } from '@backstage/plugin-catalog-import';
@@ -118,10 +115,6 @@ const collectedLegacyPlugins = collectLegacyRoutes(
,
);
-const legacyAppComponents = collectLegacyComponents({
- NotFoundErrorPage: CustomNotFoundErrorPage,
-});
-
const app = createApp({
features: [
graphiqlPlugin,
@@ -137,7 +130,7 @@ const app = createApp({
scmAuthExtension,
scmIntegrationApi,
signInPage,
- ...legacyAppComponents,
+ notFoundErrorPage,
],
}),
],
diff --git a/packages/app-next/src/examples/notFoundErrorPageExtension.tsx b/packages/app-next/src/examples/notFoundErrorPageExtension.tsx
index 82acc25fb5..6cdaff978f 100644
--- a/packages/app-next/src/examples/notFoundErrorPageExtension.tsx
+++ b/packages/app-next/src/examples/notFoundErrorPageExtension.tsx
@@ -36,15 +36,9 @@ export function CustomNotFoundErrorPage() {
>
404
- Bowie was unable to locate this page. Please contact your support team
- if this page used to exist.
+ Unable to locate this page. Please contact your support team if this
+ page used to exist.
-
import { AnyRouteRefParams } from '@backstage/core-plugin-api';
-import { AppComponents } from '@backstage/core-plugin-api';
import { BackstagePlugin } from '@backstage/frontend-plugin-api';
-import { ExtensionDefinition } from '@backstage/frontend-plugin-api';
import { ExtensionOverrides } from '@backstage/frontend-plugin-api';
import { ExternalRouteRef } from '@backstage/core-plugin-api';
import { ExternalRouteRef as ExternalRouteRef_2 } from '@backstage/frontend-plugin-api';
@@ -18,11 +16,6 @@ import { RouteRef as RouteRef_2 } from '@backstage/frontend-plugin-api';
import { SubRouteRef } from '@backstage/core-plugin-api';
import { SubRouteRef as SubRouteRef_2 } from '@backstage/frontend-plugin-api';
-// @public (undocumented)
-export function collectLegacyComponents(
- components: Partial,
-): ExtensionDefinition[];
-
// @public (undocumented)
export function collectLegacyRoutes(
flatRoutesElement: JSX.Element,
diff --git a/packages/core-compat-api/src/collectLegacyComponents.test.tsx b/packages/core-compat-api/src/collectLegacyComponents.test.tsx
deleted file mode 100644
index 7ca11a777e..0000000000
--- a/packages/core-compat-api/src/collectLegacyComponents.test.tsx
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright 2023 The Backstage Authors
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import React from 'react';
-
-import { collectLegacyComponents } from './collectLegacyComponents';
-
-describe('collectLegacyComponents', () => {
- const components = {
- Progress: () =>
Progress
,
- BootErrorPage: () =>
BootErrorPage
,
- NotFoundErrorPage: () =>
NotFoundErrorPage
,
- ErrorBoundaryFallback: () =>
ErrorBoundaryFallback
,
- };
-
- it('should collect legacy routes', () => {
- const collected = collectLegacyComponents(components);
-
- expect(
- collected.map(p => ({
- kind: p.kind,
- namespace: p.namespace,
- attachTo: p.attachTo,
- disabled: p.disabled,
- })),
- ).toEqual([
- {
- kind: 'component',
- namespace: 'core.components.progress',
- attachTo: { id: 'core', input: 'components' },
- disabled: false,
- },
- {
- kind: 'component',
- namespace: 'core.components.bootErrorPage',
- attachTo: { id: 'core', input: 'components' },
- disabled: false,
- },
- {
- kind: 'component',
- namespace: 'core.components.notFoundErrorPage',
- attachTo: { id: 'core', input: 'components' },
- disabled: false,
- },
- {
- kind: 'component',
- namespace: 'core.components.errorBoundaryFallback',
- attachTo: { id: 'core', input: 'components' },
- disabled: false,
- },
- ]);
- });
-});
diff --git a/packages/core-compat-api/src/collectLegacyComponents.tsx b/packages/core-compat-api/src/collectLegacyComponents.tsx
deleted file mode 100644
index 6ae6df7cff..0000000000
--- a/packages/core-compat-api/src/collectLegacyComponents.tsx
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright 2023 The Backstage Authors
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import {
- ComponentRef,
- createComponentExtension,
- coreComponentsRefs,
- ExtensionDefinition,
-} from '@backstage/frontend-plugin-api';
-import { AppComponents } from '@backstage/core-plugin-api';
-
-type ComponentTypes = T[keyof T];
-
-const refs: Record> = {
- Progress: coreComponentsRefs.progress,
- BootErrorPage: coreComponentsRefs.bootErrorPage,
- NotFoundErrorPage: coreComponentsRefs.notFoundErrorPage,
- ErrorBoundaryFallback: coreComponentsRefs.errorBoundaryFallback,
-};
-
-/** @public */
-export function collectLegacyComponents(components: Partial) {
- return Object.entries(components).reduce[]>(
- (extensions, [name, component]) => {
- const ref = refs[name];
- return ref
- ? extensions.concat(
- createComponentExtension({
- ref,
- component: { sync: () => component },
- }),
- )
- : extensions;
- },
- [],
- );
-}
diff --git a/packages/core-compat-api/src/index.ts b/packages/core-compat-api/src/index.ts
index d31513e559..421ced7054 100644
--- a/packages/core-compat-api/src/index.ts
+++ b/packages/core-compat-api/src/index.ts
@@ -14,6 +14,5 @@
* limitations under the License.
*/
export { collectLegacyRoutes } from './collectLegacyRoutes';
-export { collectLegacyComponents } from './collectLegacyComponents';
export { convertLegacyApp } from './convertLegacyApp';
export { convertLegacyRouteRef } from './convertLegacyRouteRef';