Repository navigation
docs(DropdownMenu): FR25 records how the touch sheet names and keeps its open sub-menus - #13790
Conversation
…its open sub-menus
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
|
/approve-spec 8fd45f6 |
There was a problem hiding this comment.
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
itemsarray is empty (resolveSubmenuPathinDropdownMenu.tsx), so a sub-menu left with only a divider or an emptied section stays open; reword the clause to "or itsitemsis 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
idand 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 andaudit: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(resolveSubmenuPathinDropdownMenu.tsx, sheet sub-menu cases inDropdownMenu.test.tsx). - Claim: an open sub-menu is named by
id, else by position, and renders from the currentitems— 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
itemsarray 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 theidand emptied-level clauses rest on:1019and: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.
…its basis, and its verification row names every case
|
/approve-spec 45a1da7 |
There was a problem hiding this comment.
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(resolveSubmenuPathinDropdownMenu.tsx, six sheet sub-menu cases inDropdownMenu.test.tsx). - Claim: an open sub-menu is named by
id, else by position, and renders from the currentitems— verified (DropdownMenu.tsx:689,:2114-2131). - Claim: when its row leaves
itemsor itsitemsis 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.
| | 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 | |
There was a problem hiding this comment.
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."
Summary
component:DropdownMenugains 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'sid, else its position, and renders from the currentitems; when its row leavesitemsor itsitemsis 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.tsxcases that pin the rule, the representative states, the failure expectation andaudit: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
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)