From b09b89d3a8eac9ec4642a3004963da72df11dc80 Mon Sep 17 00:00:00 2001 From: Henriette Darge Date: Fri, 4 Jul 2025 15:37:35 +0200 Subject: [PATCH] Document new breadcrumb behavior --- lookbook/docs/components/page-header.md.erb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lookbook/docs/components/page-header.md.erb b/lookbook/docs/components/page-header.md.erb index a3614304ab8..a36b1f4d146 100644 --- a/lookbook/docs/components/page-header.md.erb +++ b/lookbook/docs/components/page-header.md.erb @@ -13,7 +13,8 @@ There are minor adjustments on how the composition of this component is defined - **Desktop:** The content of the context bar will be a [breadcrumb](https://primer.style/components/breadcrumbs). - **Tablet:** The content of the context bar will be a [breadcrumb](https://primer.style/components/breadcrumbs). - **Mobile:** - - The content of the breadcrumb will collapse to a single element using the parent link style. + - The content of the breadcrumb will collapse to a single element using the parent link style. The text and href for that link will be taken from the second-last item of the breadcrumb, (which should be the parent of the current page). + The only exception to that behavior are index pages, where the parent link might lead to the page itself again. To avoid these kind of loops on mobile, we can exclude certain elements from being taken as a mobile back link. An example can be found the [component previews](../../inspect/primer/open_project/page_header/skip_breadcrumb_item). - All the PageHeader actions will merge into an [ActionMenu](https://primer.style/components/action-menu) triggered by a single [Icon button](https://primer.style/components/icon-button) in the context bar. **[Title bar](https://primer.style/components/page-header#title-bar):** The default (medium) size will be always used keeping the capability as optionals of adding leading and trailing visuals and actions.