diff --git a/.changeset/narrow-crumbs-settle.md b/.changeset/narrow-crumbs-settle.md new file mode 100644 index 000000000..043c11f96 --- /dev/null +++ b/.changeset/narrow-crumbs-settle.md @@ -0,0 +1,6 @@ +--- +"@tailor-platform/app-shell": patch +--- + +Keep the header breadcrumb readable on phones. Below the `md` breakpoint (768px) `GlobalHeaderLayout.DefaultHeader` hides the app title and its divider, and the route breadcrumb (both layouts) shows only the current page when the trail is three or more segments deep. +The breadcrumb no longer wraps onto extra lines: a long page title truncates with an ellipsis, and each link is 24px tall so it meets the WCAG 2.5.8 target size. diff --git a/docs-manifest.json b/docs-manifest.json index 2c68be482..49da584f8 100644 --- a/docs-manifest.json +++ b/docs-manifest.json @@ -518,9 +518,9 @@ "symbols": ["DefaultHeader", "DefaultHeaderProps"], "hashes": { "typeSurface": "dfc505929b8ef505", - "outline": "efdd10f3fe946e62", + "outline": "bfe0749a841cef02", "snapshot": null, - "outputMd": "375e55f4b12fa2be", + "outputMd": "e12bad2199a487d4", "examples": null } }, @@ -841,9 +841,9 @@ "symbols": ["GlobalHeaderLayout", "GlobalHeaderLayoutProps"], "hashes": { "typeSurface": "70edbc7c68dcc7aa", - "outline": "44d1374ea9192b2e", + "outline": "caa5e1dd7e5ded0b", "snapshot": null, - "outputMd": "fe86450720c4d586", + "outputMd": "16fa26b5097b3b35", "examples": null } }, @@ -1842,14 +1842,14 @@ "packages/core/skills/app-shell-patterns/references/components/csv-importer.md": "10c04c78bb846c9a", "packages/core/skills/app-shell-patterns/references/components/data-table.md": "c32c7ccf13528bf1", "packages/core/skills/app-shell-patterns/references/components/date-picker.md": "376e7d4ad14c2934", - "packages/core/skills/app-shell-patterns/references/components/default-header.md": "375e55f4b12fa2be", + "packages/core/skills/app-shell-patterns/references/components/default-header.md": "e12bad2199a487d4", "packages/core/skills/app-shell-patterns/references/components/default-sidebar.md": "9b1672c71b6db3ff", "packages/core/skills/app-shell-patterns/references/components/description-card.md": "8930a410d7d45f89", "packages/core/skills/app-shell-patterns/references/components/dialog.md": "cd9fa9c4b8ccb108", "packages/core/skills/app-shell-patterns/references/components/document-progress-card.md": "cabfb86627aefd6f", "packages/core/skills/app-shell-patterns/references/components/filter-rail.md": "12021e27b57f45e9", "packages/core/skills/app-shell-patterns/references/components/form.md": "c97c3d6e426d8b29", - "packages/core/skills/app-shell-patterns/references/components/global-header-layout.md": "fe86450720c4d586", + "packages/core/skills/app-shell-patterns/references/components/global-header-layout.md": "16fa26b5097b3b35", "packages/core/skills/app-shell-patterns/references/components/grid.md": "d048e972ae8aba3e", "packages/core/skills/app-shell-patterns/references/components/input.md": "876dca4c3b3bc9c5", "packages/core/skills/app-shell-patterns/references/components/item-list.md": "0190e797cd8ed318", diff --git a/docs-src/components/default-header.docs.outline.md b/docs-src/components/default-header.docs.outline.md index c703acc89..f07ae77a8 100644 --- a/docs-src/components/default-header.docs.outline.md +++ b/docs-src/components/default-header.docs.outline.md @@ -13,6 +13,8 @@ sources: It is exposed as `SidebarLayout.DefaultHeader` (and as a top-level `DefaultHeader` export) so you can slightly extend the built-in header — the common case being adding a notification bell or user menu — without reconstructing the trigger and breadcrumb yourself. +The breadcrumb never wraps. Below the `md` breakpoint (768px) a trail of three or more segments shows only the current page, and a long page title truncates with an ellipsis. + ## Import ```tsx diff --git a/docs-src/components/global-header-layout.docs.outline.md b/docs-src/components/global-header-layout.docs.outline.md index 65d89c3fb..5028a5bcf 100644 --- a/docs-src/components/global-header-layout.docs.outline.md +++ b/docs-src/components/global-header-layout.docs.outline.md @@ -117,6 +117,8 @@ The layout's default header is also exported as a top-level `GlobalHeader` compo `actions` behaves the same way as on `SidebarLayout.DefaultHeader`: omitting it renders the built-in [`AppearanceSwitcher`](./appearance-switcher.md), and passing it replaces the entire right-hand cluster. +Below the `md` breakpoint (768px) the title and its divider are hidden, so the breadcrumb gets the whole left side. The breadcrumb itself never wraps: a trail of three or more segments shows only the current page at those widths, and a long page title truncates with an ellipsis instead of pushing the trail out of the header. + ```tsx import { AppearanceSwitcher, GlobalHeader } from "@tailor-platform/app-shell"; diff --git a/docs/components/default-header.md b/docs/components/default-header.md index 897337193..96af855ea 100644 --- a/docs/components/default-header.md +++ b/docs/components/default-header.md @@ -11,6 +11,8 @@ description: The built-in SidebarLayout top bar, extensible via an actions slot It is exposed as `SidebarLayout.DefaultHeader` (and as a top-level `DefaultHeader` export) so you can slightly extend the built-in header — the common case being adding a notification bell or user menu — without reconstructing the trigger and breadcrumb yourself. +The breadcrumb never wraps. Below the `md` breakpoint (768px) a trail of three or more segments shows only the current page, and a long page title truncates with an ellipsis. + ## Import ```tsx diff --git a/docs/components/global-header-layout.md b/docs/components/global-header-layout.md index d1a265bae..d592c4e0b 100644 --- a/docs/components/global-header-layout.md +++ b/docs/components/global-header-layout.md @@ -115,6 +115,8 @@ The layout's default header is also exported as a top-level `GlobalHeader` compo `actions` behaves the same way as on `SidebarLayout.DefaultHeader`: omitting it renders the built-in [`AppearanceSwitcher`](./appearance-switcher.md), and passing it replaces the entire right-hand cluster. +Below the `md` breakpoint (768px) the title and its divider are hidden, so the breadcrumb gets the whole left side. The breadcrumb itself never wraps: a trail of three or more segments shows only the current page at those widths, and a long page title truncates with an ellipsis instead of pushing the trail out of the header. + ```tsx import { AppearanceSwitcher, GlobalHeader } from "@tailor-platform/app-shell"; diff --git a/packages/core/src/components/internals/breadcrumb/breadcrumb.tsx b/packages/core/src/components/internals/breadcrumb/breadcrumb.tsx index 1de21aeaf..40dd54748 100644 --- a/packages/core/src/components/internals/breadcrumb/breadcrumb.tsx +++ b/packages/core/src/components/internals/breadcrumb/breadcrumb.tsx @@ -14,7 +14,9 @@ function BreadcrumbList({ className, ...props }: React.ComponentProps<"ol">) {