Repository navigation
fix(php-transformer): stack declared block menu items in core flow layout - #2742
Merged
Merged
Conversation
…yout An in-flow list navigation renders its generated list as display:contents, so the items lay out in core/navigation itself. When neither the source nav nor its list declares a display, core's flex row stood in for the source's block list, and items the source stacked full width shrank to their min-width. On a Wix phone menu that cut the longer labels off. Record core's flow layout only with item evidence: every list item declares a block-level display. Unstyled menus, inline items and flex lists keep core's default. Refs #2726 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
chubes4
marked this pull request as ready for review
October 13, 2026 22:44
# Conflicts: # php-transformer/tests/fixtures/capture-evidence-equivalence/expected.json # php-transformer/tools/capture-evidence-equivalence/README.md
This was referenced Oct 14, 2026
ellenbauer
added a commit
that referenced
this pull request
Oct 14, 2026
…flow layout (#2780) The stacked block list check from #2742 read each item's display with resolvedConditionalDisplay(), which takes the last matching declaration in source order. On the Wix phone menu that is `.FWN1UT{display:flex}`, which the browser ranks below the earlier `.BZjmPL>ul li{display:block}`, so the check saw flex items and core/navigation kept its flex row. The labels stayed cut off. Read the host, list and item displays from the specificity-ranked cascade (static and applying conditional rules) instead. It is a recognition signal only and is never projected. Refs #2726 Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.
Refs #2726
What was wrong
On the Dunbar Oaks (Wix) phone menu, "Annual Meetings" and "News & Events" were cut off. I checked the earlier diagnosis and it holds:
nav.BZjmPL, itsuland itsliitems are all block. The nav and the list declare no display. The items are block through.BZjmPL>ul li{display:block}, so each item is the full 155px column.display:contents(EngineSupportCss), so the items lay out in core/navigation itself.withResolvedNonFlexNavigationLayout()only records core's flow layout when the nav declares a non-flex display. This nav declares none, so core/navigation kept its default flex row and each item became a flex item sized by.FWN1UT{min-width:100px}.This affects any list menu whose items the source stacks as blocks with no display on the nav or the list.
What changed
NavigationPattern::withStackedBlockListLayout(): for an in-flow (overlayMenu: never) list navigation, when neither the host nor its list declares a display, record"layout":{"type":"default"}only if every list item resolves to a declared block-level display (block,list-itemorflow-root).Why it is this narrow:
navigation-layout-default.phpstill passes.display:contents, which is where core/navigation's own layout replaces the source list's box. Responsive overlay navigations are left alone.Tests
tests/unit/navigation-stacked-block-list-layout.php, 7 assertions. On trunk, 4 fail (device-scoped and plain block items, list-item items, floated block items); all pass here.capture-evidence-equivalence: 9 corpus cases re-recorded and listed in its README. Two (46f79246,e2e35d0c, the fix(php-transformer): keep scoped typed navigation item rules on the native subject baseline #2720 typed item fixture) gain the flow layout attribute. The other seven change only the style-rule candidate cache counters from the extra display lookups. Checked by replaying each case on trunk and on this branch and diffing the normalized output.End to end
Studio imports of the DLA main captures with v0.38.1 (the last base that reads these captures) plus #2742, #2743 and #2744, iPhone user agent at 375. Quality gate passed (
quality_pass: true,fail_import: false).display:flexwith 100px items, so this check did not fire on the real page. The resolver it uses ranks by source order, and a later.FWN1UT{display:flex}hid the earlier, stronger.BZjmPL>ul li{display:block}. Fixed in fix(php-transformer): rank menu item displays by specificity for the flow layout #2780.composer test(memory_limit -1) passed.🤖 Generated with Claude Code