Repository navigation
fix(BottomSheet): a finger drag yields to content whose touch-action allows no one-finger pan - #12888
Conversation
…forbids the vertical pan A finger's drag on the sheet body armed on every touch outside a nested dialog, so a press on a menu whose rows fit (touch-action pinch-zoom) inside a sheet moved the sheet while the menu tracked the same finger. The sheet's body drag is a pan recognizer, and a pan recognizer leaves a touch to an element whose touch-action forbids that pan. The sheet now skips a touch that lands under such an element between the target and the body, as it skips one inside a nested dialog. Content that allows the vertical pan (auto, manipulation, pan-y) drags the sheet as before. Unit cases cover the touch-action values and the drag; a real-Chromium touch pull on content set to pinch-zoom leaves the sheet still (it stretched 50 px on main) and pulls it under pan-y pinch-zoom.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
|
/approve-spec 5672a8c |
PR Analysis Report🔎 Preview ·
|
| Component | Size | LoC | Visual · A11y · RTL |
|---|---|---|---|
| BottomSheet | 75.5 kB (+180 B) · 7.8 kB CSS (0) | — | ✓ · ✓ · — |
| Drawer | 57.3 kB (+165 B) · 8.7 kB CSS (0) | — | — · — · — |
| TimeInput | 180.1 kB (+143 B) · 17.8 kB CSS (0) | — | — · — · — |
128 more components
| Component | Size | LoC | Visual · A11y · RTL |
|---|---|---|---|
| lab/TourStep | 96.4 kB (+67 B) · 691 B CSS (0) | — | — · — · — |
| DateTimeInput | 231.7 kB (+61 B) · 20.6 kB CSS (0) | — | — · — · — |
| Carousel | 77.3 kB (+57 B) · 12.1 kB CSS (0) | — | — · — · — |
| TableCell | 106.1 kB (+56 B) · 20.1 kB CSS (0) | — | — · — · — |
| PowerSearch | 317.8 kB (+54 B) · 27.3 kB CSS (0) | — | — · — · — |
| TableHeaderCell | 106.0 kB (+53 B) · 20.0 kB CSS (0) | — | — · — · — |
| lab/Schedule | 117.4 kB (+49 B) · 3.9 kB CSS (0) | — | — · — · — |
| ContextMenu | 104.9 kB (+48 B) · 19.6 kB CSS (0) | — | — · — · — |
| DateInput | 207.8 kB (+48 B) · 18.9 kB CSS (0) | — | — · — · — |
| Table | 123.9 kB (+46 B) · 21.1 kB CSS (0) | — | — · — · — |
| ContextMenuItem | 38.7 kB (+45 B) · 7.3 kB CSS (0) | — | — · — · — |
| CommandPalette | 82.7 kB (+44 B) · 13.5 kB CSS (0) | — | — · — · — |
| Markdown | 208.1 kB (+41 B) · 23.4 kB CSS (0) | — | — · — · — |
| BaseTypeahead | 83.6 kB (+17 B) · 12.1 kB CSS (0) | — | — · — · — |
| Tokenizer | 112.5 kB (+15 B) · 21.9 kB CSS (0) | — | — · — · — |
| TopNavMenu | 86.8 kB (+15 B) · 12.4 kB CSS (0) | — | — · — · — |
| ChatComposerInput | 87.5 kB (+14 B) · 12.5 kB CSS (0) | — | — · — · — |
| ChatComposerTokenElement | 87.5 kB (+14 B) · 12.5 kB CSS (0) | — | — · — · — |
| Typeahead | 94.6 kB (+14 B) · 14.4 kB CSS (0) | — | — · — · — |
| ChatComposer | 90.4 kB (+13 B) · 13.5 kB CSS (0) | — | — · — · — |
| SideNavItem | 82.0 kB (+13 B) · 12.3 kB CSS (0) | — | — · — · — |
| TopNavHeading | 87.4 kB (+13 B) · 12.4 kB CSS (0) | — | — · — · — |
| SideNavHeading | 87.7 kB (+12 B) · 12.5 kB CSS (0) | — | — · — · — |
| TabMenu | 84.0 kB (+12 B) · 12.3 kB CSS (0) | — | — · — · — |
| TopNavMegaMenu | 81.4 kB (+12 B) · 13.0 kB CSS (0) | — | — · — · — |
| ComplexSelector | 83.3 kB (+11 B) · 13.2 kB CSS (0) | — | — · — · — |
| lab/ChatEmojiPicker | 127.4 kB (+8 B) · 773 B CSS (0) | — | — · — · — |
| richtext/RichTextEditorToolbar | 314.8 kB (+8 B) · 454 B CSS (0) | — | — · — · — |
| lab/ChatReactionBar | 128.6 kB (+7 B) · 1.1 kB CSS (0) | — | — · — · — |
| Popover | 103.9 kB (+6 B) · 15.5 kB CSS (0) | — | — · — · — |
| lab/AudioPlayer | 233.1 kB (+6 B) · 1.8 kB CSS (0) | — | — · — · — |
| MultiSelector | 108.7 kB (+5 B) · 18.9 kB CSS (0) | — | — · — · — |
| lab/TransferListSelector | 150.6 kB (+5 B) · 1.4 kB CSS (0) | — | — · — · — |
| lab/VideoPlayer | 230.7 kB (+5 B) · 2.1 kB CSS (0) | — | — · — · — |
| BreadcrumbItem | 102.1 kB (+4 B) · 14.0 kB CSS (0) | — | — · — · — |
| DateRangeInput | 105.8 kB (+4 B) · 14.2 kB CSS (0) | — | — · — · — |
| Pagination | 152.8 kB (+2 B) · 20.0 kB CSS (0) | — | — · — · — |
| MoreMenu | 113.3 kB (+1 B) · 19.8 kB CSS (0) | — | — · — · — |
| Selector | 119.8 kB (+1 B) · 19.7 kB CSS (0) | — | — · — · — |
| AlertDialog | 132.8 kB (0) · 16.2 kB CSS (0) | — | — · — · — |
| AppShell | 100.6 kB (0) · 14.9 kB CSS (0) | — | — · — · — |
| AvatarGroupOverflow | 52.8 kB (0) · 6.0 kB CSS (0) | — | — · — · — |
| Banner | 69.2 kB (0) · 11.6 kB CSS (0) | — | — · — · — |
| BottomSheetSwitcher | 19.2 kB (0) · 3.4 kB CSS (0) | — | ✓ · ✓ · — |
| Button | 67.1 kB (0) · 11.1 kB CSS (0) | — | — · — · — |
| ButtonGroup | 44.7 kB (0) · 3.7 kB CSS (0) | — | — · — · — |
| Calendar | 78.3 kB (0) · 11.8 kB CSS (0) | — | — · — · — |
| ChatDictationButton | 67.7 kB (0) · 11.2 kB CSS (0) | — | — · — · — |
| ChatLayout | 90.8 kB (0) · 11.7 kB CSS (0) | — | — · — · — |
| ChatLayoutScrollButton | 67.7 kB (0) · 11.3 kB CSS (0) | — | — · — · — |
| ChatSendButton | 67.6 kB (0) · 11.1 kB CSS (0) | — | — · — · — |
| CheckboxInput | 71.0 kB (0) · 10.6 kB CSS (0) | — | — · — · — |
| CheckboxListItem | 81.9 kB (0) · 12.5 kB CSS (0) | — | — · — · — |
| ClickableCard | 19.3 kB (0) · 7.9 kB CSS (0) | — | — · — · — |
| CodeBlock | 83.3 kB (0) · 12.9 kB CSS (0) | — | — · — · — |
| Collapsible | 29.6 kB (0) · 4.5 kB CSS (0) | — | — · — · — |
| CommandPaletteItem | 13.6 kB (0) · 3.6 kB CSS (0) | — | — · — · — |
| Dialog | 27.7 kB (0) · 7.3 kB CSS (0) | — | — · — · — |
| DialogHeader | 70.4 kB (0) · 12.8 kB CSS (0) | — | — · — · — |
| DrawerHeader | 70.6 kB (0) · 14.3 kB CSS (0) | — | — · — · — |
| DropdownMenu | 113.0 kB (0) · 19.8 kB CSS (0) | — | — · — · — |
| DropdownMenuCheckboxItem | 29.3 kB (0) · 7.6 kB CSS (0) | — | — · — · — |
| DropdownMenuItem | 28.5 kB (0) · 7.1 kB CSS (0) | — | — · — · — |
| DropdownMenuRadioItem | 29.4 kB (0) · 7.6 kB CSS (0) | — | — · — · — |
| DropdownMenuSubMenu | 80.3 kB (0) · 11.0 kB CSS (0) | — | — · — · — |
| FileInput | 77.0 kB (0) · 12.8 kB CSS (0) | — | — · — · — |
| IconButton | 67.2 kB (0) · 11.1 kB CSS (0) | — | — · — · — |
| Item | 20.8 kB (0) · 6.2 kB CSS (0) | — | — · — · — |
| Lightbox | 150.7 kB (0) · 12.3 kB CSS (0) | — | — · — · — |
| Link | 57.8 kB (0) · 7.4 kB CSS (0) | — | — · — · — |
| ListItem | 81.1 kB (0) · 12.5 kB CSS (0) | — | — · — · — |
| MobileNav | 78.6 kB (0) · 11.8 kB CSS (0) | — | — · — · — |
| MobileNavToggle | 67.5 kB (0) · 11.1 kB CSS (0) | — | — · — · — |
| NavHeadingMenu | 18.8 kB (0) · 3.5 kB CSS (0) | — | — · — · — |
| NumberInput | 105.8 kB (0) · 13.0 kB CSS (0) | — | — · — · — |
| Outline | 26.7 kB (0) · 4.2 kB CSS (0) | — | — · — · — |
| RadioListItem | 78.0 kB (0) · 11.1 kB CSS (0) | — | — · — · — |
| SegmentedControl | 103.5 kB (0) · 7.2 kB CSS (0) | — | — · — · — |
| SegmentedControlItem | 19.2 kB (0) · 4.3 kB CSS (0) | — | — · — · — |
| SelectableCard | 19.5 kB (0) · 8.1 kB CSS (0) | — | — · — · — |
| SelectorOption | 24.6 kB (0) · 6.8 kB CSS (0) | — | — · — · — |
| SideNav | 123.6 kB (0) · 12.5 kB CSS (0) | — | — · — · — |
| SideNavCollapseButton | 68.0 kB (0) · 11.2 kB CSS (0) | — | — · — · — |
| Slider | 116.2 kB (0) · 9.2 kB CSS (0) | — | — · — · — |
| Step | 32.2 kB (0) · 5.7 kB CSS (0) | — | — · — · — |
| Stepper | 68.9 kB (0) · 11.3 kB CSS (0) | — | — · — · — |
| Switch | 111.0 kB (0) · 10.4 kB CSS (0) | — | — · — · — |
| Tab | 15.1 kB (0) · 4.3 kB CSS (0) | — | — · — · — |
| TableSelectionToolbar | 77.6 kB (0) · 14.5 kB CSS (0) | — | — · — · — |
| TextArea | 94.5 kB (0) · 10.0 kB CSS (0) | — | — · — · — |
| TextInput | 100.9 kB (0) · 12.8 kB CSS (0) | — | — · — · — |
| Thumbnail | 71.6 kB (0) · 12.7 kB CSS (0) | — | — · — · — |
| Timestamp | 27.7 kB (0) · 11.4 kB CSS (0) | — | — · — · — |
| Toast | 106.9 kB (0) · 11.5 kB CSS (0) | — | — · — · — |
| ToggleButton | 94.4 kB (0) · 11.3 kB CSS (0) | — | — · — · — |
| ToggleButtonGroup | 42.0 kB (0) · 3.7 kB CSS (0) | — | — · — · — |
| Token | 30.1 kB (0) · 5.0 kB CSS (0) | — | — · — · — |
| TopNav | 80.5 kB (0) · 12.1 kB CSS (0) | — | — · — · — |
| TopNavItem | 14.7 kB (0) · 4.0 kB CSS (0) | — | — · — · — |
| TopNavMegaMenuItem | 15.3 kB (0) · 4.2 kB CSS (0) | — | — · — · — |
| TreeList | 47.0 kB (0) · 6.0 kB CSS (0) | — | — · — · — |
| lab/ChatVirtualizer | 57.7 kB (0) · 223 B CSS (0) | — | — · — · — |
| lab/CommentPin | 61.6 kB (0) · 1.2 kB CSS (0) | — | — · — · — |
| lab/DialogHeroHeader | 91.8 kB (0) · 372 B CSS (0) | — | — · — · — |
| lab/DiffViewer | 95.5 kB (0) · 2.1 kB CSS (0) | — | — · — · — |
| lab/EmojiPicker | 120.5 kB (0) · 751 B CSS (0) | — | — · — · — |
| lab/ListInput | 96.8 kB (0) · 922 B CSS (0) | — | — · — · — |
| lab/NavigationScreen | 86.1 kB (0) · 1.5 kB CSS (0) | — | — · — · — |
| lab/NavigationStack | 86.1 kB (0) · 1.5 kB CSS (0) | — | — · — · — |
| lab/PageControl | 78.9 kB (0) · 709 B CSS (0) | — | — · — · — |
| lab/SelectableCardGroup | 71.4 kB (0) · 162 B CSS (0) | — | — · — · — |
| lab/TabBar | 84.5 kB (0) · 1.8 kB CSS (0) | — | — · — · — |
| lab/TabBarItem | 3.9 kB (0) · 1.8 kB CSS (0) | — | — · — · — |
| lab/TabBarMoreList | 104.1 kB (0) · 1.8 kB CSS (0) | — | — · — · — |
| lab/TransferList | 138.7 kB (0) · 1.2 kB CSS (0) | — | — · — · — |
| richtext/RichTextEditor | 310.3 kB (0) · 2.7 kB CSS (0) | — | — · — · — |
| richtext/RichTextView | 287.1 kB (0) · 2.4 kB CSS (0) | — | — · — · — |
| lab/Comments | 387.8 kB (−1 B) · 2.5 kB CSS (0) | — | — · — · — |
| lab/MediaTime | 223.0 kB (−2 B) · 1.5 kB CSS (0) | — | — · — · — |
| lab/MediaVolume | 223.0 kB (−2 B) · 1.5 kB CSS (0) | — | — · — · — |
| lab/MediaPlaybackRate | 223.0 kB (−3 B) · 1.5 kB CSS (0) | — | — · — · — |
| lab/MediaPlayButton | 223.0 kB (−3 B) · 1.5 kB CSS (0) | — | — · — · — |
| lab/MediaSeekButton | 223.0 kB (−3 B) · 1.5 kB CSS (0) | — | — · — · — |
| lab/MediaTimeSlider | 223.0 kB (−3 B) · 1.5 kB CSS (0) | — | — · — · — |
| lab/MediaCaptionsButton | 223.0 kB (−4 B) · 1.5 kB CSS (0) | — | — · — · — |
| lab/MediaFullscreenButton | 223.0 kB (−4 B) · 1.5 kB CSS (0) | — | — · — · — |
| lab/CommentThread | 380.8 kB (−7 B) · 2.4 kB CSS (0) | — | — · — · — |
| lab/CommentComposer | 185.2 kB (−9 B) · 1.9 kB CSS (0) | — | — · — · — |
Package size: @astryxdesign/core 7.95 MB packed (+632 B); no new dependencies.
Touched components checked; for the full suites, add ci:run-visual for Visual, ci:run-a11y for Accessibility, ci:run-rtl for RTL.
Generated by PR Enrichment workflow | View full report
There was a problem hiding this comment.
Changes requested. The sheet now stays still under a fitting menu as intended, but two things need fixing first.
- The new check treats
touch-action: pan-xas forbidding the vertical pan, so a downward swipe on the touch DateInput and DateTimeInput calendars, whose month scroller declarespan-xto hand vertical drags to the sheet, no longer dismisses the sheet (useSheetGestures.ts:1722,MonthScroller.tsx:119-124); yield only to content that allows no one-finger pan (pinch-zoom,none) and add apan-xcase, or, if the calendar is meant to change too, record that in FR27, the changeset and the date pickers' own code and tests. forbidsVerticalPan(useSheetGestures.ts:279-294) re-implementsparseTouchActionandtouchActionAllowsPanfromutils/scrollView.ts, so extendtouchActionAllowsPanwith an optional boundary and call it from the sheet instead of keeping a second parser.
Also worth fixing: stubTouchAction in useSheetGestures.test.ts is restored only when a test passes, so one failure makes the next stub recurse; restore it in afterEach. An amended FR27 needs a fresh /approve-spec from an engineering owner for the new head.
Claims and files checked
Review mode: full; reason: no-earlier-review
Claims:
- The sheet's finger drag leaves a touch to content whose touch-action forbids the vertical pan, such as a menu whose rows fit: verified (
useSheetGestures.ts:1719-1723,menuTouchAction.stylex.ts:21-23; the unit case fails on the base and passes here; a Chromium touch swipe). - Before, a press on a row of a press-slide-release list inside a sheet also dragged the sheet: verified (the unit case drags on the base).
- Everyone else is unchanged: false; the touch DateInput and DateTimeInput calendars no longer swipe their sheet away (
MonthScroller.tsx:119-124; a Chromium touch swipe closes the base's sheet and leaves this head's open). - Content that allows the vertical pan still pulls the sheet, and mouse and pen drags are untouched: verified (the
pan-y pinch-zoomunit case; the change is in the touch path only). - Cause: the drag armed on every touch outside a nested dialog: verified (the base's guard at the same place).
- The body's and the sheet surface's own touch-action do not count: verified (the walk stops at the body; the helper case).
- The unit tests cover nine touch-action values and the still and drag pair: verified (
useSheetGestures.test.ts:191-223,:1424-1466). - The Chromium spec pulls on
pinch-zoomcontent, then onpan-y pinch-zoomcontent: verified by reading (BottomSheetDrag.a11y.chromium.spec.ts:292-327); not run here, and this review's own Chromium swipe agrees. - The record states the yield and adds a verification row: verified (FR27 rows in
BottomSheet.spec.md). - The cited touch-action rule (FR18) says a pan counts only when every touch-action between the target and the recognizer allows it: partly; that wording is the next clause's (FR20), which cites FR18.
- The body pull keeps its behavior for content that allows the pan: verified (the
pan-y pinch-zoomunit case). - The evidence table's unit row fails on main and passes here: verified (the case run alone); its Chromium figures were not reproduced, though their direction matches.
- BottomSheet, DropdownMenu, ContextMenu, MoreMenu and Selector units pass: verified; the accessibility and interaction spec counts were not rerun.
- The menu half of the report is a separate pull request with no dependency: verified (#12880 changes only the menu press hook, its test, its record and a changeset).
- Writing rubric results: verified (FR27 is one present-tense behavior with its authority and one exception, and no status).
- Changeset, a sheet no longer drags under content that forbids the vertical pan: verified; content that allows the vertical pan still pulls it: verified.
Files:
packages/core/src/BottomSheet/useSheetGestures.ts: two blocking findings (the calendar regression; the copied touch-action parse).packages/core/src/BottomSheet/useSheetGestures.test.ts: one non-blocking finding (spy restore).packages/core/src/BottomSheet/__tests__/BottomSheetDrag.a11y.chromium.spec.ts: clear.docs/specs/components/BottomSheet/BottomSheet.spec.md: FR27 follows the fix for the calendar; otherwise clear..changeset/sheet-yields-to-touch-action.md: clear.
…, through the shared touch-action reader The yield treated any touch-action without a vertical pan as the content's own, so pan-x content, which the date pickers' month scroller declares to hand vertical drags to the sheet, stopped the sheet from being swiped away. The sheet now yields only when the content between the touch and the body allows no one-finger pan on either axis (none or pinch-zoom), as a menu whose rows fit declares. The check uses the shared touchActionAllowsPan from utils/scrollView, which gains an optional boundary so the walk stops before the body, instead of a second parser. FR27, its verification row and the changeset say the same. The unit cases add pan-x (drags) and nested pan-x inside pan-y (yields), and restore the getComputedStyle stub in afterEach; the Chromium case adds a pan-x pull.
|
/approve-spec c89fe8b |
There was a problem hiding this comment.
Changes requested: the code, tests and FR27 are in order, and only the title still needs a fix.
- The title says the sheet yields to content whose
touch-actionforbids the vertical pan, butpan-xcontent (the date pickers' month scroller) still drags the sheet by design (useSheetGestures.ts:284-287); retitle to "fix(BottomSheet): a finger drag yields to content whose touch-action allows no one-finger pan".
Retitling needs no new commit, so the spec approval for this head stays valid. The description's Primary intent and Change sections now match the code. CI's heavy checks have not run on this draft head yet.
Claims and files checked
Review mode: same-head; reason: none
Claims:
- Title: the drag yields to content whose touch-action forbids the vertical pan: false; content that allows only a horizontal pan still drags the sheet.
- Primary intent: the drag leaves a touch to content that allows no one-finger pan, such as a menu whose rows fit: verified (the guard in the touch-start path; unit cases; a real-touch Chromium swipe).
- A finger pressing a menu row inside a sheet leaves the sheet still: verified (unit case; Chromium swipe).
- Before, such a press also dragged the sheet: verified (the new unit case fails on the base, where the finger drags).
- Content that allows a pan on either axis, including the month scroller's pan-x, still pulls the sheet, and mouse and pen drags are untouched: verified (unit cases; the change is in the touch path only).
- Cause: the drag armed on every touch outside a nested dialog: verified (the base's guard).
- Change: a new helper skips such a touch through the shared touch-action reader, which gains a boundary so the walk stops before the body: verified.
- The reader's boundary has its own test case: verified (it fails on the base and passes here).
- Unit tests cover nine touch-action values, nested pan-x inside pan-y, a still and uncancelled pinch-zoom menu, dragging pan-y pinch-zoom and pan-x content, and restore the style stub after each test: verified (138 of 138 pass in the two files).
- The real-Chromium case pulls on pinch-zoom (still), then pan-y pinch-zoom and pan-x (stretches): verified by reading; real-touch Chromium swipes agree.
- The record states the yield and adds a verification row: verified.
- The changeset is a patch fix: verified.
- The cited touch rule leaves the browser what touch-action allows, and a pan counts only when every touch-action between target and recognizer allows it: verified in substance; the second half is the next clause's wording, which rests on that rule.
- The body pull keeps its behavior for content that allows the pan: verified.
- Evidence table, unit row (fails on main, passes here): verified.
- Evidence table, Chromium rows: verified in direction (pinch-zoom: the base's sheet moves, the head's stays; pan-y pinch-zoom and pan-x: both pull).
- Evidence table, phone and emulator rows: not verifiable here; they do not say which head they ran on, and no record asks for them for this change.
- The device runs' base side used a main commit with no sheet or gesture change since the branch point: verified.
- BottomSheet, DropdownMenu, ContextMenu, MoreMenu and Selector units pass 1517 of 1517: verified (1517 of 1517 pass here).
- BottomSheet accessibility and interaction spec counts: not rerun here.
- The menu half of the report is a separate pull request with no dependency: verified (it changes only the menu press hook, its tests, its record and a changeset).
- Writing rubric results: verified (one present-tense behavior with its authority and an exception, no status).
- Changeset: a sheet no longer drags under content that allows no one-finger pan, so a press-slide-release list keeps its gesture: verified.
- Changeset: content that allows a pan on either axis, including the month scroller, still pulls the sheet: verified (unit case; Chromium swipes on pan-x content and the calendar close the sheet on base and head).
Files:
packages/core/src/BottomSheet/useSheetGestures.ts: clear (the calendar regression and the copied parser from the earlier review are fixed).packages/core/src/utils/scrollView.ts: clear (the boundary leaves the other caller unchanged).packages/core/src/BottomSheet/useSheetGestures.test.ts: clear (the style stub is restored after every test).packages/core/src/utils/scrollView.test.ts: clear.packages/core/src/BottomSheet/__tests__/BottomSheetDrag.a11y.chromium.spec.ts: clear.docs/specs/components/BottomSheet/BottomSheet.spec.md: clear (FR27 is approved for this head; its verification row matches the tests)..changeset/sheet-yields-to-touch-action.md: clear.
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet because the pull request is a draft; marking it ready for review starts CI, and the merge guard waits for the required checks.
The retitle fixes the one remaining finding from the last review. FR27 is approved for this head, and the code, tests, description and changeset match it.
Claims and files checked
Review mode: same-head; reason: none
Changed rules since the last review: changed rules (0).
Claims:
- Title: the drag yields to content whose touch-action allows no one-finger pan: verified (the new touch-start check,
useSheetGestures.ts:277-288and:1711-1718). - Primary intent: a finger drag leaves the touch to such content, as a menu whose rows fit declares: verified (fitting menus declare
pinch-zoom; the unit and browser cases). - A finger pressing a menu row inside a sheet leaves the sheet still: verified (the body-touch unit case; a real-touch Chromium swipe).
- Before, such a press also dragged the sheet: verified (the new unit case fails on the base, where the finger drags).
- Content that allows a pan on either axis, including the month scroller's pan-x, still pulls the sheet when it cannot scroll, and mouse and pen drags are untouched: verified (the helper's unit case over nine values; the change sits in the touch-start path only).
- Cause: the drag armed on every touch outside a nested dialog: verified (the base's guard).
- Change: a new helper skips such a touch through the shared touch-action reader, which gains a boundary so the walk stops before the body: verified (
utils/scrollView.ts:57-79). - The reader's boundary has its own test case: verified (
scrollView.test.ts:101-106; it fails on the base). - Unit tests cover nine touch-action values, nested pan-x inside pan-y, a still and uncancelled pinch-zoom menu, dragging pan-y pinch-zoom and pan-x content, and restore the style stub after each test: verified (
useSheetGestures.test.ts:197-199,:201,:1439; 138 of 138 pass in the two files). - The real-Chromium case pulls on pinch-zoom (still), then pan-y pinch-zoom and pan-x (stretches): verified by reading (
BottomSheetDrag.a11y.chromium.spec.ts:292-330); real-touch Chromium swipes agree. - The record states the yield and adds a verification row: verified (
BottomSheet.spec.md:212,:467). - The changeset is a patch fix: verified.
- The cited touch rule leaves the browser what touch-action allows, and a pan counts only when every touch-action between target and recognizer allows it: verified in substance; the second half is the next clause's wording, which rests on that rule.
- The body pull keeps its behavior for content that allows the pan: verified.
- Evidence table, unit row (fails on main, passes here): verified.
- Evidence table, Chromium rows: verified in direction (pinch-zoom: in real-touch swipes the base's sheet moves and the head's stays; pan-y pinch-zoom and pan-x pull on both, by the unit case and the base's guard).
- Evidence table and device passes at this head, phone and emulator: stated in text (device, browser, head and result); not re-run here, and no record asks for them for this change.
- The earlier device pass's base commit has no sheet or gesture change since the branch point: verified (no change under the sheet, the gesture modules or the shared reader between them).
- BottomSheet, DropdownMenu, ContextMenu, MoreMenu and Selector units pass 1517 of 1517: verified.
- BottomSheet accessibility specs pass 94 of 94 and the BottomSheet and DropdownMenu interaction specs 49 of 49: not re-run here; CI's accessibility and interaction jobs run them once the draft is ready.
- The menu half of the report is a separate pull request with no dependency: verified (it changes only the menu press hook, its tests, its record and a changeset).
- Writing rubric results: verified (one present-tense behavior with its authority and an exception, no status).
- Changeset: a sheet no longer drags under content that allows no one-finger pan, so a press-slide-release list keeps its gesture: verified.
- Changeset: content that allows a pan on either axis, including the month scroller, still pulls the sheet: verified (the unit case; real-touch swipes on pan-x content and the calendar close the sheet on base and head).
Files:
packages/core/src/BottomSheet/useSheetGestures.ts: clear.packages/core/src/utils/scrollView.ts: clear (the boundary leaves the other caller unchanged).packages/core/src/BottomSheet/useSheetGestures.test.ts: clear (the style stub is restored after every test).packages/core/src/utils/scrollView.test.ts: clear.packages/core/src/BottomSheet/__tests__/BottomSheetDrag.a11y.chromium.spec.ts: clear.docs/specs/components/BottomSheet/BottomSheet.spec.md: clear (FR27 is approved for this head; its verification row matches the tests)..changeset/sheet-yields-to-touch-action.md: clear.
|
/approve-spec baa868c |
There was a problem hiding this comment.
Approved pending CI: the heavy test suites are still running on this head, and the merge guard waits for the required checks before merge.
The code is unchanged since the last approval, and the description's new owner phone check names the previous head; the merge since changes neither changed source file. FR27 is approved for this head, and the code, tests, description and changeset match it.
Claims and files checked
Review mode: same-head; reason: none
Changed rules since the last review: changed rules (0).
Claims:
- Title: the drag yields to content whose touch-action allows no one-finger pan: verified (the touch-start check,
useSheetGestures.ts:277-288and:1711-1718). - Primary intent: a finger drag leaves the touch to such content, as a menu whose rows fit declares: verified (fitting menus declare
pinch-zoom,menuTouchAction.stylex.ts:21-23; the unit and browser cases). - A finger pressing a menu row inside a sheet leaves the sheet still: verified (the body-touch unit case; a real-touch Chromium swipe).
- Before, such a press also dragged the sheet: verified (the new unit case fails on the base, where the finger drags).
- Content that allows a pan on either axis, including the month scroller's pan-x, still pulls the sheet when it cannot scroll, and mouse and pen drags are untouched: verified (the helper's case over nine values; real-touch swipes on pan-x content and the calendar close the sheet on both builds; the change sits on the touch-start path only).
- Cause: the drag armed on every touch outside a nested dialog: verified (the base's guard).
- Change: a new helper skips such a touch through the shared touch-action reader, which gains a boundary so the walk stops before the body: verified (
utils/scrollView.ts:53-79). - The reader's boundary has its own test case: verified (
scrollView.test.ts:101-106). - Unit tests cover nine values, nested pan-x inside pan-y, a still and uncancelled pinch-zoom menu, dragging pan-y pinch-zoom and pan-x content, and restore the style stub after each test: verified (
useSheetGestures.test.ts:179-238,:1439). - The real-Chromium case pulls on pinch-zoom (still), then pan-y pinch-zoom and pan-x (stretches): verified (
BottomSheetDrag.a11y.chromium.spec.ts:292-330). - The record states the yield and adds a verification row: verified (
BottomSheet.spec.md:212,:467). - The changeset is a patch fix: verified.
- The cited touch rule leaves the browser what touch-action allows, and a pan counts only when every touch-action between target and recognizer allows it: verified in substance (the rule intersects the derived value with the author's touch-action).
- The body pull keeps its behavior for content that allows the pan: verified.
- Evidence table, unit and Chromium rows: verified.
- Evidence table, phone and emulator rows: stated in text with device, browser and result; not re-run, and no record asks for them for this change.
- Owner phone check at the previous head, and the merge since changes none of the gesture files: the merge changes neither
useSheetGestures.tsnorutils/scrollView.ts(verified); the phone result is the owner's statement. - Device passes at the checked head, against the main commit it branched from: the named commit is that head's branch point (verified); the results are text statements.
- The earlier device pass's base has no sheet or gesture change since: verified.
- Sheet and menu unit suites pass: verified by a superset run at this head.
- The accessibility and interaction browser totals pass: not re-run here; CI's heavy suites run them on this head.
- The menu half of the report is a separate pull request with no dependency: verified (it changes only the menu press hook, its tests, its record and a changeset).
- Writing rubric results: verified (one present-tense behavior with its authority and an exception, no status).
- Changeset: a sheet no longer drags under content that allows no one-finger pan, so a press-slide-release list keeps its gesture: verified.
- Changeset: content that allows a pan on either axis, including the month scroller, still pulls the sheet: verified.
Files:
packages/core/src/BottomSheet/useSheetGestures.ts: clear.packages/core/src/utils/scrollView.ts: clear (the boundary leaves the other caller unchanged).packages/core/src/BottomSheet/useSheetGestures.test.ts: clear (the style stub is restored after every test).packages/core/src/utils/scrollView.test.ts: clear.packages/core/src/BottomSheet/__tests__/BottomSheetDrag.a11y.chromium.spec.ts: clear.docs/specs/components/BottomSheet/BottomSheet.spec.md: clear (FR27 is approved for this head; its verification row matches the tests)..changeset/sheet-yields-to-touch-action.md: clear.
|
/approve-spec 40429ca |
There was a problem hiding this comment.
Approved pending CI: CI started when this pull request was marked ready for review and has not finished on this head; the merge guard waits for the required checks before merge.
FR27 is approved for this head, and the touch-start check, its tests and a real-touch check on this head match it.
- Non-blocking: the description's owner phone check line still names the earlier
mainmerge as the head since the checked one; this head is a secondmainmerge, which also changes none of this pull request's files.
Claims and files checked
Review mode: same-head; reason: none
Changed rules since the last review: changed rules (0).
Claims:
- Title: a finger drag yields to content whose touch-action allows no one-finger pan: verified (the touch-start check,
useSheetGestures.ts:277-288and:1711-1718). - Primary intent: such content keeps the touch, as a menu whose rows fit declares: verified (fitting menus declare
pinch-zoom,menuTouchAction.stylex.ts:21-23; the unit cases and a real-touch check). - A finger pressing a menu row inside a sheet leaves the sheet still: verified (
useSheetGestures.test.ts:1439; a real-touch swipe on this head leaves the sheet at rest). - Before, such a press also dragged the sheet: verified (the new unit case fails on the base with the sheet dragging; the same swipe closes the sheet on the base).
- Content that allows a pan on either axis, including the month scroller's pan-x, still pulls the sheet, and mouse and pen drags are untouched: verified (the helper's nine-value case; pan-x content and the touch calendar close the sheet on both builds; the check sits in the touch-start handler only).
- Cause: the drag armed on every touch outside a nested dialog: verified (the base's guard).
- Change: a new helper skips such a touch through the shared touch-action reader, which gains a boundary so the walk stops before the body: verified (
utils/scrollView.ts:57-79). - The reader's boundary has its own test case: verified (
scrollView.test.ts:101-106; it fails on the base). - Unit tests cover nine values, nested pan-x inside pan-y, a still and uncancelled pinch-zoom menu, dragging pan-y pinch-zoom and pan-x content, and restore the style stub after each test: verified (
useSheetGestures.test.ts:179-238,:1439-1482; the restore at:197-199). - The real-Chromium case pulls on pinch-zoom (still), then pan-y pinch-zoom and pan-x (stretches): verified by reading (
BottomSheetDrag.a11y.chromium.spec.ts:290-330); not run by this review, and CI's accessibility browser specs had not run it on this head. - The record states the yield and adds a verification row: verified (
BottomSheet.spec.md:212,:467). - The changeset is a patch fix: verified.
- The cited touch rule leaves the browser what touch-action allows, and a pan counts only when every touch-action between target and recognizer allows it: verified in substance (the rule intersects each recognizer's value with the author's touch-action).
- The body pull keeps its behavior for content that allows the pan: verified.
- Evidence table, unit row: verified (fails on the base, passes on this head).
- Evidence table, Chromium rows: verified in substance by a real-touch check on this head and its base (pinch-zoom: the base closes the sheet, this head keeps it; pan-x: both close); the pan-y pinch-zoom row by its unit case.
- Evidence table and device bullets, phone and emulator results: stated in text at an earlier head, not re-run; under the repository's evidence-carry rule they do not carry to this head, whose merges change a shared layer module, and no record asks for device evidence for this change.
- Owner phone check at an earlier head, and the head since being a main merge that changes none of the gesture files: outdated, since this head is a second main merge; neither merge changes this pull request's files (verified); the phone result is the owner's statement.
- The earlier device pass's base has no sheet or gesture change since: verified.
- Sheet and menu unit suites pass: the two changed suites pass on this head (138 tests); the rest is CI's.
- The accessibility and interaction browser totals pass: not re-run here; CI's interaction legs were still running and its accessibility browser specs had not run on this head.
- The menu half of the report is a separate pull request with no dependency: verified (it changes only the menu press hook, its tests, its record and a changeset).
- Writing rubric results: verified (one present-tense behavior with its authority and an exception, no status).
- Changeset: a sheet no longer drags under content that allows no one-finger pan, so a press-slide-release list keeps its gesture: verified.
- Changeset: content that allows a pan on either axis, including the month scroller, still pulls the sheet: verified.
Files:
packages/core/src/BottomSheet/useSheetGestures.ts: clear.packages/core/src/utils/scrollView.ts: clear (the boundary leaves the other caller unchanged).packages/core/src/BottomSheet/useSheetGestures.test.ts: clear (the style stub is restored after every test).packages/core/src/utils/scrollView.test.ts: clear.packages/core/src/BottomSheet/__tests__/BottomSheetDrag.a11y.chromium.spec.ts: clear.docs/specs/components/BottomSheet/BottomSheet.spec.md: clear (FR27 is approved for this head; its verification row matches the tests)..changeset/sheet-yields-to-touch-action.md: clear.
Primary intent
A BottomSheet's finger drag leaves a touch to content whose
touch-actionallows no one-finger pan, such as a menu whose rows fit.User impact
auto,manipulation,pan-y, orpan-xas the date pickers' month scroller declares) still pulls the sheet when it cannot scroll that way, and a mouse or pen drag is untouched.Cause
The sheet's body drag armed on every touch outside a nested
<dialog>, whatever thetouch-actionof the content under the finger.Change
useSheetGestures.ts: newleavesNoPan(target, body). A touch is skipped when the content between the target and the body allows no one-finger pan on either axis (none,pinch-zoom), as a touch inside a nested dialog is. It readstouch-actionthrough the sharedtouchActionAllowsPan(utils/scrollView.ts), which gains an optional boundary so the walk stops before the body.scrollView.ts/scrollView.test.ts: the boundary parameter, with a case.useSheetGestures.test.ts: the helper over ninetouch-actionvalues plus nestedpan-xinsidepan-y; a finger on apinch-zoommenu leaves the sheet still and uncancelled, and onpan-y pinch-zoomorpan-xit drags. ThegetComputedStylestub is restored inafterEach.BottomSheetDrag.a11y.chromium.spec.ts: a real-Chromium touch pull on content set topinch-zoomleaves the sheet still; underpan-y pinch-zoomand underpan-xit stretches.BottomSheet.spec.md: FR27 states the yield (no one-finger pan), plus its verification row.[fix]patch.Authority
spec:AST-094FR18: a recognizer leaves the browser, and the element under the touch, exactly what itstouch-actionallows; a pan counts only when everytouch-actionbetween them allows it. The sheet's body drag is a pan recognizer.component:BottomSheetFR18 (the body pull) keeps its behavior for content that allows the pan.Evidence
pinch-zoommenu in the body leaves the sheet stillpinch-zoomcontentpan-y pinch-zoomcontentpan-xcontent (the date pickers' month scroller)pinch-zoomcontentpan-y pinch-zoomcontent, and a pull from the heading with notouch-actionpinch-zoomcontentpan-y pinch-zoomcontent and from the headingpinch-zoomcontent leaves the sheet still (main moves 88.5 px up, 200 px down);pan-xcontent and the touch DateInput calendar's month scroller (pan-x) drag the sheet 200 px on both builds, and the sheet stays open after the lift. Real iPhone 14 (iOS 26.2):pinch-zoompull 0 pt (main 87.6 pt up, 423–432 pt down); the DateInput month-scroller pull drags and springs back on both. Three takes each against main 472896d.Overlap checked: #12880 (separate file and owner: useMenuPress vs the sheet's drag)
Writing rubric results
Owner and land path