Skip to content

docs(DropdownMenu): FR25 records how the touch sheet names and keeps its open sub-menus - #13790

Merged
cixzhang merged 2 commits into
mainfrom
lane2/dropdownmenu-fr25-sheet-submenu-rows
Nov 25, 2026
Merged

cixzhang merged 2 commits into
mainfrom
lane2/dropdownmenu-fr25-sheet-submenu-rows

Conversation

@cixzhang

@cixzhang cixzhang commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Summary

component:DropdownMenu gains FR25 and its verification row: the record for the touch sheet's open sub-menus, which #12582 implements and tests. An open sub-menu is named by its row's id, else its position, and renders from the current items; when its row leaves items or its items is empty, the sheet shows the deepest open level whose row remains; a returning row does not reopen it; a controlled close in the same render keeps the close.

This pull request changes no code. The verification row names the six DropdownMenu.test.tsx cases that pin the rule, the representative states, the failure expectation and audit:DropdownMenu/behavior, and records one evidence gap (no case re-renders the items around a sub-menu named by its position inside a section). The requirement row's basis is current behavior and current tests.

Writing rubric results

R1 narration: none; FR25 states what the sheet does.
R2 research: none.
R3 evidence: the verification row names test cases, not a pull request.
R4 rejected alternatives: none.
R5 change references: none in the record.
R6 open questions: none.
R7 project status: none.

Testing

  • pnpm check:knowledge: aligned.

Overlap checked: #12350, #12216, #11122, #8217 (open pull requests that touch DropdownMenu.spec.md in other rows; this pull request only adds the FR25 row and its verification row, which none of them writes)

@vercel

vercel Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
astryx Ready Ready Preview Nov 25, 2026 3:58pm UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 25, 2026
@astracat-bot

astracat-bot Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 25, 2026, 4:56 PM UTC

@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 25, 2026
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 8fd45f6

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 25, 2026

@astracat-bot astracat-bot Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes requested. FR25 is spec-approved at this head and describes the touch sheet's sub-menu behaviour, but its two new rows still need three fixes before it becomes the current rule:

  • FR25 says an open sub-menu closes back when it "has no rows left", but the sheet closes it only when its items array is empty (resolveSubmenuPath in DropdownMenu.tsx), so a sub-menu left with only a divider or an emptied section stays open; reword the clause to "or its items is empty" or record the difference as an FR25 gap.
  • The FR25 verification-map row fills two of its five columns, leaves out the two existing cases that hold the id and emptied-level clauses ("keeps an open sub-menu of the sheet by its id when a row is inserted above it" and "closes an open sub-menu of the sheet back to its parent when its last row leaves"), and has no case or evidence gap for a section's rows counted in place; add them, the representative states, a failure expectation and audit:DropdownMenu/behavior.
  • The FR25 requirement row has no Basis cell, which the component template requires so that recorded behaviour is not mistaken for a decision; something like "Current behavior; current tests" fits.
Claims and files checked

Review mode: same-head; reason: none

  • Claim: FR25 and its verification row join the DropdownMenu record — verified (spec lines 153 and 383).
  • Claim: the earlier sheet sub-menu fix implements and tests the rule — verified: that fix is on main (resolveSubmenuPath in DropdownMenu.tsx, sheet sub-menu cases in DropdownMenu.test.tsx).
  • Claim: an open sub-menu is named by id, else by position, and renders from the current items — verified (DropdownMenu.tsx:689, :2114-2145).
  • Claim: when its row leaves or has no rows left, the sheet shows the deepest remaining level — partly false: only an empty items array closes it (DropdownMenu.tsx:2124).
  • Claim: a returning row does not reopen it — verified (DropdownMenu.tsx:696-700; DropdownMenu.test.tsx:946).
  • Claim: a controlled close in the same render keeps the close — verified (DropdownMenu.tsx:665-670; DropdownMenu.test.tsx:898).
  • Claim: the pull request changes no code — verified (one Markdown file).
  • Claim: the verification row names four cases that already pin the rule — partly false: the four exist on main (DropdownMenu.test.tsx:821, :856, :898, :946), but the id and emptied-level clauses rest on :1019 and :983, and no case pins section counting.
  • Claim: the writing rubric finds nothing — verified against both rows.
  • Claim: the record check reports the record aligned — not verified: it could not run in this review, and CI skipped it on this draft head.
  • Claim: the listed overlapping pull requests do not write FR25 — verified: none of them adds an FR25 row to this record.
  • File: docs/specs/components/DropdownMenu/DropdownMenu.spec.md — the three findings above.

Automated review (maintainer link)

…its basis, and its verification row names every case
@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 25, 2026
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 45a1da7

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 25, 2026

@astracat-bot astracat-bot Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved. FR25 and its verification row match what the touch sheet does on main and carry an engineering owner's spec approval for this commit; CI, including the record check, is green on this head.

An optional tightening of FR25's close-back sentence is noted inline.

Claims and files checked

Review mode: same-head; reason: none

  • Claim: FR25 and its verification row join the DropdownMenu record — verified (record lines 153 and 383).
  • Claim: the earlier sheet sub-menu fix implements and tests the rule — verified: it is on main (resolveSubmenuPath in DropdownMenu.tsx, six sheet sub-menu cases in DropdownMenu.test.tsx).
  • Claim: an open sub-menu is named by id, else by position, and renders from the current items — verified (DropdownMenu.tsx:689, :2114-2131).
  • Claim: when its row leaves items or its items is empty, the sheet shows the deepest open level whose row remains — verified (DropdownMenu.tsx:2124; DropdownMenu.test.tsx:856, :983).
  • Claim: a returning row does not reopen it — verified (DropdownMenu.tsx:695-700; DropdownMenu.test.tsx:946).
  • Claim: a controlled close in the same render keeps the close — verified (DropdownMenu.tsx:665-670; DropdownMenu.test.tsx:898).
  • Claim: the pull request changes no code — verified (one Markdown file).
  • Claim: the verification row names the six cases, the representative states, the failure expectation and the audit section — verified (line 383; DropdownMenu.test.tsx:821, :856, :898, :946, :983, :1019).
  • Claim: the row records one evidence gap, no re-render case for a position-named sub-menu inside a section — verified: the only sheet case with a sub-menu inside a section (DropdownMenu.test.tsx:453) does not re-render.
  • Claim: the requirement row's basis is current behavior and current tests — verified (line 153).
  • Claim: the writing rubric finds nothing — verified against both rows.
  • Claim: the record check reports the record aligned — verified: CI's record check passes on this head.
  • Claim: the listed overlapping pull requests do not write FR25 — verified: none adds or edits an FR25 row in this record.
  • File: docs/specs/components/DropdownMenu/DropdownMenu.spec.md — clear; one optional FR25 wording note inline.

Automated review (maintainer link)

| FR22 | Under a finger, in the touch modes, where the primary pointer is coarse (a phone or a tablet), a tap or a drag that lands while the pointer menu enters MUST reach nothing: it closes nothing, scrolls nothing, moves no focus and clicks nothing (`spec:AST-094` FR35). The finger that opened the menu still picks the row it lifts on (FR8). Keys and assistive technology stay live. A mouse, a pinned `'popover'` and a finger where the primary pointer is fine (a touchscreen laptop) hold nothing, as for `component:Drawer`. Implementation gap: after a finger, a still mouse's first press lands on the entering menu's shield unless the mouse rests where the page last heard it when the shield came up (`spec:AST-094` FR35). | `spec:AST-094` FR35; `architecture:layer-runtime` |
| FR23 | Tab or Shift+Tab on a row at any level of a menu without `header` or `footer`, its own rows or an open sub-menu flyout's at any depth, closes every open level and the menu, calls `onOpenChange(false)` once, and leaves focus to move on from the trigger in page order (WAI-ARIA Menu Button). A level with a header or footer keeps FR15's and FR20's Tab cycle within it. | WAI-ARIA Menu Button pattern; current tests |
| FR24 | A sub-menu row's chevron points the way its sub-menu opens, and a Back control's chevron points the way it returns, in the menu's own direction (its nearest `dir`), not the page's: in the pointer menu, its flyouts and drill-in views, and the touch sheet, in DropdownMenu and in ContextMenu (`docs/design/bidirectionality.md` DR6). | Bidirectionality guide DR6; current tests | |
| FR25 | In the touch sheet, an open sub-menu is named by its row's `id`, else by its position among its level's rows (a section's rows counted in place), and renders from the current `items` on every render. When its row leaves `items`, or its `items` is empty, the sheet shows the deepest open level whose row remains, and a row that returns later does not reopen its sub-menu. A controlled close in the same render keeps the close: the next open starts at the root. | Current behavior; current tests |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Optional (non-blocking): "the sheet shows the deepest open level whose row remains" also reads as the emptied level itself, since its row stays, and a row that stays but loses items closes its level too (row?.items == null in resolveSubmenuPath), which FR25 does not name. A tighter clause: "When its row leaves items, or its items is empty or absent, the sheet closes back to the deepest open level above it whose row remains."

@cixzhang
cixzhang marked this pull request as ready for review November 25, 2026 16:32
@cixzhang
cixzhang merged commit 0967bb5 into main Nov 25, 2026
146 checks passed
@cixzhang
cixzhang deleted the lane2/dropdownmenu-fr25-sheet-submenu-rows branch November 25, 2026 19:47

This branch was successfully deployed

1 active deployment
Preview — 45a1da76 Deployed Nov 25, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant