Skip to content

fix(DropdownMenu, ContextMenu): a tap on a sheet row's icon, end content or padding runs the row - #11827

Merged
cixzhang merged 20 commits into
meta:mainfrom
shashank03-dev:fix/menu-sheet-row-tap
Nov 23, 2026
Merged

cixzhang merged 20 commits into
meta:mainfrom
shashank03-dev:fix/menu-sheet-row-tap

Conversation

@shashank03-dev

@shashank03-dev shashank03-dev commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

User impact

In a menu shown as a bottom sheet (DropdownMenu presentation="bottom-sheet", or ContextMenu on touch), a tap on a row's label runs the row. A tap on its icon, its end content (a count, a submenu chevron) or its padding does nothing: the sheet stays open and the item never runs. A mouse click on the same spots fails the same way. The whole row looks like one control, and the icon is a common place to tap.

Fixes #11687

Problem and solution fit

  • Why the defect occurs: the sheet's press model finds the row under a release with elementFromPoint(...).closest('button:not(:disabled), a[href]'). ListItem renders the icon and the end content beside that button or link, not in it, and the padding is the <li>. So a release there finds no row.
  • Why it harms the task: with no row, the release settles as a stray release. That arms the click guard, so the browser's own click, which Item would turn into the row's onClick, is swallowed too. Nothing acts.
  • Why that matters: every bottom-sheet menu on a phone has this dead area on each row.

The fix: when a release finds no item, the sheet takes the row (li) that holds the point and picks that row's action, the item that is a direct child of the li.

Expected behavior and authority

module:DropdownMenu/useMenuPress (current):

  • FR1: "A row MUST act when a press is released over it ... a press that never left its row is a tap or click on that row."
  • ORD2: "Enabled row under the point → act."
  • FR2: the highlight is "the enabled row under the pointer", and "nothing MUST be highlighted over a divider, a heading, a disabled row".

Smallest restoration

Reshaped by a maintainer edit (credited, see Testing) to the existing public hitTest option. There's no new hook and no new option:

  • useMenuPress.ts: the hook's default point lookup moves into one internal function, elementAtMenuPoint(menu, doc, x, y). It's exported from the module but not from the hooks entry point or the package. The hook calls it, with no change in behavior: it still hit-tests in the menu's own shadow root and sees through an input hold's shield while the menu enters.
  • MenuBottomSheetActionList.tsx: passes useMenuPress a hitTest that calls elementAtMenuPoint. A point in a row's content then resolves to that row's own action, the li's direct child that matches the row selector. So:
    • a tap on the icon, end content or padding runs the row;
    • a press on a control inside the end content does not run the row (pressBelongsToControl in hooks/useClickableContainer.ts, the one rule Item's row click and the sheet's release both call);
    • a disabled row, a section heading or a divider runs nothing.
  • DropdownMenu.spec.md FR5: states the sheet row rule, and the verification map lists the new cases.

Evidence

  • Reproduction before the change: in real browsers, against a Storybook built from main, a tap or click on the icon or padding of "Duplicate project" in the action-sheet story leaves the sheet open and logs nothing.
  • Result after the change: the row runs once and the sheet closes. A tap on "Move to project"'s chevron opens its submenu.
  • Representative unchanged path: a tap on a section heading runs no row and the sheet stays open; a disabled row's icon runs nothing; a button inside end content runs only its own click.
  • Regression tests (this head): 18 new unit cases, 14 in MenuBottomSheetActionList.test.tsx and 4 in useMenuPress.test.tsx. 8 fail on main and pass here: 6 sheet cases for the defect, and 2 hook cases only because elementAtMenuPoint is new. 10 guard paths pass on both main and this head: a disabled row's icon; a disabled link row and a disabled button row with a button in their end content (the button isn't pressed); an end-content control's own press; a switch, a disabled button and a read-only checkbox in the end content (no row runs); a press outside every row or on no element; and the hook without a row lookup. Every changed line in MenuBottomSheetActionList.tsx and useMenuPress.ts is covered.
  • I checked that the tests fail for the right reason: with the click guard removed from the act, the link-row case fails (the row is selected twice).

Before and after, three engines

Storybook built from main and from this branch, the same Playwright script for both, the action-sheet story on a phone-size page. Each clip shows Chromium 149, Firefox 151 and WebKit 26.5 side by side: first a finger tap on "Duplicate project"'s icon, then a mouse click on the same row's padding. The panel on each page reads live from the page: the sheet's state and the rows that ran. Real-time capture, 30 fps.

Before (main): the tap and the click run nothing and the sheet stays open, in all three engines.

11687-before.mp4

After: each runs "Duplicate project" once and the sheet closes, in all three engines.

11687-after.mp4
Chromium 149 Firefox 151 WebKit 26.5
main, tap on icon nothing ran, sheet open nothing ran, sheet open nothing ran, sheet open
this PR, tap on icon row ran once, sheet closed row ran once, sheet closed row ran once, sheet closed
main, click on padding nothing ran, sheet open nothing ran, sheet open nothing ran, sheet open
this PR, click on padding row ran once, sheet closed row ran once, sheet closed row ran once, sheet closed

In every run the element under the point was the icon (svg) or the row (li), never the row's button.

Scope

Components: DropdownMenu, ContextMenu (through MenuBottomSheetActionList), useMenuPress

  • One defect is restored.
  • Separable contradictory or unsettled tagalongs were removed or split.
  • No new public API, visual representation, default, or interaction model is hidden under the bug-fix label. (No new hook or option: the sheet uses the public hitTest option.)
  • Public text and artifacts contain no internal Meta context.

Testing

Head 870f57e, Node 24.22:

  • pnpm build, pnpm typecheck, pnpm lint:strict: pass. changeset-coverage.mjs pr: pass. pnpm review:pre: 0 findings, clean merge.
  • Vitest, the core and lab suites: 24,850 passed, 1 failed. The failure, postinstall.test.mjs "still nudges when no folder up to the repository root ran init", fails the same on main (macOS).
  • New DropdownMenuSheetRowPress.interaction.browser.spec.ts, phone profile: Chromium and WebKit 12 passed. Against a Storybook built with main's two source files: 12 failed.
  • Firefox is not in the interaction config, so I also ran the same spots with Playwright's tap and a mouse click in Chromium, Firefox and WebKit: 24 of 24 pass here, 6 of 24 on main (only the heading checks, which must stay closed).

Review follow-up, head 0581a74 (an earlier shape, superseded by the maintainer edit below; the option was then wholeRowSelector, the helper findRowAction; no behavior change): build, typecheck and lint:strict pass; the DropdownMenu, ContextMenu and useMenuPress tests pass (562); changed-line coverage is unchanged (12 statements and 8 branches in useMenuPress.ts, 3 statements in MenuBottomSheetActionList.tsx, all covered).

First-load cost (architecture:component-import-boundaries INV10, a shared module grows): pnpm size:pages, base main vs this head, gzip:

Page Change
docs (Text, Heading, Link, Card, Divider, List) +0 B
form (Button, IconButton, TextInput, CheckboxInput, Text, Heading, Card) +0 B
menu (DropdownMenu, ContextMenu, Button, Text) −17 B
table (Table, Text, Button) −7 B

All are within the 0.3 KB allowance. No module is added, so the first-load module set and its depth are unchanged.

Maintainer edit (Cindy's agent; co-authored with @shashank03-dev, whose commits are kept), following the owner's records ruling on the shape:

  • Main merged in (no conflicts).
  • useMenuPressInternal and wholeRowSelector are removed, elementAtMenuPoint is extracted, and the sheet passes hitTest.
  • Fallback kept: the sheet passes hitTest only where the document has elementFromPoint. Elsewhere (jsdom) the hook's own lookup reads the event's target, as before. No other test file needs a stub; the sheet's own row cases give jsdom an elementFromPoint before each sheet renders.
  • Sheet change: MenuBottomSheetActionList.tsx gains two small functions, the point lookup (about 23 lines) and the elementFromPoint check, plus the hitTest option.
  • Unit cases: the hook cases now drive the row mapping through hitTest, and a sheet case presses outside every row. Counts and coverage are under Evidence.
  • Results (at 5dd5414, the main merge onto 898c93b): the menu-family suites pass 2,792 of 2,792; hooks, DropdownMenu, MenuBottomSheet, ContextMenu and Selector pass 2,113 of 2,113 in the lane's own run. tsc and check:knowledge are clean.
  • First-load size: see the table above.

Writing rubric results

For the DropdownMenu.spec.md edits (the FR5 sentence and the verification-map row):

R1 narration: none; the FR5 sentence states what the Touch sheet does, in the present tense.
R2 research: none.
R3 evidence: the new verification row names test cases and scenarios, not a pull request.
R4 rejected alternatives: none added.
R5 change references: none.
R6 open questions: none.
R7 project status: none.

Maintainer note: main is merged into this branch (merge commit 4340510), with the contributor's files byte-identical and credit kept.

Overlap checked: #12426 (also edits DropdownMenu.spec.md; the overlap comes from main, and this change keeps its own FR lines)

Known limit (not in this change)

…ent or padding runs the row

The sheet's press model found the row under a release with a selector that matches only the row's action. ListItem renders the icon and end content beside that action, so a press there found no row, and the click guard swallowed the browser's click. The sheet now uses useMenuPressInternal with a rowSelector for its list rows: a press on the rest of a row picks the row's action, the item that is a direct child of the row. A control inside the row's content, a disabled link row and a section heading pick nothing. The public useMenuPress does not change.

Fixes meta#11687
@vercel

vercel Bot commented Nov 15, 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 23, 2026 11:20am UTC

Request Review

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

astracat-bot Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 23, 2026, 11:45 AM UTC

@github-actions github-actions Bot added community Authored by a community contributor (not on the eng/design team) needs:code-review High-risk change (new package/component/API) — needs human code review before merge labels Nov 15, 2026
@github-actions

github-actions Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · 65b0b42

Storybook · Sandbox · built from this PR's head

Modified components

Component Size LoC Visual · A11y · RTL
lab/CommentComposer 187.7 kB (+94 B) · 1.9 kB CSS (0) — — · — · —
lab/CommentThread 384.3 kB (+57 B) · 2.4 kB CSS (0) — — · — · —
lab/Comments 391.3 kB (+55 B) · 2.5 kB CSS (0) — — · — · —
136 more components
Component Size LoC Visual · A11y · RTL
TableHeaderCell 108.2 kB (+54 B) · 20.0 kB CSS (0) — — · — · —
ContextMenu 107.1 kB (+52 B) · 19.6 kB CSS (0) — — · — · —
TableCell 108.3 kB (+30 B) · 20.2 kB CSS (0) — — · — · —
TabMenu 85.2 kB (+20 B) · 12.3 kB CSS (0) — — · — · —
lab/VideoPlayer 237.1 kB (+19 B) · 2.1 kB CSS (0) — — · — · —
Markdown 211.1 kB (+17 B) · 23.5 kB CSS (0) — — · — · —
TopNavHeading 88.7 kB (+16 B) · 12.4 kB CSS (0) — — · — · —
BreadcrumbItem 103.4 kB (+13 B) · 14.0 kB CSS (0) — — · — · —
Item · Storybook 21.1 kB (+13 B) · 6.2 kB CSS (0) 990 (−1) ✓ · ✓ · —
lab/AudioPlayer 239.5 kB (+12 B) · 1.8 kB CSS (0) — — · — · —
DropdownMenuRadioItem 29.9 kB (+9 B) · 7.6 kB CSS (0) — ✓ · ✓ · —
Selector 122.0 kB (+8 B) · 19.7 kB CSS (0) — — · — · —
DropdownMenuSubMenu 81.2 kB (+7 B) · 11.0 kB CSS (0) — ✓ · ✓ · ✓
CheckboxListItem 83.0 kB (+6 B) · 12.6 kB CSS (0) — — · — · —
richtext/RichTextEditorToolbar 317.4 kB (+6 B) · 454 B CSS (0) — — · — · —
CheckboxInput 71.9 kB (+5 B) · 10.7 kB CSS (0) — — · — · —
Pagination 155.1 kB (+5 B) · 20.1 kB CSS (0) — — · — · —
ListItem 82.1 kB (+4 B) · 12.6 kB CSS (0) — — · — · —
DropdownMenuItem 29.0 kB (+3 B) · 7.1 kB CSS (0) — ✓ · ✓ · —
TreeList 47.5 kB (+3 B) · 6.0 kB CSS (0) — — · — · —
DropdownMenuCheckboxItem 29.8 kB (+1 B) · 7.6 kB CSS (0) — ✓ · ✓ · ✓
FileInput 78.0 kB (+1 B) · 12.9 kB CSS (0) — — · — · —
NumberInput 106.8 kB (+1 B) · 13.1 kB CSS (0) — — · — · —
RadioList 63.3 kB (+1 B) · 7.7 kB CSS (0) — — · — · —
TimeInput 182.4 kB (+1 B) · 17.9 kB CSS (0) — — · — · —
Tokenizer 113.6 kB (+1 B) · 21.9 kB CSS (0) — — · — · —
lab/SelectableCardGroup 72.2 kB (+1 B) · 162 B CSS (0) — — · — · —
AlertDialog 134.7 kB (0) · 16.3 kB CSS (0) — — · — · —
AppShell 92.2 kB (0) · 14.9 kB CSS (0) — — · — · —
Avatar 47.0 kB (0) · 6.0 kB CSS (0) — — · — · —
AvatarGroup 49.8 kB (0) · 6.1 kB CSS (0) — — · — · —
AvatarGroupOverflow 53.1 kB (0) · 6.0 kB CSS (0) — — · — · —
Banner 70.1 kB (0) · 11.7 kB CSS (0) — — · — · —
BaseTypeahead 84.7 kB (0) · 12.1 kB CSS (0) — — · — · —
Button 68.0 kB (0) · 11.2 kB CSS (0) — — · — · —
Calendar 79.2 kB (0) · 11.8 kB CSS (0) — — · — · —
Carousel 78.4 kB (0) · 12.1 kB CSS (0) — — · — · —
ChatComposer 91.4 kB (0) · 13.5 kB CSS (0) — — · — · —
ChatComposerInput 88.5 kB (0) · 12.5 kB CSS (0) — — · — · —
ChatComposerTokenElement 88.5 kB (0) · 12.5 kB CSS (0) — — · — · —
ChatDictationButton 68.6 kB (0) · 11.2 kB CSS (0) — — · — · —
ChatLayout 91.8 kB (0) · 11.7 kB CSS (0) — — · — · —
ChatLayoutScrollButton 68.6 kB (0) · 11.4 kB CSS (0) — — · — · —
ChatMessageList 28.7 kB (0) · 7.4 kB CSS (0) — — · — · —
ChatSendButton 68.4 kB (0) · 11.2 kB CSS (0) — — · — · —
ChatToolCalls 33.2 kB (0) · 8.8 kB CSS (0) — — · — · —
CheckboxList 75.8 kB (0) · 8.2 kB CSS (0) — — · — · —
ClickableCard 19.5 kB (0) · 7.9 kB CSS (0) — — · — · —
CodeBlock 84.1 kB (0) · 12.9 kB CSS (0) — — · — · —
CommandPalette 84.3 kB (0) · 13.5 kB CSS (0) — — · — · —
CommandPaletteInput 34.3 kB (0) · 7.9 kB CSS (0) — — · — · —
ComplexSelector 84.5 kB (0) · 13.3 kB CSS (0) — — · — · —
DateInput 210.0 kB (0) · 19.0 kB CSS (0) — — · — · —
DialogHeader 71.3 kB (0) · 12.9 kB CSS (0) — — · — · —
DrawerHeader 71.4 kB (0) · 14.3 kB CSS (0) — — · — · —
DropdownMenuDivider 5.4 kB (0) · 548 B CSS (0) — ✓ · ✓ · —
DropdownMenuGroup 6.6 kB (0) · 3.4 kB CSS (0) — ✓ · ✓ · —
DropdownMenuRadioGroup 6.7 kB (0) · 3.4 kB CSS (0) — ✓ · ✓ · —
Field 61.8 kB (0) · 7.7 kB CSS (0) — — · — · —
FieldLabel 57.4 kB (0) · 6.1 kB CSS (0) — — · — · —
Heading 12.5 kB (0) · 5.8 kB CSS (0) — — · — · —
HoverCard 31.1 kB (0) · 4.8 kB CSS (0) — — · — · —
IconButton 68.1 kB (0) · 11.2 kB CSS (0) — — · — · —
InfoTip 52.0 kB (0) · 5.7 kB CSS (0) — — · — · —
InputGroup 64.0 kB (0) · 8.9 kB CSS (0) — — · — · —
Lightbox 151.8 kB (0) · 12.3 kB CSS (0) — — · — · —
Link 58.2 kB (0) · 7.4 kB CSS (0) — — · — · —
MobileNav 80.4 kB (0) · 11.8 kB CSS (0) — — · — · —
MobileNavToggle 69.7 kB (0) · 11.8 kB CSS (0) — — · — · —
NavHeadingMenuItem 17.1 kB (0) · 6.7 kB CSS (0) — — · — · —
Overlay 24.1 kB (0) · 4.1 kB CSS (0) — — · — · —
Popover 106.3 kB (0) · 15.5 kB CSS (0) — — · — · —
PowerSearch 320.8 kB (0) · 27.3 kB CSS (0) — — · — · —
ProgressBar 12.5 kB (0) · 6.7 kB CSS (0) — — · — · —
RadioListItem 79.0 kB (0) · 11.2 kB CSS (0) — — · — · —
SelectableCard 19.7 kB (0) · 8.1 kB CSS (0) — — · — · —
SelectorOption 24.9 kB (0) · 6.8 kB CSS (0) — — · — · —
SideNav 116.3 kB (0) · 12.6 kB CSS (0) — — · — · —
SideNavCollapseButton 68.9 kB (0) · 11.2 kB CSS (0) — — · — · —
SideNavItem 83.3 kB (0) · 12.3 kB CSS (0) — — · — · —
Slider 117.4 kB (0) · 9.3 kB CSS (0) — — · — · —
Spinner 25.3 kB (0) · 6.6 kB CSS (0) — — · — · —
StatusDot 34.8 kB (0) · 5.7 kB CSS (0) — — · — · —
Stepper 69.8 kB (0) · 11.3 kB CSS (0) — — · — · —
TableSelectionToolbar 78.5 kB (0) · 14.6 kB CSS (0) — — · — · —
Text 11.7 kB (0) · 5.8 kB CSS (0) — — · — · —
TextArea 95.4 kB (0) · 10.0 kB CSS (0) — — · — · —
Thumbnail 72.4 kB (0) · 12.7 kB CSS (0) — — · — · —
Timer 14.1 kB (0) · 6.4 kB CSS (0) — — · — · —
Timestamp 28.0 kB (0) · 11.4 kB CSS (0) — — · — · —
Toast 108.0 kB (0) · 11.5 kB CSS (0) — — · — · —
ToggleButton 95.5 kB (0) · 11.3 kB CSS (0) — — · — · —
Token 30.4 kB (0) · 5.0 kB CSS (0) — — · — · —
Tooltip 33.1 kB (0) · 4.8 kB CSS (0) — — · — · —
TopNav 71.6 kB (0) · 12.1 kB CSS (0) — — · — · —
TopNavMegaMenu 82.5 kB (0) · 13.1 kB CSS (0) — — · — · —
Typeahead 95.6 kB (0) · 14.4 kB CSS (0) — — · — · —
lab/ChatEmojiPicker 129.7 kB (0) · 773 B CSS (0) — — · — · —
lab/CommentPin 61.9 kB (0) · 1.2 kB CSS (0) — — · — · —
lab/DialogHeroHeader 92.6 kB (0) · 372 B CSS (0) — — · — · —
lab/DiffViewer 96.1 kB (0) · 2.1 kB CSS (0) — — · — · —
lab/EmojiPicker 121.5 kB (0) · 751 B CSS (0) — — · — · —
lab/LineClamp 14.2 kB (0) · 168 B CSS (0) — — · — · —
lab/TabBarMoreList 105.3 kB (0) · 1.8 kB CSS (0) — — · — · —
lab/TourStep 97.4 kB (0) · 691 B CSS (0) — — · — · —
lab/TransferList 140.1 kB (0) · 1.2 kB CSS (0) — — · — · —
DateRangeInput 107.2 kB (−1 B) · 14.2 kB CSS (0) — — · — · —
MultiSelector 110.2 kB (−1 B) · 18.9 kB CSS (0) — — · — · —
SegmentedControl 103.9 kB (−1 B) · 7.2 kB CSS (0) — — · — · —
Switch 112.1 kB (−1 B) · 10.5 kB CSS (0) — — · — · —
TextInput 101.9 kB (−1 B) · 12.9 kB CSS (0) — — · — · —
lab/ChatReactionBar 130.9 kB (−1 B) · 1.1 kB CSS (0) — — · — · —
lab/ListInput 97.7 kB (−1 B) · 922 B CSS (0) — — · — · —
lab/MediaCaptionsButton 229.8 kB (−1 B) · 1.5 kB CSS (0) — — · — · —
lab/MediaPlaybackRate 229.8 kB (−1 B) · 1.5 kB CSS (0) — — · — · —
lab/MediaTime 229.8 kB (−1 B) · 1.5 kB CSS (0) — — · — · —
lab/MediaTimeSlider 229.8 kB (−1 B) · 1.5 kB CSS (0) — — · — · —
richtext/RichTextView 288.2 kB (−1 B) · 2.4 kB CSS (0) — — · — · —
charts/ChartLegend 42.2 kB (−2 B) · 224 B CSS (0) — — · — · —
DateTimeInput 234.3 kB (−2 B) · 20.7 kB CSS (0) — — · — · —
TopNavMenu 88.2 kB (−2 B) · 12.4 kB CSS (0) — — · — · —
lab/MediaFullscreenButton 229.8 kB (−2 B) · 1.5 kB CSS (0) — — · — · —
lab/MediaPlayButton 229.8 kB (−2 B) · 1.5 kB CSS (0) — — · — · —
lab/MediaSeekButton 229.8 kB (−2 B) · 1.5 kB CSS (0) — — · — · —
lab/MediaVolume 229.8 kB (−2 B) · 1.5 kB CSS (0) — — · — · —
ContextMenuItem 39.5 kB (−3 B) · 7.3 kB CSS (0) — — · — · —
NavHeadingMenu 19.2 kB (−3 B) · 3.5 kB CSS (0) — — · — · —
richtext/RichTextEditor 311.5 kB (−3 B) · 2.7 kB CSS (0) — — · — · —
MoreMenu 133.9 kB (−4 B) · 19.8 kB CSS (0) — — · — · —
SideNavHeading 89.0 kB (−4 B) · 12.5 kB CSS (0) — — · — · —
lab/TransferListSelector 152.2 kB (−5 B) · 1.4 kB CSS (0) — — · — · —
DropdownMenu 133.6 kB (−6 B) · 19.8 kB CSS (0) — ✓ · ✓ · ✓
lab/Schedule 119.5 kB (−9 B) · 3.9 kB CSS (0) — — · — · —
charts/ChartTooltip 228.8 kB (−12 B) · 451 B CSS (0) — — · — · —
charts/Chart 252.3 kB (−14 B) · 516 B CSS (0) — — · — · —
Table 126.5 kB (−45 B) · 21.2 kB CSS (0) — — · — · —

Package size: @astryxdesign/core 8.01 MB packed (+1.7 kB); no new dependencies.

Touched components checked; for the full suites, add ci:run-visual for Visual, ci:run-rtl for RTL.


Generated by PR Enrichment workflow | View full report

@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.

On hold for an owner decision; the fix itself holds up. The new cases fail against this pull request's base and pass at this head, the included interaction spec passes in Chromium with the row running exactly once per gesture for a tap and a click on a row's icon and start padding, and no public API changes.

Approval waits on what you flagged yourself: no current record names useMenuPressInternal or its rowSelector, and a new internal hook other components can import is API between components, so an engineering owner has to provide or identify the governing record and settle the shape — the internal hook as written, the option on the public useMenuPress as the issue suggests, or resolving the whole row inside the sheet through the existing public hitTest. An engineering owner records that decision by commenting /approve-spec 870f57ec50c44d6fb72d121811cb6261576c08e6 on this pull request, and you may do so yourself if you are an engineering owner.

Nothing blocking; two points worth your time, and one on CI:

  • rowSelector reuses a word this subsystem already spends on the other element: MENU_ROW_SELECTOR in packages/core/src/DropdownMenu/menuItemRoles.ts and ROW_SELECTOR in packages/core/src/NavMenu/NavHeadingMenu.tsx both name the element a press acts on, while the new option names the container around it, so rowContainerSelector (or wholeRowSelector, matching your own SHEET_WHOLE_ROW_SELECTOR) would leave one meaning per word.
  • The description omits the first-load cost the import-boundaries record asks for when an optional feature or a shared module grows; measured against this head it is +86 B gzip for a page rendering DropdownMenu and ContextMenu, +67 B with Table, +65 B with Selector and 0 B elsewhere, all inside the 0.3 KB allowance, so the numbers are worth adding to the description and nothing needs changing in the code.
  • Required CI has not run at this head: build, test, lint and docsite-test report that they wait for a maintainer's ci:run label.
Claims and files checked

Review mode: full; reason: author-not-engowner

Claims:

  • 15 new unit cases, 10 failing on the base and 5 guard paths passing on both — verified (10 failed, 85 passed when this head's two test files run against the base).
  • Every changed line and branch covered, 12 statements and 8 branches in the hook and 3 statements in the sheet list — verified exactly by coverage over the changed regions.
  • Build, typecheck and strict lint pass — verified for the packages this change touches.
  • The public hook ignores the new option and does not change — verified in the source and by a zero-row API comparison between base and head.
  • A control in a row's end content keeps its own press, and a section heading runs no row — verified by unit cases and in a real browser.
  • The new interaction spec passes in Chromium and WebKit — the Chromium half was re-run here and passed; WebKit was not run.
  • The full two-suite tally and its one unrelated failure — not re-run here.
  • Firefox is not in the interaction configuration — verified; its projects are Chromium and WebKit.
  • The release note's three statements — all verified.

Files:

  • The release note — clear.
  • The press model hook — the naming point above, otherwise clear.
  • The sheet action list — clear, and consistent with the hook's new signature.
  • The two unit test files — clear.
  • The new interaction spec — clear; it matches the interaction project's file pattern and its header follows its siblings.

Automated review (maintainer link)

Comment thread packages/core/src/hooks/useMenuPress.ts Resolved
In Core's menus a "row selector" names the element a press acts on
(MENU_ROW_SELECTOR, NavHeadingMenu's ROW_SELECTOR, both passed as
itemSelector). The new option names the container around that element, so
it is now wholeRowSelector, as the sheet's SHEET_WHOLE_ROW_SELECTOR, and
the helper is findRowAction.

@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.

On hold for one owner decision; nothing in the change is blocking. The fix is one fallback in the press model, read line by line at this head: when a release inside the sheet finds no action, the row's own direct-child action is used, so a tap or click on a row's icon, end content or padding runs the row, while a section heading, a divider, a disabled row and a control in a row's end content keep what they do today.

  • Approval waits on what you raised yourself: no current record names useMenuPressInternal or its wholeRowSelector, and a new internal hook other components can import is API between components, so an engineering owner has to settle the shape — the internal hook as written, the option on the public useMenuPress as the issue suggests, or the whole-row lookup inside the sheet through the existing public hitTest — and record it in the useMenuPress module record. An engineering owner records that decision by commenting /approve-spec 0581a746baaf79f29f0cae952f3339dfb6bfd3b4 on this pull request, and you may do so yourself if you are an engineering owner.
  • Non-blocking: the findRowAction doc comment's second sentence is 28 words and joins two topics, over the 25-word description limit of the repository's comment style; two sentences keep the same rule.
  • The required checks have not run at this head: build, test, lint and docsite-test report that they wait for a maintainer's ci:run label.

The rename to wholeRowSelector and findRowAction and the first-load numbers in the description resolve both points from the previous review.

Claims and files checked

Review mode: full; reason: author-not-engowner

Note: this environment could not reach the package registry, so no test, build or measurement was re-run here; each claim below says how it was checked.

Claims:

  • The release note's three statements (a tap or click on a row's icon, end content or padding runs the row; a section heading runs no row; a control in a row's end content keeps its own press) — verified against the row lookup and the sheet's markup, and each has a unit case.
  • 15 new unit cases — verified by reading both test files (10 in the sheet's file, 5 in the hook's).
  • 10 of them fail against the base and 5 are guard paths — not re-run here; the earlier review of the previous revision measured 10 failures when these files run against the base.
  • Changed-line coverage, the build, typecheck, strict lint and the full test tallies — not re-run here.
  • The public hook ignores the new option and does not change — verified in the source: the option is stripped before the model sees it, and no package entry point reaches the internal hook.
  • The first-load table on the four reference pages — the four pages and their components match the import-boundaries rule, and every number is inside its allowance; not re-measured here.
  • The new interaction spec runs in the phone profile, and Firefox is not in that configuration — verified: the file matches the interaction project's pattern, whose projects are Chromium and WebKit, and the three stories it opens exist and log the picked row.
  • The device and emulator results — taken from the description's text, as this project requires.

Files:

  • The release note — clear.
  • The press model hook — the comment-style suggestion above; the lookup, the public wrapper and the call site are otherwise clear.
  • The sheet's action list — clear, and consistent with the hook's new signature.
  • The two unit test files — clear; they cover the restored paths and the ones that must not change.
  • The new interaction spec — clear; it checks that each point it presses is inside a row and outside every action before pressing.

Automated review (maintainer link)

Comment thread packages/core/src/hooks/useMenuPress.ts Resolved

@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.

On hold for one owner decision; the fix itself checks out. A tap or click on a sheet row's icon, end content or padding now runs that row once: the new cases fail on the base and pass here, and in Chromium at a phone size a tap on a row's icon closes the sheet on this head but not on the base.

  • Approval waits on what you raised yourself: no current record names the new internal hook useMenuPressInternal or its wholeRowSelector option, and a new internal hook other components can import is API between components, so an engineering owner has to settle the shape (the internal hook as written, the option on the public useMenuPress as the issue suggests, or the whole-row lookup inside the sheet through the existing hitTest option) and record it in the useMenuPress module record. An engineering owner records that decision by commenting /approve-spec daf12767eab87a8d7e2e850691dd702ebe96411a on this pull request, and you may do so yourself if you are an engineering owner.
  • Non-blocking: the UseMenuPressInternalOptions doc comment ends in "the public ones, and more"; naming the option ("The public options and the internal wholeRowSelector.") keeps it precise.
  • The required checks have not run at this head: build, test, lint and docsite-test wait for a maintainer to add the ci:run label.

Both points from the earlier inline comments (the option's name and the long doc sentence) are resolved at this head.

Claims and files checked

Review mode: full; reason: author-not-engowner

Claims:

  • A tap or click on a sheet row's icon, end content or padding runs the row, as a tap on its label does — verified: sheet unit cases for touch and mouse, and a real Chromium tap on a row's icon (the sheet stays open on the base and closes here).
  • A section heading still runs no row — verified: unit case; the section row holds no action of its own.
  • A control in a row's end content keeps its own press — verified: unit case; the action lookup finds that control first.
  • The cause is the action-only row selector, with the icon and end content rendered beside the action, and the stray release then swallowing the browser's click — verified in the sheet's selector, the row markup and the base's behavior in Chromium.
  • The public useMenuPress strips the new option and does not change, and the hooks entry does not export the internal hook — verified in the source; the repository's API surface generator reports no public API change for Core or any theme.
  • A disabled row's icon runs nothing, and a disabled link row picks nothing — verified: unit cases; in Chromium a disabled row takes no pointer events, so nothing is lit either.
  • The row acts once — verified: the link-row case sees one selection and one link click.
  • No visual change, string or data attribute — verified in the diff.
  • 15 new unit cases, 10 failing on the base and 5 guard paths passing on both — verified by running them against the base.
  • Every changed line and branch is covered — consistent with the cases read (each new branch has one); coverage not re-run.
  • Build, typecheck, strict lint and the full test tallies — the Core and theme builds and the six affected test files (750 tests) pass here; typecheck, lint and the full suite not re-run.
  • The interaction spec passes in Chromium and WebKit and fails against the base — not re-run; its stories, row labels and harness helpers exist at this head.
  • The three-engine before and after table — the Chromium tap on a row's icon reproduced here; Firefox and WebKit taken from the description.
  • The first-load table on the four reference pages — not re-measured; every delta is within the 0.3 KB allowance.
  • ContextMenu gets the same fix through the shared sheet action list — verified: ContextMenu renders that list.

Files:

  • The release note — clear.
  • The press model hook — the non-blocking comment wording above; otherwise clear.
  • The sheet's action list — clear, and consistent with the hook's new option.
  • The two unit test files — clear; they cover the restored paths and the ones that must not change.
  • The new interaction spec — clear by reading; it checks that each point it presses is inside a row and outside every action.

Automated review (maintainer link)

Comment thread packages/core/src/hooks/useMenuPress.ts Resolved

@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.

On hold for one owner decision; the fix itself checks out. A tap or click on a sheet row's icon, end content or padding now runs that row once: the new cases fail on the base and pass here, and in Chromium at a phone size a tap on a row's icon and a mouse click on its padding close the sheet on this head but not on the base.

  • Approval waits on the decision you raised yourself: no current record names the new internal hook useMenuPressInternal or its wholeRowSelector option, and a new internal hook that other components can import is API between components, so an engineering owner has to settle its shape (the internal hook as written, the option on the public useMenuPress as the issue suggests, or the whole-row lookup inside the sheet through the existing hitTest option) and record it in the useMenuPress module record. An engineering owner records that decision by commenting /approve-spec 3007f571bc1903692de7d3bb9b7b4308554d5d08 on this pull request, and you may do so yourself if you are an engineering owner.
  • The required checks have not run at this head: build, test, lint and docsite-test wait for a maintainer to add the ci:run label.

The comment-style point from the last inline comment is resolved at this head.

Claims and files checked

Review mode: full; reason: author-not-engowner

Claims:

  • A tap or click on a sheet row's icon, end content or padding runs the row, as a tap on its label does: verified by the sheet's touch and mouse unit cases and by Chromium, where a tap on a row's icon and a mouse click on its padding leave the sheet open with nothing run on the base, and run the row once and close the sheet here.
  • A section heading still runs no row: verified by the section-heading unit case; a section row holds no action of its own.
  • A control in a row's end content keeps its own press: verified for a button in end content by its unit case; menu end content is documented as non-interactive.
  • The cause is a lookup that finds no row under the icon or the padding, and the stray release then swallows the browser's click: verified; in Chromium the hit test answers the icon and the row itself, both outside the row's action, and a stray release arms the click guard.
  • The row acts once, because the act arms the click guard: verified by the act path and the link-row unit case (one select, one link click).
  • The option exists only on the internal hook, which the hooks entry does not export, and the public hook strips it: verified in the hooks entry, the public hook and its unit case.
  • No visual change, string or data attribute: verified from the diff; the API surface generator reports no rows.
  • Fifteen new unit cases, ten failing on the base and five passing on both: verified on the issued base (ten failed, 85 passed); two of the ten fail there only because the internal hook does not exist yet.
  • A tap on a submenu row's chevron opens its submenu, and a disabled row's icon runs nothing: verified by their unit cases.
  • Build, typecheck and lint pass: the Core and theme builds pass here; typecheck, lint and the full suites were not rerun; the menu suites pass (961 tests).
  • The interaction spec and the three-engine runs pass: not rerun here; the Chromium icon tap and padding click agree with them.
  • Every changed line and branch is covered: not rerun here.
  • First-load deltas of 0, 0, 84 and 90 bytes on the four reference pages: reported in the description, not re-measured; each is within the 0.3 KB allowance.

Files:

  • .changeset/dropdownmenu-contextmenu-in-the-bottom-sheet-a-t-dsrf.md: clear; matches the code and tests.
  • packages/core/src/DropdownMenu/MenuBottomSheetActionList.tsx: clear.
  • packages/core/src/hooks/useMenuPress.ts: the new internal hook and option await the owner decision above; no defect.
  • packages/core/src/DropdownMenu/MenuBottomSheetActionList.test.tsx: clear.
  • packages/core/src/hooks/useMenuPress.test.tsx: clear.
  • packages/core/src/DropdownMenu/__tests__/DropdownMenuSheetRowPress.interaction.browser.spec.ts: clear; read, not run here.

Automated review (maintainer link)

cixzhang and others added 2 commits November 15, 2026 22:02
…ss's hitTest

Reshapes the fix to the existing public option instead of an internal hook.
useMenuPressInternal and its wholeRowSelector option are gone. The hook's
default point lookup (the menu's own shadow root, and seeing through an
input hold's shield) moves into elementAtMenuPoint in useMenuPress.ts,
exported from the module but not from the hooks entry point; the hook calls
it, with no change in behavior. MenuBottomSheetActionList passes a hitTest
that calls it and maps a point anywhere in a row (icon, end content,
padding) to the row's own action, the li's direct child.

The hook unit cases now drive the row mapping through hitTest. Four
DropdownMenu and ContextMenu test files stub elementFromPoint to the
dispatched pointer target, because the sheet's hit test has no jsdom
event.target fallback (9 cases). DropdownMenu.spec FR5 states the sheet
row rule and the verification map lists the new cases.

Co-authored-by: shashank03-dev <[email protected]>
@cixzhang
cixzhang marked this pull request as draft November 16, 2026 06:32
@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 16, 2026
@cixzhang

Copy link
Copy Markdown
Contributor

/approve-spec 3644b8f

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 16, 2026
@cixzhang cixzhang added the ci:run A maintainer lets this outside contributor's pull request run CI (AST-030 FR17) label Nov 16, 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. A tap or click on a bottom-sheet row's icon, end content or padding now runs that row in DropdownMenu and ContextMenu, and the new cases fail on main and pass here. Two things need fixing before approval:

  • The description says the read-only checkbox case "is red on main and green here", but it passes on main (8 of the 18 new cases fail there, and this is not one of them), so correct or drop that parenthetical.
  • MenuBottomSheetActionList.tsx:62-66 copies Item's click rule (closest('button, a, input, select, textarea') plus hasInteractiveAncestor, from Item.tsx:905-906) instead of sharing it; move the rule into one helper in hooks/useClickableContainer.ts that both call, so the row's click and the sheet's release cannot drift apart.

The spec change is approved for this head and the public API is unchanged. Non-blocking: the first-load table in the description comes from an earlier head (menu −46 B and table −15 B gzip here, still within the allowance).

Claims and files checked

Review mode: full; reason: author-not-engowner

  • Claims:
    • Changeset: a tap or click on a sheet row's icon, end content or padding runs the row: verified (new unit cases; real-browser tap and click).
    • Changeset: a section heading still runs no row: verified (unit case; real-browser tap).
    • Changeset: a control in a row's end content keeps its own press: verified for buttons and links; a switch or checkbox runs no row but still never toggles in the sheet (known, tracked separately).
    • Cause: the press model finds the row by its button or link, the icon and end content sit beside it, and a stray release arms the click guard: verified in the code.
    • The hook's point lookup moves unchanged into an internal function that neither the hooks entry point nor the package exports: verified.
    • The sheet maps a point in a row's content to that row's action; a control, a disabled row, a heading or a divider runs nothing: verified (unit cases).
    • Without elementFromPoint the sheet keeps the hook's event-target lookup: verified.
    • The spec's FR5 sentence and verification row are added: verified.
    • 18 new unit cases, 14 for the sheet and 4 for the hook: verified.
    • 8 fail on main and pass here (6 sheet, 2 hook): verified.
    • 10 guard cases pass on both: verified; the read-only checkbox case being red on main: false (it passes on main).
    • Every changed line of the two source files is covered: verified.
    • Removing the click guard from the act fails the link-row case: verified.
    • Before and after in real browsers (nothing runs on main; the row runs once and the sheet closes here; the chevron opens its submenu; the point hits the icon or the row): verified in Chromium; Firefox and WebKit not rerun.
    • No new public API, hook or option: verified (API comparison shows no change).
    • First-load cost within 0.3 KB and no module added: verified; the table's figures are from an earlier head.
    • Build, lint and suite results quoted for earlier heads: describe earlier heads; at this head the six menu suites pass and formatting and lint are clean on the changed files.
    • Known limit tracked in a separate issue: verified that the issue exists.
  • Files:
    • .changeset/dropdownmenu-contextmenu-in-the-bottom-sheet-a-t-dsrf.md: clear (wording note).
    • docs/specs/components/DropdownMenu/DropdownMenu.spec.md: clear (approved for this head).
    • packages/core/src/DropdownMenu/MenuBottomSheetActionList.tsx: finding (copied click rule, lines 62-66).
    • packages/core/src/DropdownMenu/MenuBottomSheetActionList.test.tsx: clear.
    • packages/core/src/DropdownMenu/__tests__/DropdownMenuSheetRowPress.interaction.browser.spec.ts: clear (not run here).
    • packages/core/src/hooks/useMenuPress.ts: clear.
    • packages/core/src/hooks/useMenuPress.test.tsx: clear.

Automated review (maintainer link)

@cixzhang

Copy link
Copy Markdown
Contributor

/approve-spec 640e5f2

@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 pending CI: CI has not run on this head yet. The pull request is a draft, so CI runs once it is marked ready for review (the ci:run label is already set).

A tap or click on a bottom-sheet row's icon, end content or padding now runs that row in DropdownMenu and ContextMenu, and the new cases fail on main and pass here. Item's row click and the sheet's release now share one control rule, which settles the last round's request. The public API is unchanged, and the spec sentence is approved for this head.

Non-blocking:

  • The changeset says a control in a row's end content "keeps its own press"; that holds for buttons and links, but a switch or checkbox there still never toggles in the sheet (#13636), so "does not run the row" would describe it exactly.
  • The description's first-load table predates the last commit: at this head the menu page is −17 B and the table page −7 B gzip (docs and form +0 B), still well within the 0.3 KB allowance.
Claims and files checked

Review mode: full; reason: author-not-engowner

  • Claims:
    • Changeset: a tap or click on a sheet row's icon, end content or padding runs the row: verified (new unit cases fail on main and pass here; real-browser tap and click in Chromium).
    • Changeset: a section heading still runs no row: verified (unit case; real-browser tap).
    • Changeset: a control in a row's end content keeps its own press: verified for buttons and links; a switch or checkbox runs no row but never toggles (known, tracked in #13636).
    • Cause: the press model finds the row by its button or link, the icon and end content sit beside it, the padding is the row itself, and the stray release swallows the browser's click: verified in the code and by a hit test at the icon and the padding.
    • The hook's point lookup moves unchanged into an internal function that neither the hooks entry point nor the package exports: verified.
    • The sheet maps a point in a row to that row's action; a control, a disabled row, a heading or a divider runs nothing: verified (unit cases).
    • Item's row click and the sheet's release call one shared rule: verified; Item's rule is unchanged.
    • Without elementFromPoint the sheet keeps the hook's event-target lookup, and no other test needs a stub: verified (the menu, list and item suites pass).
    • The spec's FR5 sentence and verification row are added: verified.
    • 18 new unit cases, 14 for the sheet and 4 for the hook: verified.
    • 8 fail on main and pass here (6 sheet, 2 hook), and 10 guard cases pass on both: verified.
    • Every changed line of the two source files is covered: verified.
    • Removing the click guard from the act fails the link-row case: verified.
    • Before and after in real browsers (nothing runs on main; the row runs once and the sheet closes here; the chevron opens its submenu; the point hits the icon or the row, never the button): verified in Chromium; Firefox and WebKit not rerun.
    • The new interaction spec's results and the three-engine run: not rerun here; the same spots reproduce in Chromium.
    • No new public API, hook or option: verified (the API comparison shows no change).
    • First-load cost within 0.3 KB and no module added: verified; the table's figures predate the last commit.
    • Build, lint and suite results quoted for earlier heads: they describe earlier heads; at this head the typecheck passes, formatting and lint are clean on the changed files, and the related suites pass.
    • Overlap with another pull request that edits the same record: verified (it is closed).
    • Known limit tracked in a separate issue: verified that the issue exists.
  • Files:
    • .changeset/dropdownmenu-contextmenu-in-the-bottom-sheet-a-t-dsrf.md: clear (wording note).
    • docs/specs/components/DropdownMenu/DropdownMenu.spec.md: clear (approved for this head).
    • packages/core/src/DropdownMenu/MenuBottomSheetActionList.tsx: clear.
    • packages/core/src/DropdownMenu/MenuBottomSheetActionList.test.tsx: clear.
    • packages/core/src/DropdownMenu/__tests__/DropdownMenuSheetRowPress.interaction.browser.spec.ts: clear (not run here).
    • packages/core/src/Item/Item.tsx: clear (same rule, now shared).
    • packages/core/src/hooks/useClickableContainer.ts: clear.
    • packages/core/src/hooks/useMenuPress.ts: clear.
    • packages/core/src/hooks/useMenuPress.test.tsx: clear.

Automated review (maintainer link)

@cixzhang
cixzhang marked this pull request as ready for review November 23, 2026 06:08
@cixzhang
cixzhang marked this pull request as draft November 23, 2026 06:09
@cixzhang

Copy link
Copy Markdown
Contributor

/approve-spec bf2114a

@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 pending CI: CI has not run on this head yet. The pull request is a draft, so CI runs once it is marked ready for review (the ci:run label is already set).

A tap or click on a bottom-sheet row's icon, end content or padding now runs that row in DropdownMenu and ContextMenu; the new cases fail on main and pass here, and a phone-size Chromium run of the action-sheet story shows the same before and after. The changeset now describes end-content controls exactly, which settles the last round's note.

Non-blocking:

  • Miss: the new FR5 sentence in DropdownMenu.spec.md says a control in a row's content "keeps its own press", but a switch or checkbox there still never toggles in the sheet (#13636), so one gap line under Current-state impact would keep the record accurate until that is decided.
Claims and files checked

Review mode: full; reason: author-not-engowner

  • Claims:
    • Changeset: a tap or click on a bottom-sheet row's icon, end content or padding runs the row, as a tap on its label does: verified (the new unit cases fail on main and pass here; a Chromium tap on the icon and a click on the padding).
    • Changeset: a section heading still runs no row: verified (unit case, on main and here).
    • Changeset: a press on a control in a row's end content does not run the row: verified (button, switch, disabled button and read-only checkbox cases).
    • Cause: the press model finds the row by its button or link, the icon and end content sit beside it, the padding is the row itself, and the stray release swallows the browser's click: verified in the code and by a hit test at the icon (an svg) and the padding (the row).
    • Fix: a release that finds no item takes the row under the point and acts on the row's own action, its direct child: verified.
    • The quoted press-model requirements match the current record: verified.
    • No new hook or option; the sheet uses the existing hit-test option: verified (the API comparison lists no change).
    • The hook's point lookup moves unchanged into an internal function that neither the hooks entry point nor the package exports, keeping the shadow-root and input-shield handling: verified.
    • A control in the end content keeps its press through the one rule Item's row click and the sheet's release share: verified.
    • A disabled row, a section heading and a divider run nothing: verified (unit cases).
    • The spec's FR5 sentence and verification row are added: verified.
    • Before and after in real browsers (nothing runs on main; here the row runs once and the sheet closes; the point hits the icon or the row, never the button): verified in Chromium; Firefox and WebKit not rerun.
    • A tap on a submenu row's chevron opens its submenu: verified by its unit case.
    • 18 new unit cases, 14 for the sheet and 4 for the hook: verified.
    • 8 fail on main and pass here (6 sheet, 2 hook), and 10 guard cases pass on both: verified.
    • Every changed line of the two source files is covered: verified (every changed statement runs).
    • Removing the click guard from the act fails the link-row case: verified (the row is selected twice).
    • Without elementFromPoint the sheet keeps the hook's event-target lookup, and no other test file needs a stub: verified (the menu, list and item suites pass unchanged).
    • First-load cost: docs and form +0 B, menu and table a few bytes smaller, no module added: verified (this run: menu −16 B, table −5 B gzip, within 0.3 KB).
    • Build, typecheck, lint and suite figures quoted for earlier heads: they describe earlier heads; at this head the Core build, typecheck, lint and formatting pass, and the related suites pass.
    • The new interaction spec's own results and the three-engine run: not rerun here.
    • Overlap with another pull request that edits the same record: verified (it is closed).
    • Known limit: a switch or checkbox in end content runs no row and never toggles, tracked separately: verified.
  • Files:
    • .changeset/dropdownmenu-contextmenu-in-the-bottom-sheet-a-t-dsrf.md: clear
    • docs/specs/components/DropdownMenu/DropdownMenu.spec.md: clear (approved for this head; one wording note)
    • packages/core/src/DropdownMenu/MenuBottomSheetActionList.tsx: clear
    • packages/core/src/DropdownMenu/MenuBottomSheetActionList.test.tsx: clear
    • packages/core/src/DropdownMenu/__tests__/DropdownMenuSheetRowPress.interaction.browser.spec.ts: clear (not run here)
    • packages/core/src/Item/Item.tsx: clear (same rule, now shared)
    • packages/core/src/hooks/useClickableContainer.ts: clear
    • packages/core/src/hooks/useMenuPress.test.tsx: clear
    • packages/core/src/hooks/useMenuPress.ts: clear

Automated review (maintainer link)

| FR3 | Button owns the Trigger button, BottomSheet owns the Touch sheet frame, List owns the Touch action list and Touch action rows, Indicator owns checkbox chrome, and Icon owns ordinary rendered icons. The Trigger button carries `component:Button`'s gaps: its press scale applies under reduced motion (`design:reduced-motion` DR1) and its height is fixed (`spec:AST-102` FR4). | Current source and owner docs; `design:reduced-motion` DR1; `spec:AST-102` FR4 |
| FR4 | The same `dropdown-menu` target reaches the alternative Pointer menu surface and Touch menu surface. Pointer action rows carry `dropdown-menu-item`; touch action rows instead use List's `list-item` target. | Current source and tests |
| FR5 | Both menu surfaces carry `data-astryx-menu-press` and follow `module:DropdownMenu/useMenuPress` FR1–FR7, FR10, and FR11: the row under the release acts, the highlight follows a held pointer, a mouse released outside closes and a finger leaves the menu open, the browser's stray click never acts, and the Pointer menu surface declares `touch-action` by overflow. The grow, collapse, and pan dismissal under a finger are FR21. | `module:DropdownMenu/useMenuPress`; `spec:AST-094` FR26–FR28 |
| FR5 | Both menu surfaces carry `data-astryx-menu-press` and follow `module:DropdownMenu/useMenuPress` FR1–FR7, FR10, and FR11: the row under the release acts, the highlight follows a held pointer, a mouse released outside closes and a finger leaves the menu open, the browser's stray click never acts, and the Pointer menu surface declares `touch-action` by overflow. In the Touch sheet a point anywhere in an action row, its icon, end content or padding, is that row's action; a control in the row's content keeps its own press, and a section heading or a divider is no row. The grow, collapse, and pan dismissal under a finger are FR21. | `module:DropdownMenu/useMenuPress`; `spec:AST-094` FR26–FR28 |

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.

Non-blocking (Miss): "a control in the row's content keeps its own press" holds for a button or link, which the sheet clicks, but a switch or checkbox in the end content still never toggles in the sheet (#13636). A gap line under Current-state impact, such as "FR5 gap: a switch or checkbox in a sheet row's end content does not toggle", keeps the record accurate until that is decided; the record change then needs an engineering owner's approval for the new head.

@cixzhang
cixzhang marked this pull request as ready for review November 23, 2026 06:38
@cixzhang
cixzhang marked this pull request as draft November 23, 2026 06:41
@cixzhang
cixzhang marked this pull request as ready for review November 23, 2026 06:42
@github-actions github-actions Bot removed the needs:code-review High-risk change (new package/component/API) — needs human code review before merge label Nov 23, 2026
@cixzhang
cixzhang marked this pull request as draft November 23, 2026 11:09
@github-actions github-actions Bot added the needs:code-review High-risk change (new package/component/API) — needs human code review before merge label Nov 23, 2026
@cixzhang

Copy link
Copy Markdown
Contributor

/approve-spec 65b0b42

@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 pending CI: CI is running on this head and has not finished yet.

A tap or click on a bottom-sheet row's icon, end content or padding now runs that row once in DropdownMenu and ContextMenu, and the latest merge of main leaves the fix unchanged. The new cases fail on main and pass here, and a phone-size Chromium run of the action-sheet story shows the same before and after.

Non-blocking:

  • The new FR5 sentence in DropdownMenu.spec.md says a control in a row's content "keeps its own press", but a switch or checkbox there still never toggles in the sheet (#13636), so one gap line under Current-state impact would keep the record accurate until that is decided.
Claims and files checked

Review mode: full; reason: author-not-engowner

  • Claims:
    • Changeset: a tap or click on a bottom-sheet row's icon, end content or padding runs the row, as a tap on its label does: verified (the new unit cases fail on main and pass here; in Chromium a tap and a mouse click on the icon and on the start padding run the row once and close the sheet, and run nothing on main).
    • Changeset: a section heading still runs no row: verified (unit case, on main and here).
    • Changeset: a press on a control in a row's end content does not run the row: verified (button, switch, disabled button and read-only checkbox cases).
    • Cause: the press model finds the row by its button or link, the icon and end content sit beside it and the padding is the row itself: verified (in Chromium the point at the icon is the icon and the point in the padding is the row, neither inside the button).
    • Cause: the stray release arms the click guard, so the browser's own click is swallowed too: verified in the press model's release rule.
    • Fix: a release that finds no item takes the row under the point and acts on its direct-child action: verified (MenuBottomSheetActionList.tsx).
    • The quoted press-model requirements match the current record: verified.
    • No new hook or option; the sheet uses the existing hit-test option: verified (the API comparison lists no change).
    • The hook's point lookup moves unchanged into an internal function that neither the hooks entry point nor the package exports, keeping the shadow-root and input-shield handling: verified.
    • A control in the end content keeps its press through the one rule Item's row click and the sheet's release share: verified.
    • A disabled row, a section heading and a divider run nothing: verified (unit cases; in a browser a disabled row also ignores pointer input).
    • The FR5 sentence and the verification-map row are added: verified.
    • Before and after in real browsers (nothing runs on main; here the row runs once and the sheet closes): verified in Chromium; Firefox and WebKit not rerun.
    • A tap on a submenu row's chevron opens its submenu: verified (unit case).
    • 18 new unit cases, 14 for the sheet and 4 for the hook: verified.
    • 8 fail on main and pass here (6 sheet, 2 hook), and 10 guard cases pass on both: verified.
    • Every changed line of the two source files is covered: verified (every changed statement runs in the two test files).
    • Removing the click guard from the act fails the link-row case: not rerun at this head.
    • Without elementFromPoint the sheet keeps the hook's event-target lookup, and no other test file needs a stub: verified (the menu, list, item and selector suites pass unchanged).
    • First-load cost within the 0.3 KB allowance, no module added: verified; against the current base this run measures docs +0, form +1, menu −20 and table +4 bytes gzip, a few bytes off the quoted figures from an earlier head.
    • Build, typecheck, lint and suite figures quoted for earlier heads: they describe earlier heads; at this head the Core typecheck, strict lint, formatting and knowledge checks pass, and the related suites pass.
    • The new interaction spec's own results and the three-engine run: not rerun here.
    • main merged with the contributor's files unchanged: verified (this head's own patch is identical to the one last reviewed).
    • Overlap with another pull request that edits the same record: verified (it is closed).
    • Known limit: a switch or checkbox in end content runs no row and never toggles, tracked separately: verified (the issue is open).
  • Files:
    • .changeset/dropdownmenu-contextmenu-in-the-bottom-sheet-a-t-dsrf.md: clear
    • docs/specs/components/DropdownMenu/DropdownMenu.spec.md: clear (approved for this head; one wording note)
    • packages/core/src/DropdownMenu/MenuBottomSheetActionList.tsx: clear
    • packages/core/src/DropdownMenu/MenuBottomSheetActionList.test.tsx: clear
    • packages/core/src/DropdownMenu/__tests__/DropdownMenuSheetRowPress.interaction.browser.spec.ts: clear (not run here)
    • packages/core/src/Item/Item.tsx: clear (same rule, now shared)
    • packages/core/src/hooks/useClickableContainer.ts: clear
    • packages/core/src/hooks/useMenuPress.test.tsx: clear
    • packages/core/src/hooks/useMenuPress.ts: clear

Automated review (maintainer link)

@cixzhang
cixzhang marked this pull request as ready for review November 23, 2026 11:43
@cixzhang
cixzhang marked this pull request as draft November 23, 2026 11:48
@cixzhang
cixzhang marked this pull request as ready for review November 23, 2026 11:48
@github-actions github-actions Bot removed the needs:code-review High-risk change (new package/component/API) — needs human code review before merge label Nov 23, 2026
@cixzhang
cixzhang merged commit 823baf3 into meta:main Nov 23, 2026
284 of 294 checks passed
@cixzhang

Copy link
Copy Markdown
Contributor

🤖 (Posted by Cindy's agent.) Merged, thank you @shashank03-dev, and thanks for your patience through several main merges while the shared menu work landed! In a DropdownMenu or ContextMenu shown as a bottom sheet, tapping a row's icon, end content or padding now runs that row, instead of doing nothing. One related case, a switch or checkbox inside a row's end content, is tracked separately in #13636. It ships in the next release, with you credited.

This branch was successfully deployed

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

Labels

ci:run A maintainer lets this outside contributor's pull request run CI (AST-030 FR17) ci:run-a11y Run the accessibility suite on this PR; write access, next push (AST-030 FR12) CLA Signed This label is managed by the Meta Open Source bot. community Authored by a community contributor (not on the eng/design team) lane:1 Astryx fix-loop lane 1 owns this

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] DropdownMenu, ContextMenu: in the bottom sheet, a tap on a row's icon, end content or padding does nothing

2 participants