From d02db50b426e5a3d3e4c9ca13d5bd03eaa6e9664 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sun, 23 Nov 2025 00:51:55 +0100 Subject: [PATCH] plugins: cleanup unnecessary use of compatWrapper Signed-off-by: Patrik Oldsberg --- .changeset/metal-humans-lose.md | 21 +++++ plugins/api-docs/src/alpha.tsx | 88 ++++++++----------- plugins/catalog-graph/src/alpha.tsx | 17 ++-- plugins/catalog-import/src/alpha.tsx | 17 ++-- .../src/alpha/plugin.tsx | 11 +-- .../catalog/src/alpha/contextMenuItems.tsx | 33 ++++--- plugins/catalog/src/alpha/entityCards.tsx | 59 ++++++------- plugins/catalog/src/alpha/pages.tsx | 11 +-- plugins/devtools/src/alpha/plugin.tsx | 9 +- plugins/home/package.json | 1 - plugins/home/src/alpha.tsx | 15 ++-- .../kubernetes/src/alpha/entityContents.tsx | 5 +- plugins/kubernetes/src/alpha/pages.tsx | 9 +- plugins/notifications/src/alpha.tsx | 7 +- plugins/org/src/alpha.tsx | 51 +++++------ plugins/scaffolder/src/alpha/extensions.tsx | 13 +-- plugins/search/src/alpha.tsx | 5 +- plugins/techdocs/src/alpha/index.tsx | 32 +++---- plugins/user-settings/src/alpha.tsx | 17 ++-- 19 files changed, 186 insertions(+), 235 deletions(-) create mode 100644 .changeset/metal-humans-lose.md diff --git a/.changeset/metal-humans-lose.md b/.changeset/metal-humans-lose.md new file mode 100644 index 0000000000..490ae28ab2 --- /dev/null +++ b/.changeset/metal-humans-lose.md @@ -0,0 +1,21 @@ +--- +'@backstage/plugin-catalog-unprocessed-entities': patch +'@backstage/plugin-app-visualizer': patch +'@backstage/plugin-catalog-import': patch +'@backstage/plugin-catalog-graph': patch +'@backstage/plugin-catalog-react': patch +'@backstage/plugin-notifications': patch +'@backstage/plugin-user-settings': patch +'@backstage/plugin-kubernetes': patch +'@backstage/plugin-scaffolder': patch +'@backstage/plugin-api-docs': patch +'@backstage/plugin-devtools': patch +'@backstage/plugin-techdocs': patch +'@backstage/plugin-catalog': patch +'@backstage/plugin-search': patch +'@backstage/plugin-home': patch +'@backstage/plugin-app': patch +'@backstage/plugin-org': patch +--- + +Remove unnecessary use of `compatWrapper` for the new frontend system. diff --git a/plugins/api-docs/src/alpha.tsx b/plugins/api-docs/src/alpha.tsx index 7693b97259..87dccdf713 100644 --- a/plugins/api-docs/src/alpha.tsx +++ b/plugins/api-docs/src/alpha.tsx @@ -23,10 +23,7 @@ import { createFrontendPlugin, } from '@backstage/frontend-plugin-api'; -import { - compatWrapper, - convertLegacyRouteRef, -} from '@backstage/core-compat-api'; +import { convertLegacyRouteRef } from '@backstage/core-compat-api'; import { ApiEntity, @@ -48,7 +45,7 @@ const apiDocsNavItem = NavItemBlueprint.make({ params: { title: 'APIs', routeRef: convertLegacyRouteRef(rootRoute), - icon: () => compatWrapper(), + icon: () => , }, }); @@ -82,13 +79,11 @@ const apiDocsExplorerPage = PageBlueprint.makeWithOverrides({ path: '/api-docs', routeRef: convertLegacyRouteRef(rootRoute), loader: () => - import('./components/ApiExplorerPage').then(m => - compatWrapper( - , - ), - ), + import('./components/ApiExplorerPage').then(m => ( + + )), }); }, }); @@ -109,10 +104,7 @@ const apiDocsHasApisEntityCard = EntityCardBlueprint.make({ )!! ); }, - loader: () => - import('./components/ApisCards').then(m => - compatWrapper(), - ), + loader: () => import('./components/ApisCards').then(m => ), }, }); @@ -121,9 +113,9 @@ const apiDocsDefinitionEntityCard = EntityCardBlueprint.make({ params: { filter: 'kind:api', loader: () => - import('./components/ApiDefinitionCard').then(m => - compatWrapper(), - ), + import('./components/ApiDefinitionCard').then(m => ( + + )), }, }); @@ -135,9 +127,7 @@ const apiDocsConsumedApisEntityCard = EntityCardBlueprint.make({ // See: https://github.com/backstage/backstage/pull/22619#discussion_r1477333252 filter: 'kind:component', loader: () => - import('./components/ApisCards').then(m => - compatWrapper(), - ), + import('./components/ApisCards').then(m => ), }, }); @@ -149,9 +139,7 @@ const apiDocsProvidedApisEntityCard = EntityCardBlueprint.make({ // See: https://github.com/backstage/backstage/pull/22619#discussion_r1477333252 filter: 'kind:component', loader: () => - import('./components/ApisCards').then(m => - compatWrapper(), - ), + import('./components/ApisCards').then(m => ), }, }); @@ -163,9 +151,9 @@ const apiDocsConsumingComponentsEntityCard = EntityCardBlueprint.make({ // See: https://github.com/backstage/backstage/pull/22619#discussion_r1477333252 filter: 'kind:api', loader: () => - import('./components/ComponentsCards').then(m => - compatWrapper(), - ), + import('./components/ComponentsCards').then(m => ( + + )), }, }); @@ -177,9 +165,9 @@ const apiDocsProvidingComponentsEntityCard = EntityCardBlueprint.make({ // See: https://github.com/backstage/backstage/pull/22619#discussion_r1477333252 filter: 'kind:api', loader: () => - import('./components/ComponentsCards').then(m => - compatWrapper(), - ), + import('./components/ComponentsCards').then(m => ( + + )), }, }); @@ -190,15 +178,13 @@ const apiDocsDefinitionEntityContent = EntityContentBlueprint.make({ title: 'Definition', filter: 'kind:api', loader: async () => - import('./components/ApiDefinitionCard').then(m => - compatWrapper( - - - - - , - ), - ), + import('./components/ApiDefinitionCard').then(m => ( + + + + + + )), }, }); @@ -209,18 +195,16 @@ const apiDocsApisEntityContent = EntityContentBlueprint.make({ title: 'APIs', filter: 'kind:component', loader: async () => - import('./components/ApisCards').then(m => - compatWrapper( - - - - - - - - , - ), - ), + import('./components/ApisCards').then(m => ( + + + + + + + + + )), }, }); diff --git a/plugins/catalog-graph/src/alpha.tsx b/plugins/catalog-graph/src/alpha.tsx index 9a7f15e553..bd9726513b 100644 --- a/plugins/catalog-graph/src/alpha.tsx +++ b/plugins/catalog-graph/src/alpha.tsx @@ -19,10 +19,7 @@ import { createFrontendPlugin, PageBlueprint, } from '@backstage/frontend-plugin-api'; -import { - compatWrapper, - convertLegacyRouteRef, -} from '@backstage/core-compat-api'; +import { convertLegacyRouteRef } from '@backstage/core-compat-api'; import { EntityCardBlueprint } from '@backstage/plugin-catalog-react/alpha'; import { catalogGraphRouteRef, catalogEntityRouteRef } from './routes'; import { @@ -53,9 +50,9 @@ const CatalogGraphEntityCard = EntityCardBlueprint.makeWithOverrides({ factory(originalFactory, { config }) { return originalFactory({ loader: async () => - import('./components/CatalogGraphCard').then(m => - compatWrapper(), - ), + import('./components/CatalogGraphCard').then(m => ( + + )), }); }, }); @@ -83,9 +80,9 @@ const CatalogGraphPage = PageBlueprint.makeWithOverrides({ path: '/catalog-graph', routeRef: convertLegacyRouteRef(catalogGraphRouteRef), loader: () => - import('./components/CatalogGraphPage').then(m => - compatWrapper(), - ), + import('./components/CatalogGraphPage').then(m => ( + + )), }); }, }); diff --git a/plugins/catalog-import/src/alpha.tsx b/plugins/catalog-import/src/alpha.tsx index 2d9e5deaba..42caa06f42 100644 --- a/plugins/catalog-import/src/alpha.tsx +++ b/plugins/catalog-import/src/alpha.tsx @@ -19,10 +19,7 @@ import { discoveryApiRef, fetchApiRef, } from '@backstage/core-plugin-api'; -import { - compatWrapper, - convertLegacyRouteRef, -} from '@backstage/core-compat-api'; +import { convertLegacyRouteRef } from '@backstage/core-compat-api'; import { createFrontendPlugin, PageBlueprint, @@ -47,13 +44,11 @@ const catalogImportPage = PageBlueprint.make({ path: '/catalog-import', routeRef: convertLegacyRouteRef(rootRouteRef), loader: () => - import('./components/ImportPage').then(m => - compatWrapper( - - - , - ), - ), + import('./components/ImportPage').then(m => ( + + + + )), }, }); diff --git a/plugins/catalog-unprocessed-entities/src/alpha/plugin.tsx b/plugins/catalog-unprocessed-entities/src/alpha/plugin.tsx index 39a51184d3..2b39f941fa 100644 --- a/plugins/catalog-unprocessed-entities/src/alpha/plugin.tsx +++ b/plugins/catalog-unprocessed-entities/src/alpha/plugin.tsx @@ -27,10 +27,7 @@ import { catalogUnprocessedEntitiesApiRef, CatalogUnprocessedEntitiesClient, } from '../api'; -import { - compatWrapper, - convertLegacyRouteRef, -} from '@backstage/core-compat-api'; +import { convertLegacyRouteRef } from '@backstage/core-compat-api'; import QueueIcon from '@material-ui/icons/Queue'; import { rootRouteRef } from '../routes'; @@ -54,9 +51,9 @@ export const catalogUnprocessedEntitiesPage = PageBlueprint.make({ path: '/catalog-unprocessed-entities', routeRef: convertLegacyRouteRef(rootRouteRef), loader: () => - import('../components/UnprocessedEntities').then(m => - compatWrapper(), - ), + import('../components/UnprocessedEntities').then(m => ( + + )), }, }); diff --git a/plugins/catalog/src/alpha/contextMenuItems.tsx b/plugins/catalog/src/alpha/contextMenuItems.tsx index 4173a4d074..4b37321c6f 100644 --- a/plugins/catalog/src/alpha/contextMenuItems.tsx +++ b/plugins/catalog/src/alpha/contextMenuItems.tsx @@ -37,7 +37,6 @@ import { import { rootRouteRef, unregisterRedirectRouteRef } from '../routes'; import { catalogEntityDeletePermission } from '@backstage/plugin-catalog-common/alpha'; import { useEffect } from 'react'; -import { compatWrapper } from '@backstage/core-compat-api'; export const copyEntityUrlContextMenuItem = EntityContextMenuItemBlueprint.make( { @@ -111,23 +110,21 @@ export const unregisterEntityContextMenuItem = title: t('entityContextMenu.unregisterMenuTitle'), disabled: !unregisterPermission.allowed, onClick: async () => { - dialogApi.showModal(({ dialog }: { dialog: DialogApiDialog }) => - compatWrapper( - dialog.close()} - onConfirm={() => { - dialog.close(); - navigate( - unregisterRedirectRoute - ? unregisterRedirectRoute() - : catalogRoute(), - ); - }} - />, - ), - ); + dialogApi.showModal(({ dialog }: { dialog: DialogApiDialog }) => ( + dialog.close()} + onConfirm={() => { + dialog.close(); + navigate( + unregisterRedirectRoute + ? unregisterRedirectRoute() + : catalogRoute(), + ); + }} + /> + )); }, }; }, diff --git a/plugins/catalog/src/alpha/entityCards.tsx b/plugins/catalog/src/alpha/entityCards.tsx index f99c5961a1..6df50a5123 100644 --- a/plugins/catalog/src/alpha/entityCards.tsx +++ b/plugins/catalog/src/alpha/entityCards.tsx @@ -18,7 +18,6 @@ import { EntityIconLinkBlueprint, EntityCardBlueprint, } from '@backstage/plugin-catalog-react/alpha'; -import { compatWrapper } from '@backstage/core-compat-api'; import { createExtensionInput } from '@backstage/frontend-plugin-api'; import { HeaderIconLinkRow, @@ -65,8 +64,8 @@ export const catalogAboutEntityCard = EntityCardBlueprint.makeWithOverrides({ const { InternalAboutCard } = await import( '../components/AboutCard/AboutCard' ); - return compatWrapper( - } />, + return ( + } /> ); }, }); @@ -79,9 +78,9 @@ export const catalogLinksEntityCard = EntityCardBlueprint.make({ type: 'info', filter: { 'metadata.links': { $exists: true } }, loader: async () => - import('../components/EntityLinksCard').then(m => - compatWrapper(), - ), + import('../components/EntityLinksCard').then(m => ( + + )), }, }); @@ -91,9 +90,9 @@ export const catalogLabelsEntityCard = EntityCardBlueprint.make({ type: 'info', filter: { 'metadata.labels': { $exists: true } }, loader: async () => - import('../components/EntityLabelsCard').then(m => - compatWrapper(), - ), + import('../components/EntityLabelsCard').then(m => ( + + )), }, }); @@ -102,9 +101,9 @@ export const catalogDependsOnComponentsEntityCard = EntityCardBlueprint.make({ params: { filter: { kind: 'component' }, loader: async () => - import('../components/DependsOnComponentsCard').then(m => - compatWrapper(), - ), + import('../components/DependsOnComponentsCard').then(m => ( + + )), }, }); @@ -113,9 +112,9 @@ export const catalogDependsOnResourcesEntityCard = EntityCardBlueprint.make({ params: { filter: { kind: 'component' }, loader: async () => - import('../components/DependsOnResourcesCard').then(m => - compatWrapper(), - ), + import('../components/DependsOnResourcesCard').then(m => ( + + )), }, }); @@ -124,9 +123,9 @@ export const catalogHasComponentsEntityCard = EntityCardBlueprint.make({ params: { filter: { kind: 'system' }, loader: async () => - import('../components/HasComponentsCard').then(m => - compatWrapper(), - ), + import('../components/HasComponentsCard').then(m => ( + + )), }, }); @@ -135,9 +134,9 @@ export const catalogHasResourcesEntityCard = EntityCardBlueprint.make({ params: { filter: { kind: 'system' }, loader: async () => - import('../components/HasResourcesCard').then(m => - compatWrapper(), - ), + import('../components/HasResourcesCard').then(m => ( + + )), }, }); @@ -146,9 +145,9 @@ export const catalogHasSubcomponentsEntityCard = EntityCardBlueprint.make({ params: { filter: { kind: 'component' }, loader: async () => - import('../components/HasSubcomponentsCard').then(m => - compatWrapper(), - ), + import('../components/HasSubcomponentsCard').then(m => ( + + )), }, }); @@ -157,9 +156,9 @@ export const catalogHasSubdomainsEntityCard = EntityCardBlueprint.make({ params: { filter: { kind: 'domain' }, loader: async () => - import('../components/HasSubdomainsCard').then(m => - compatWrapper(), - ), + import('../components/HasSubdomainsCard').then(m => ( + + )), }, }); @@ -168,9 +167,9 @@ export const catalogHasSystemsEntityCard = EntityCardBlueprint.make({ params: { filter: { kind: 'domain' }, loader: async () => - import('../components/HasSystemsCard').then(m => - compatWrapper(), - ), + import('../components/HasSystemsCard').then(m => ( + + )), }, }); diff --git a/plugins/catalog/src/alpha/pages.tsx b/plugins/catalog/src/alpha/pages.tsx index 9d4e3b4bac..616e6f3a29 100644 --- a/plugins/catalog/src/alpha/pages.tsx +++ b/plugins/catalog/src/alpha/pages.tsx @@ -14,10 +14,7 @@ * limitations under the License. */ -import { - compatWrapper, - convertLegacyRouteRef, -} from '@backstage/core-compat-api'; +import { convertLegacyRouteRef } from '@backstage/core-compat-api'; import { coreExtensionData, createExtensionInput, @@ -65,11 +62,11 @@ export const catalogPage = PageBlueprint.makeWithOverrides({ const filters = inputs.filters.map(filter => filter.get(coreExtensionData.reactElement), ); - return compatWrapper( + return ( {filters}} pagination={config.pagination} - />, + /> ); }, }); @@ -220,7 +217,7 @@ export const catalogEntityPage = PageBlueprint.makeWithOverrides({ ); }; - return compatWrapper(); + return ; }, }); }, diff --git a/plugins/devtools/src/alpha/plugin.tsx b/plugins/devtools/src/alpha/plugin.tsx index 0f6d9ec4a1..a331a53243 100644 --- a/plugins/devtools/src/alpha/plugin.tsx +++ b/plugins/devtools/src/alpha/plugin.tsx @@ -24,10 +24,7 @@ import { } from '@backstage/frontend-plugin-api'; import { devToolsApiRef, DevToolsClient } from '../api'; -import { - compatWrapper, - convertLegacyRouteRef, -} from '@backstage/core-compat-api'; +import { convertLegacyRouteRef } from '@backstage/core-compat-api'; import BuildIcon from '@material-ui/icons/Build'; import { rootRouteRef } from '../routes'; @@ -51,9 +48,7 @@ export const devToolsPage = PageBlueprint.make({ path: '/devtools', routeRef: convertLegacyRouteRef(rootRouteRef), loader: () => - import('../components/DevToolsPage').then(m => - compatWrapper(), - ), + import('../components/DevToolsPage').then(m => ), }, }); diff --git a/plugins/home/package.json b/plugins/home/package.json index 4bc9361884..e15b2f5866 100644 --- a/plugins/home/package.json +++ b/plugins/home/package.json @@ -60,7 +60,6 @@ "@backstage/catalog-model": "workspace:^", "@backstage/config": "workspace:^", "@backstage/core-app-api": "workspace:^", - "@backstage/core-compat-api": "workspace:^", "@backstage/core-components": "workspace:^", "@backstage/core-plugin-api": "workspace:^", "@backstage/frontend-plugin-api": "workspace:^", diff --git a/plugins/home/src/alpha.tsx b/plugins/home/src/alpha.tsx index a92316c7f0..6cad71d643 100644 --- a/plugins/home/src/alpha.tsx +++ b/plugins/home/src/alpha.tsx @@ -26,7 +26,6 @@ import { storageApiRef, ApiBlueprint, } from '@backstage/frontend-plugin-api'; -import { compatWrapper } from '@backstage/core-compat-api'; import { VisitListener } from './components/'; import { visitsApiRef, VisitsStorageApi } from './api'; @@ -57,14 +56,12 @@ const homePage = PageBlueprint.makeWithOverrides({ path: '/home', routeRef: rootRouteRef, loader: () => - import('./components/').then(m => - compatWrapper( - , - ), - ), + import('./components/').then(m => ( + + )), }); }, }); diff --git a/plugins/kubernetes/src/alpha/entityContents.tsx b/plugins/kubernetes/src/alpha/entityContents.tsx index d75893c6e4..0a85cadaed 100644 --- a/plugins/kubernetes/src/alpha/entityContents.tsx +++ b/plugins/kubernetes/src/alpha/entityContents.tsx @@ -14,7 +14,6 @@ * limitations under the License. */ -import { compatWrapper } from '@backstage/core-compat-api'; import { EntityContentBlueprint } from '@backstage/plugin-catalog-react/alpha'; import { isKubernetesAvailable } from '../Router'; @@ -26,8 +25,6 @@ export const entityKubernetesContent = EntityContentBlueprint.make({ group: 'deployment', filter: isKubernetesAvailable, loader: () => - import('./KubernetesContentPage').then(m => - compatWrapper(), - ), + import('./KubernetesContentPage').then(m => ), }, }); diff --git a/plugins/kubernetes/src/alpha/pages.tsx b/plugins/kubernetes/src/alpha/pages.tsx index 6a2d98ddcc..23e78f9264 100644 --- a/plugins/kubernetes/src/alpha/pages.tsx +++ b/plugins/kubernetes/src/alpha/pages.tsx @@ -14,11 +14,8 @@ * limitations under the License. */ -import { PageBlueprint } from '@backstage/frontend-plugin-api'; // Add this line to import React -import { - compatWrapper, - convertLegacyRouteRef, -} from '@backstage/core-compat-api'; +import { PageBlueprint } from '@backstage/frontend-plugin-api'; +import { convertLegacyRouteRef } from '@backstage/core-compat-api'; import { rootCatalogKubernetesRouteRef } from '../plugin'; export const kubernetesPage = PageBlueprint.make({ @@ -28,6 +25,6 @@ export const kubernetesPage = PageBlueprint.make({ // by wrapping into the convertLegacyRouteRef. routeRef: convertLegacyRouteRef(rootCatalogKubernetesRouteRef), // these inputs usually match the props required by the component. - loader: () => import('../Router').then(m => compatWrapper()), + loader: () => import('../Router').then(m => ), }, }); diff --git a/plugins/notifications/src/alpha.tsx b/plugins/notifications/src/alpha.tsx index ca4be58209..6d32150c35 100644 --- a/plugins/notifications/src/alpha.tsx +++ b/plugins/notifications/src/alpha.tsx @@ -23,7 +23,6 @@ import { } from '@backstage/frontend-plugin-api'; import { rootRouteRef } from './routes'; import { - compatWrapper, convertLegacyRouteRef, convertLegacyRouteRefs, } from '@backstage/core-compat-api'; @@ -34,9 +33,9 @@ const page = PageBlueprint.make({ path: '/notifications', routeRef: convertLegacyRouteRef(rootRouteRef), loader: () => - import('./components/NotificationsPage').then(m => - compatWrapper(), - ), + import('./components/NotificationsPage').then(m => ( + + )), }, }); diff --git a/plugins/org/src/alpha.tsx b/plugins/org/src/alpha.tsx index ddb8094688..6e158436c3 100644 --- a/plugins/org/src/alpha.tsx +++ b/plugins/org/src/alpha.tsx @@ -14,10 +14,7 @@ * limitations under the License. */ -import { - compatWrapper, - convertLegacyRouteRefs, -} from '@backstage/core-compat-api'; +import { convertLegacyRouteRefs } from '@backstage/core-compat-api'; import { createFrontendPlugin } from '@backstage/frontend-plugin-api'; import { catalogIndexRouteRef } from './routes'; import { EntityCardBlueprint } from '@backstage/plugin-catalog-react/alpha'; @@ -29,8 +26,8 @@ const EntityGroupProfileCard = EntityCardBlueprint.make({ type: 'info', filter: { kind: 'group' }, loader: async () => - import('./components/Cards/Group/GroupProfile/GroupProfileCard').then(m => - compatWrapper(), + import('./components/Cards/Group/GroupProfile/GroupProfileCard').then( + m => , ), }, }); @@ -49,12 +46,12 @@ const EntityMembersListCard = EntityCardBlueprint.makeWithOverrides({ return originalFactory({ filter: { kind: 'group' }, loader: async () => - import('./components/Cards/Group/MembersList/MembersListCard').then(m => - compatWrapper( + import('./components/Cards/Group/MembersList/MembersListCard').then( + m => ( , + /> ), ), }); @@ -75,19 +72,16 @@ const EntityOwnershipCard = EntityCardBlueprint.makeWithOverrides({ return originalFactory({ filter: { kind: { $in: ['group', 'user'] } }, loader: async () => - import('./components/Cards/OwnershipCard/OwnershipCard').then(m => - compatWrapper( - , - ), - ), + import('./components/Cards/OwnershipCard/OwnershipCard').then(m => ( + + )), }); }, }); @@ -107,13 +101,12 @@ const EntityUserProfileCard = EntityCardBlueprint.makeWithOverrides({ filter: { kind: 'user' }, loader: async () => import('./components/Cards/User/UserProfileCard/UserProfileCard').then( - m => - compatWrapper( - , - ), + m => ( + + ), ), }); }, diff --git a/plugins/scaffolder/src/alpha/extensions.tsx b/plugins/scaffolder/src/alpha/extensions.tsx index cb69e691b8..30054ece6e 100644 --- a/plugins/scaffolder/src/alpha/extensions.tsx +++ b/plugins/scaffolder/src/alpha/extensions.tsx @@ -14,10 +14,7 @@ * limitations under the License. */ -import { - compatWrapper, - convertLegacyRouteRef, -} from '@backstage/core-compat-api'; +import { convertLegacyRouteRef } from '@backstage/core-compat-api'; import { ApiBlueprint, createExtensionInput, @@ -48,11 +45,9 @@ export const scaffolderPage = PageBlueprint.makeWithOverrides({ routeRef: convertLegacyRouteRef(rootRouteRef), path: '/create', loader: () => - import('../components/Router/Router').then(m => - compatWrapper( - , - ), - ), + import('../components/Router/Router').then(m => ( + + )), }); }, }); diff --git a/plugins/search/src/alpha.tsx b/plugins/search/src/alpha.tsx index 97bd7dfe87..eb98f70ee0 100644 --- a/plugins/search/src/alpha.tsx +++ b/plugins/search/src/alpha.tsx @@ -69,7 +69,6 @@ import { SearchClient } from './apis'; import { SearchType } from './components/SearchType'; import { UrlUpdater } from './components/SearchPage/SearchPage'; import { - compatWrapper, convertLegacyRouteRef, convertLegacyRouteRefs, } from '@backstage/core-compat-api'; @@ -254,11 +253,11 @@ export const searchPage = PageBlueprint.makeWithOverrides({ ); }; - return compatWrapper( + return ( - , + ); }, }); diff --git a/plugins/techdocs/src/alpha/index.tsx b/plugins/techdocs/src/alpha/index.tsx index 96454600d9..ebc84a1837 100644 --- a/plugins/techdocs/src/alpha/index.tsx +++ b/plugins/techdocs/src/alpha/index.tsx @@ -30,7 +30,6 @@ import { fetchApiRef, } from '@backstage/core-plugin-api'; import { - compatWrapper, convertLegacyRouteRef, convertLegacyRouteRefs, } from '@backstage/core-compat-api'; @@ -123,10 +122,9 @@ export const techDocsSearchResultListItemExtension = const { TechDocsSearchResultListItem } = await import( '../search/components/TechDocsSearchResultListItem' ); - return props => - compatWrapper( - , - ); + return props => ( + + ); }, }); }, @@ -142,9 +140,9 @@ const techDocsPage = PageBlueprint.make({ path: '/docs', routeRef: convertLegacyRouteRef(rootRouteRef), loader: () => - import('../home/components/TechDocsIndexPage').then(m => - compatWrapper(), - ), + import('../home/components/TechDocsIndexPage').then(m => ( + + )), }, }); @@ -170,14 +168,12 @@ const techDocsReaderPage = PageBlueprint.makeWithOverrides({ path: '/docs/:namespace/:kind/:name', routeRef: convertLegacyRouteRef(rootDocsRouteRef), loader: async () => - await import('../Router').then(({ TechDocsReaderRouter }) => { - return compatWrapper( - - - {addons} - , - ); - }), + await import('../Router').then(({ TechDocsReaderRouter }) => ( + + + {addons} + + )), }); }, }); @@ -212,14 +208,14 @@ const techDocsEntityContent = EntityContentBlueprint.makeWithOverrides({ attachTechDocsAddonComponentData(Addon, options); return ; }); - return compatWrapper( + return ( {addons} - , + ); }), }, diff --git a/plugins/user-settings/src/alpha.tsx b/plugins/user-settings/src/alpha.tsx index e71c61febc..bd0d9a1a82 100644 --- a/plugins/user-settings/src/alpha.tsx +++ b/plugins/user-settings/src/alpha.tsx @@ -23,7 +23,6 @@ import { import { convertLegacyRouteRef, convertLegacyRouteRefs, - compatWrapper, } from '@backstage/core-compat-api'; import SettingsIcon from '@material-ui/icons/Settings'; import { settingsRouteRef } from './plugin'; @@ -42,15 +41,13 @@ const userSettingsPage = PageBlueprint.makeWithOverrides({ path: '/settings', routeRef: convertLegacyRouteRef(settingsRouteRef), loader: () => - import('./components/SettingsPage').then(m => - compatWrapper( - , - ), - ), + import('./components/SettingsPage').then(m => ( + + )), }); }, });