From ea3970a51d5a4e4c7c802baf8b1a22d41a8365b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sofia=20Sj=C3=B6blad?= Date: Tue, 7 Oct 2025 10:35:01 +0200 Subject: [PATCH 1/3] add mandatory href for tabs in header component MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Sofia Sjöblad --- packages/ui/src/components/Header/types.ts | 2 +- packages/ui/src/components/HeaderPage/HeaderPage.stories.tsx | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/ui/src/components/Header/types.ts b/packages/ui/src/components/Header/types.ts index 41bc437a18..c7c602abfc 100644 --- a/packages/ui/src/components/Header/types.ts +++ b/packages/ui/src/components/Header/types.ts @@ -39,7 +39,7 @@ export interface HeaderProps { export interface HeaderTab { id: string; label: string; - href?: string; + href: string; /** * Strategy for matching the current route to determine if this tab should be active. * - 'exact': Tab href must exactly match the current pathname (default) diff --git a/packages/ui/src/components/HeaderPage/HeaderPage.stories.tsx b/packages/ui/src/components/HeaderPage/HeaderPage.stories.tsx index c4849ddc20..385ff0b10d 100644 --- a/packages/ui/src/components/HeaderPage/HeaderPage.stories.tsx +++ b/packages/ui/src/components/HeaderPage/HeaderPage.stories.tsx @@ -44,22 +44,27 @@ const tabs: HeaderTab[] = [ { id: 'overview', label: 'Overview', + href: '/overview', }, { id: 'checks', label: 'Checks', + href: '/checks', }, { id: 'tracks', label: 'Tracks', + href: '/tracks', }, { id: 'campaigns', label: 'Campaigns', + href: '/campaigns', }, { id: 'integrations', label: 'Integrations', + href: '/integrations', }, ]; From 3c921c551810059dcea2809ae1dc78da72ccfc7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sofia=20Sj=C3=B6blad?= Date: Tue, 7 Oct 2025 10:36:21 +0200 Subject: [PATCH 2/3] add changeset MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Sofia Sjöblad --- .changeset/few-weeks-create.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/few-weeks-create.md diff --git a/.changeset/few-weeks-create.md b/.changeset/few-weeks-create.md new file mode 100644 index 0000000000..c9de7cb4be --- /dev/null +++ b/.changeset/few-weeks-create.md @@ -0,0 +1,5 @@ +--- +'@backstage/ui': patch +--- + +Making href mandatory in tabs that are part of a Header component From 12c929164ca0c9d6004454b56fdec9b58094a602 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sofia=20Sj=C3=B6blad?= Date: Tue, 7 Oct 2025 11:12:17 +0200 Subject: [PATCH 3/3] add api report MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Sofia Sjöblad --- packages/ui/report.api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/ui/report.api.md b/packages/ui/report.api.md index 5d04bf8626..f546761837 100644 --- a/packages/ui/report.api.md +++ b/packages/ui/report.api.md @@ -1038,7 +1038,7 @@ export interface HeaderProps { // @public export interface HeaderTab { // (undocumented) - href?: string; + href: string; // (undocumented) id: string; // (undocumented)