Fix tsc errors and add missing changeset

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
This commit is contained in:
Patrik Oldsberg
2026-03-15 14:16:26 +01:00
parent 3f36ce1257
commit c0ab3763e5
3 changed files with 5 additions and 26 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-app': patch
---
The app nav now falls back to `plugin.icon` for navigation items that don't have an explicit icon set.
@@ -72,15 +72,12 @@ describe('DefaultIconsApi', () => {
expect(typeof icon).toBe('function');
// @ts-expect-error testing runtime behavior
const result = icon({});
// @ts-expect-error accessing internal React element structure
expect(result.type).toBe('span');
// @ts-expect-error accessing internal React element structure
expect(result.props.style).toEqual({
display: 'inline-flex',
fontSize: '1.5rem',
lineHeight: 0,
});
// @ts-expect-error accessing internal React element structure
expect(result.props.children).toBe(element);
expect(api.getIcon('myIcon')).toBe(icon);
});
@@ -92,7 +89,6 @@ describe('DefaultIconsApi', () => {
// @ts-expect-error testing runtime behavior
const result = icon({ fontSize: 'small' });
// @ts-expect-error accessing internal React element structure
expect(result.props.style.fontSize).toBe('1.25rem');
});
-22
View File
@@ -8,7 +8,6 @@ import { ConfigurableExtensionDataRef } from '@backstage/frontend-plugin-api';
import { ExtensionBlueprintParams } from '@backstage/frontend-plugin-api';
import { ExtensionDataRef } from '@backstage/frontend-plugin-api';
import { ExtensionInput } from '@backstage/frontend-plugin-api';
import { IconComponent } from '@backstage/frontend-plugin-api';
import { IconElement } from '@backstage/frontend-plugin-api';
import { JSX as JSX_2 } from 'react';
import { OverridableExtensionDefinition } from '@backstage/frontend-plugin-api';
@@ -20,27 +19,6 @@ const visualizerPlugin: OverridableFrontendPlugin<
{},
{},
{
'nav-item:app-visualizer': OverridableExtensionDefinition<{
kind: 'nav-item';
name: undefined;
config: {};
configInput: {};
output: ExtensionDataRef<
{
title: string;
icon: IconComponent;
routeRef: RouteRef<undefined>;
},
'core.nav-item.target',
{}
>;
inputs: {};
params: {
title: string;
icon: IconComponent;
routeRef: RouteRef<undefined>;
};
}>;
'page:app-visualizer': OverridableExtensionDefinition<{
kind: 'page';
name: undefined;