From 933dc2d7f6d3d645aedd9f0f9323b00436e52f7d Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Wed, 22 Nov 2023 16:19:54 +0100 Subject: [PATCH] app-next: updates for extension ID refactor Co-authored-by: Camila Belo Signed-off-by: Patrik Oldsberg --- packages/app-next-example-plugin/src/plugin.tsx | 1 - packages/app-next/app-config.yaml | 12 ++++++------ packages/app-next/src/App.tsx | 4 +++- packages/app-next/src/examples/pagesPlugin.tsx | 6 +++--- 4 files changed, 12 insertions(+), 11 deletions(-) diff --git a/packages/app-next-example-plugin/src/plugin.tsx b/packages/app-next-example-plugin/src/plugin.tsx index a3c95e900c..99c377b7e5 100644 --- a/packages/app-next-example-plugin/src/plugin.tsx +++ b/packages/app-next-example-plugin/src/plugin.tsx @@ -21,7 +21,6 @@ import { } from '@backstage/frontend-plugin-api'; export const ExamplePage = createPageExtension({ - id: 'example.page', defaultPath: '/example', loader: () => import('./Component').then(m => ), }); diff --git a/packages/app-next/app-config.yaml b/packages/app-next/app-config.yaml index 34cd78d480..3eaab2fa1a 100644 --- a/packages/app-next/app-config.yaml +++ b/packages/app-next/app-config.yaml @@ -7,17 +7,17 @@ app: plugin.catalog.externalRoutes.viewTechDoc: plugin.techdocs.routes.docRoot extensions: - - apis.plugin.graphiql.browse.gitlab: true + # - apis.plugin.graphiql.browse.gitlab: true + - graphiql-endpoint:graphiql/gitlab: true - # Entity page cards - - entity.cards.about - - entity.cards.labels - - entity.cards.links: + - entity-card:catalog/about + - entity-card:catalog/labels + - entity-card:catalog/links: config: filter: kind:component has:links # Entity page content - - entity.content.techdocs + - entity-content:techdocs # scmAuthExtension: >- # createScmAuthExtension({ diff --git a/packages/app-next/src/App.tsx b/packages/app-next/src/App.tsx index 791d2b38fa..22b04c3a3f 100644 --- a/packages/app-next/src/App.tsx +++ b/packages/app-next/src/App.tsx @@ -83,7 +83,7 @@ TODO: /* app.tsx */ const homePageExtension = createExtension({ - id: 'myhomepage', + name: 'myhomepage', attachTo: { id: 'home', input: 'props' }, output: { children: coreExtensionData.reactElement, @@ -101,10 +101,12 @@ const signInPage = createSignInPageExtension({ }); const scmAuthExtension = createApiExtension({ + name: 'scm-auth', factory: ScmAuth.createDefaultApiFactory(), }); const scmIntegrationApi = createApiExtension({ + name: 'scm-integration', factory: createApiFactory({ api: scmIntegrationsApiRef, deps: { configApi: configApiRef }, diff --git a/packages/app-next/src/examples/pagesPlugin.tsx b/packages/app-next/src/examples/pagesPlugin.tsx index 1e9409a5e4..c5069f99c3 100644 --- a/packages/app-next/src/examples/pagesPlugin.tsx +++ b/packages/app-next/src/examples/pagesPlugin.tsx @@ -36,7 +36,7 @@ export const pageXRouteRef = createRouteRef(); // }); const IndexPage = createPageExtension({ - id: 'index', + name: 'index', defaultPath: '/', routeRef: indexRouteRef, loader: async () => { @@ -68,7 +68,7 @@ const IndexPage = createPageExtension({ }); const Page1 = createPageExtension({ - id: 'page1', + name: 'page1', defaultPath: '/page1', routeRef: page1RouteRef, loader: async () => { @@ -102,7 +102,7 @@ const Page1 = createPageExtension({ }); const ExternalPage = createPageExtension({ - id: 'pageX', + name: 'pageX', defaultPath: '/pageX', routeRef: pageXRouteRef, loader: async () => {