Repository navigation
Conversation
🦋 Changeset detectedLatest commit: e7533f3 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
MattFor
had a problem deploying
to
github-pages
November 23, 2026 22:20 — with
GitHub Actions
Failure
…bs in menu overflow Fixes primer#8790. Since primer#8748, getCrumbWidth measures all of a crumb's content, but the plain (inline-block) and menu (inline-grid) li layouts measure that content differently (inter-node whitespace, inherited font size). The fit check flip-flopped a few px below the collapse threshold until React threw 'Maximum update depth exceeded' and unmounted the tree. Keep each crumb's measured width per layout and use plain-layout widths for the plain check, menu-layout widths for the menu check.
MattFor
force-pushed
the
fix/breadcrumbs-8790-update-depth
branch
from
November 23, 2026 22:21
5d5389a to
e7533f3
Compare
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #8790
Description
Since 38.46.0,
Breadcrumbswithoverflow="menu"or"menu-with-root"can flip between its plain and menu layouts until React throws "Maximum update depth exceeded" (minified React error 185 in production unmounts the tree)It happens when a crumb measures wider in the plain layout than in the menu layout. Since #8748,
getCrumbWidthmeasures everything in theli, but the twolistyles lay that content out differently:li.ItemWrapperis inline-block andli.BreadcrumbsItemis an inline-grid. A space between a crumb's link and its sibling takes up width in the first and isn't rendered in the second (3.64px below)..ItemWrappersetsfont-size, while.BreadcrumbsIteminherits it. A sibling in a nav with a smaller font measures differently in each.The layout effect measures again on every
fitchange. Measured plain, the crumbs don't fit, so they collapse. Measured in the menu layout, they fit, so they expand, and so on. It only happens within a few px just below the width where all crumbs fit, but resizing through that width is enough.Steps to reproduce
The
CrumbWithPickerfrom the #8748 test, with one{' '}added:This throws on mount at 334-337px in Chrome on Linux. The window depends on fonts: it was 321-340px across Chrome 149, Firefox 153, Safari 18.6 and Edge 153. Each measure pass alternates between these:
I ran checks on every container width, 600 configurations of crumb shape, count, mode and font size.
Breadcrumbs.Itemcrumbs never crash, and neither doesCrumbWithPickerwithout the space.0.0.0-20261109223425canary crashes in none. ItsBreadcrumbs.jsdiffers from 38.46.0 only by fix(Breadcrumbs): measure every element a crumb renders #8748'sgetCrumbWidth.I have a fix verified against the same matrix: keep each crumb's width per layout, so the fit check uses plain-layout widths and the menu arrangement uses menu-layout widths.
P.S. #8747 would revert #8683 and bring back the hang from #8739.
Version
38.46.0 /
mainBrowser
Edge, Firefox, Safari, Chrome