Merge pull request #34299 from backstage/rugvip/nav-item-gone

frontend-plugin-api: remove NavItemBlueprint
This commit is contained in:
Patrik Oldsberg
2026-05-19 14:44:58 +02:00
committed by GitHub
49 changed files with 197 additions and 964 deletions
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-app': patch
---
Fixed a regression that caused disabled nav items to appear in the navigation bar.
@@ -0,0 +1,32 @@
---
'@backstage/frontend-plugin-api': minor
---
**BREAKING**: Removed the deprecated `NavItemBlueprint`. Navigation items are now discovered from `PageBlueprint` extensions based on their `title` and `icon` params.
If you were still using `NavItemBlueprint`, migrate by moving `title` and `icon` to your `PageBlueprint` instead:
```diff
-const navItem = NavItemBlueprint.make({
- params: { title: 'Example', icon: ExampleIcon, routeRef },
-});
const page = PageBlueprint.make({
params: {
+ title: 'Example',
+ icon: <ExampleIcon fontSize="inherit" />,
routeRef,
path: '/example',
loader: () => import('./Page').then(m => <m.Page />),
},
});
```
`PageBlueprint` expects an `IconElement` rather than a Material UI `IconComponent`, so this is also a good time to switch to [Remix Icon](https://remixicon.com/) if you were using Material UI icons only for the nav item:
```diff
-import ExampleIcon from '@material-ui/icons/Extension';
+import { RiPuzzleLine } from '@remixicon/react';
...
- icon: ExampleIcon,
+ icon: <RiPuzzleLine />,
```
@@ -0,0 +1,5 @@
---
'@backstage/plugin-app': patch
---
Following the removal of `NavItemBlueprint` in `@backstage/frontend-plugin-api`, the built-in app nav was updated to keep accepting legacy `nav-item` extensions so older plugins continue to work until they migrate.
@@ -0,0 +1,14 @@
---
'@backstage/plugin-catalog': patch
'@backstage/plugin-search': patch
'@backstage/plugin-home': patch
'@backstage/plugin-api-docs': patch
'@backstage/plugin-scaffolder': patch
'@backstage/plugin-techdocs': patch
'@backstage/plugin-user-settings': patch
'@backstage/plugin-devtools': patch
'@backstage/plugin-catalog-unprocessed-entities': patch
'@backstage/plugin-app-visualizer': patch
---
Removed separate nav item extensions. Sidebar entries are now provided via `title` and `icon` on each plugin's page extension.
@@ -0,0 +1,9 @@
---
'@backstage/frontend-test-utils': minor
---
**BREAKING**: `renderInTestApp` no longer renders a sidebar or legacy `nav-item` extensions. The app nav extension is now disabled in the minimal test app shell, along with the layout and routes extensions.
If your tests passed `features` containing `nav-item` extensions and asserted on links or labels in that stub sidebar, switch to `renderTestApp` instead — it uses the real app shell and discovers nav items from page extensions.
If you only use `renderInTestApp` to mount a component with APIs or route refs, there is no change.