Remove NavItemBlueprint in favor of page-based nav discovery
Drop the deprecated NavItemBlueprint from the public API and migrate core plugins to set title and icon on PageBlueprint instead. AppNav keeps backward compatibility for legacy nav-item extensions via an internal core.nav-item.target data ref. Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -18,7 +18,6 @@ import Grid from '@material-ui/core/Grid';
|
||||
|
||||
import {
|
||||
ApiBlueprint,
|
||||
NavItemBlueprint,
|
||||
PageBlueprint,
|
||||
createFrontendPlugin,
|
||||
} from '@backstage/frontend-plugin-api';
|
||||
@@ -39,14 +38,6 @@ import {
|
||||
EntityContentBlueprint,
|
||||
} from '@backstage/plugin-catalog-react/alpha';
|
||||
|
||||
const apiDocsNavItem = NavItemBlueprint.make({
|
||||
params: {
|
||||
title: 'APIs',
|
||||
routeRef: rootRoute,
|
||||
icon: () => <AppIcon fontSize="inherit" id="kind:api" />,
|
||||
},
|
||||
});
|
||||
|
||||
const apiDocsConfigApi = ApiBlueprint.make({
|
||||
name: 'config',
|
||||
params: defineParams =>
|
||||
@@ -76,6 +67,8 @@ const apiDocsExplorerPage = PageBlueprint.makeWithOverrides({
|
||||
return originalFactory({
|
||||
path: '/api-docs',
|
||||
routeRef: rootRoute,
|
||||
title: 'APIs',
|
||||
icon: <AppIcon fontSize="inherit" id="kind:api" />,
|
||||
loader: () =>
|
||||
import('./components/ApiExplorerPage/DefaultApiExplorerPage').then(
|
||||
m => (
|
||||
@@ -222,7 +215,6 @@ export default createFrontendPlugin({
|
||||
registerApi: registerComponentRouteRef,
|
||||
},
|
||||
extensions: [
|
||||
apiDocsNavItem,
|
||||
apiDocsConfigApi,
|
||||
apiDocsExplorerPage,
|
||||
apiDocsHasApisEntityCard,
|
||||
|
||||
Reference in New Issue
Block a user