Skip to content

fix(php-transformer): stack declared block menu items in core flow layout - #2742

Merged
chubes4 merged 2 commits into
trunkfrom
fix/phone-menu-block-flow-nav
Oct 13, 2026
Merged

chubes4 merged 2 commits into
trunkfrom
fix/phone-menu-block-flow-nav

Conversation

@ellenbauer

@ellenbauer ellenbauer commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

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:

  • In the source, nav.BZjmPL, its ul and its li items 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.
  • An in-flow list navigation renders its generated list as 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-item or flow-root).

Why it is this narrow:

  • It needs item evidence. An unstyled menu, inline or inline-block items, and a list that declares flex all keep core's default row, as before. The existing "no resolved display evidence keeps the core default" check in navigation-layout-default.php still passes.
  • It only applies where the generated list is display:contents, which is where core/navigation's own layout replaces the source list's box. Responsive overlay navigations are left alone.
  • Floated block items also take flow. That matches the source: a flex row ignores the float that the projected item rule carries, and flow keeps it.

Tests

  • New 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).

  • Dunbar Oaks, base (localhost:8914) against merged (localhost:8940): the nav is still display:flex with 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.
  • 1280 and 375 closed: 0 differing pixels between the two Dunbar imports.
  • composer test (memory_limit -1) passed.

🤖 Generated with Claude Code

…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
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
@chubes4
chubes4 merged commit f71a679 into trunk Oct 13, 2026
11 checks passed
@chubes4
chubes4 deleted the fix/phone-menu-block-flow-nav branch October 13, 2026 23:21
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants