chore: moved implementations to app pliugin

Signed-off-by: benjdlambert <ben@blam.sh>
This commit is contained in:
benjdlambert
2025-08-06 09:38:32 +02:00
parent 3cbba41ad4
commit 9c7ec669cf
12 changed files with 81 additions and 32 deletions
+1 -1
View File
@@ -18,9 +18,9 @@ import {
createExtension,
coreExtensionData,
createExtensionInput,
NotFoundErrorPage,
} from '@backstage/frontend-plugin-api';
import { useRoutes } from 'react-router-dom';
import { NotFoundErrorPage } from './components';
export const AppRoutes = createExtension({
name: 'routes',
+31 -8
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2023 The Backstage Authors
* Copyright 2025 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.
@@ -13,15 +13,38 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import {
NotFoundErrorPage as AdaptableNotFoundErrorPage,
Progress as AdaptableProgress,
ErrorBoundary as AdaptableErrorBoundary,
AdaptableComponentBlueprint,
} from '@backstage/frontend-plugin-api';
import { createAdaptableComponent } from '@backstage/frontend-plugin-api';
import { Progress as ProgressComponent } from '@backstage/core-components';
export const NotFoundErrorPage = createAdaptableComponent({
id: 'core.components.notFoundErrorPage',
// todo: implementation
export const Progress = AdaptableComponentBlueprint.make({
name: 'core.components.progress',
params: define =>
define({
component: AdaptableProgress,
loader: () => ProgressComponent,
}),
});
export const ErrorBoundary = createAdaptableComponent({
id: 'core.components.errorBoundaryFallback',
// todo: implementation
export const NotFoundErrorPage = AdaptableComponentBlueprint.make({
name: 'core.components.notFoundErrorPage',
params: define =>
define({
component: AdaptableNotFoundErrorPage,
loader: () => NotFoundErrorPageComponent,
}),
});
export const ErrorBoundary = AdaptableComponentBlueprint.make({
name: 'core.components.errorBoundary',
params: define =>
define({
component: AdaptableErrorBoundary,
loader: () => ErrorBoundaryComponent,
}),
});
+1 -2
View File
@@ -26,9 +26,8 @@ export { FeatureFlagsApi } from './FeatureFlagsApi';
export { TranslationsApi } from './TranslationsApi';
export { DefaultSignInPage } from './DefaultSignInPage';
export { dialogDisplayAppRootElement } from './DialogDisplay';
// todo: move these
export { ErrorBoundary, NotFoundErrorPage } from './components';
export {
oauthRequestDialogAppRootElement,
alertDisplayAppRootElement,
} from './elements';
export { Progress, NotFoundErrorPage, ErrorBoundary } from './components';
-2
View File
@@ -15,5 +15,3 @@
*/
export { appPlugin as default } from './plugin';
// todo: remove
export * from './extensions/components';
+6
View File
@@ -33,6 +33,9 @@ import {
alertDisplayAppRootElement,
DefaultSignInPage,
dialogDisplayAppRootElement,
Progress,
NotFoundErrorPage,
ErrorBoundary,
} from './extensions';
import { apis } from './defaultApis';
@@ -59,5 +62,8 @@ export const appPlugin = createFrontendPlugin({
oauthRequestDialogAppRootElement,
alertDisplayAppRootElement,
dialogDisplayAppRootElement,
Progress,
NotFoundErrorPage,
ErrorBoundary,
],
});