Repository navigation
Conversation
|
Could we add screenshots (or even better, screencasts of the responsive behaviour) for both the issue and this PR? It's hard to understand exactly what's the issue and the solution proposed by reading the PR description |
|
Good call — I've added before/after screenshots to the PR description and mirrored them on #81297 (taken on the Admin UI/Page → WithBreadcrumbs story with the last crumb swapped for a long unbroken string, same viewport width in both shots). One detail worth calling out: the standalone Breadcrumbs stories truncate correctly even without this change — the defect only appears once the nav sits inside the Page header's flex chain, which is exactly what the two min-width: 0 rules unblock. Screencast of the responsive behaviour below: first clip is trunk (the crumb refuses to shrink and the page scrolls horizontally as the viewport narrows), second is this branch (the existing ellipsis engages and the page keeps its width). Before2026-08-07.11.50.03.movAfter2026-08-07.11.49.08.mov |
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
With #81954 merged, we could rebase and redube this PR to:
|
44316bc to
104fab5
Compare
The Breadcrumbs nav is a flex item in the Page header's leading group. With the flexbox default min-width: auto, a nowrap crumb's min-content propagates up and widens the page into horizontal scrolling before the truncation styles on .current can engage. Give the nav a root class with min-width: 0 so it can shrink. The header's leading group half of this fix already landed on trunk in WordPress#81954 (header-lockup). Closes WordPress#81297 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01F5RioW5hRsLJafcDezWJ8E
104fab5 to
2b2b321
Compare
|
Thanks @ciampo — done. Rebased on trunk and reduced the PR to the
The |
|
Looking at these changes, they cause the current crumb to shrink, but that can also be the page's only visible At narrow widths or high zoom, long media and menu titles are clipped with no way to read the full text, which can be problematic. I feel like this issue is going to be solved inherently when updating to using the recently added Breadcrumb component from
cc @simison to confirm my gut feeling here |
|
Thanks @ciampo — that's a fair point. Truncating the current crumb without any way to read the full text is a real regression for the Agreed that the I'll close this PR in favour of #82384 and leave #81297 open as the tracking issue until that lands, since the overflow is still reproducible on trunk today and consumers are still working around it from outside. |

What?
Closes #81297
Lets the
admin-uiBreadcrumbsnavshrink (min-width: 0), so a long current crumb truncates with its existing ellipsis instead of widening the whole page into horizontal scrolling.Why?
The
Breadcrumbsnavis a flex item inside thePageheader's leading group. With the flexbox defaultmin-width: auto, a nowrap crumb's min-content propagates up the chain and forces the page wider than its container before the truncation styles thatBreadcrumbsalready ships (.current's ellipsis, the shrinkableli:last-child) can engage.#81954 fixed the outer link of that chain (the header's leading group), but the
navitself still refuses to shrink, so the crumb keeps overflowing. Consumers currently have to patch this from outside with structural selectors (e.g.:has(> nav[aria-label]) { min-inline-size: 0 }), which breaks silently as soon as any wrapper — adisplay: contentsone, for instance — lands between the header and thenav. See #81297 for the full analysis; the slot is also set to be reworked under #77039 / #77628, and this pins the propagation fix until those land.How?
breadcrumbs/index.tsx— thenavgains arootclass.breadcrumbs/style.module.css—.root { min-width: 0; }.CHANGELOG.md— entry underUnreleased→Bug Fixes.No behavior change for content that fits:
min-width: 0only removes the automatic minimum, it does not make anything smaller on its own.Testing Instructions
admin-uiPagewith breadcrumbs whose last item is a long unbroken string, e.g.:Admin UI/Page→WithBreadcrumbsstory with a long last label works as well.)Note that the standalone
Breadcrumbsstories truncate correctly even without this change — the defect only appears once thenavsits inside thePageheader's flex chain.Testing Instructions for Keyboard
Tab through the breadcrumb links before and after narrowing the viewport: link order, focusability, and visible focus outlines are unchanged — this PR only allows the existing flex chain to shrink, it adds no interactive changes.
Screenshots
Taken on the
Admin UI/Page→WithBreadcrumbsstory with the last crumb replaced by a long unbroken string (VID_20260731_aaa….mp4), viewport narrower than the crumb's natural width.Screencasts
Before
2026-08-07.11.50.03.mov
After
2026-08-07.11.49.08.mov