Repository navigation
fix(menu press): cancel a pick's touchend on the node the touch began on - #11859
Conversation
progressCurve, mapProgress, mapRange and presentedProgressVelocity in motion/progress.ts, internal, one velocity unit (progress per second). Rebuilt on main from the pull request's own change, without the open dependency chain it no longer needs. Co-authored-by: Cindy Zhang <[email protected]>
…ressCurve CodeBunny on meta#9755: springProgress solved the same spring as progressCurve. It now reads progressCurve (remaining = 1 - progress), so one implementation remains. Same curve, same settle epsilon (0.001) and duration.
…shows at each progress lerpPath, edgeGrowPath, each path's restartFrom and morphCurves in motion/morphPath.ts, internal. Pure geometry over a progress curve: the caller chooses the timing. Rebuilt on the progress module from the pull request's own change, without the open chain it no longer needs. Co-authored-by: Cindy Zhang <[email protected]>
# Conflicts: # packages/core/src/motion/README.md
… source rect createRectMorph in motion/rectMorph.ts, internal: present along a path and dismiss back onto a copy or the element, each continuing the other from the rect on screen. Rebuilt on main from the pull request's own change and ported to main's engine (createMotionAnimator). Timing follows the owner's rule for touch motion: present and dismiss take a motion, either a theme duration and easing (a tap, a key, the program) or a spring (a gesture's release, from its velocity). timedProgressCurve joins the progress helpers. architecture:react-component-runtime INV12 records the implementation gap: the size-change glide moves onto the morph next. Co-authored-by: Cindy Zhang <[email protected]>
Each passes its input to `useMobileKeyboard` from its own render, with no prop and no Effect of its own. On focus the field decides where it is: inside a keyboard target such as a Tall BottomSheet it moves nothing; in an app's bar docked at the viewport's bottom, the bar rides the keyboard, its bottom on the keyboard's top; in scrolling content, its nearest scroller, the document included, scrolls it 10 px above the keyboard in the keyboard's report. In a fixed container the app positions itself, a scroller around the field reveals it, and with none the browser's own reveal stays. Its first tap and focus moves into it arrive without the browser's reveal where the module places the field, so the page never pans there. A scroll area does not gain the range it lacks at its end yet. Where a field's scroll area cannot place it, the document reveals it, in the page and in a fixed container where the document's scroll moves the container, as in Safari while its keyboard shows; elsewhere Core scrolls the document back. Where the document cannot scroll far enough, as at a short page's end in Chrome, a pan of the visual viewport takes the rest in the same frame (`panVisualViewportTo`): a probe fixed in the layout viewport is scrolled into view, as the reveal-pan watch puts a pan back. The watch takes Core's own pan as the new rest. Firefox for Android does not pan for the probe. A page with nothing to scroll keeps the browser's own reveal. On Chrome's show, a docked bar first sets its field 4 px above the keyboard's top at once, as the Tall sheet does, and only the rest rides, so Chrome's own pan finds the field clear. Every viewport report now feeds the ride's reveal-pan watch, so a pan Chrome still makes is put back, and a pan made at one keyboard height goes back at the next. Under Remove animations, Gboard first reports a keyboard 48 px tall, and Chrome may then reveal the bar's field itself: it scrolls the page behind the bar, then pans. In Chrome, the ride's watch scrolls the document back as well, when the scroll and the pan centre the field as Chrome's reveal does; the app's own scroll to another element stays. On iOS, a reveal that places the field rises on the browser's smooth scroll from the keyboard's first report, which comes as the keyboard starts to slide, so the field rises beside it (`risesSmoothly`, which reads Core's iOS WebKit check, `isIosWebKit`). The scroll back records where the rise is headed, and a rise still on its way when the keyboard changes height carries on from its target. Under Reduce Motion, in a theme that reduces motion for everyone, and in Chrome, which checks the field in the resize's own commit, the reveal moves at once. The rise and the scroll back ask the motion module's new `reducesMotion`, beside `reducedMotionFade`, which now uses it, so a theme that reduces motion for everyone counts as the setting for both. A scroll area's reveal goes through its own `scrollBy` with an explicit behavior where it has one, so a smooth `scroll-behavior` on the area cannot slow an instant reveal, as the Tall sheet's reveal already does. When the keyboard closes, each scroller a reveal moved scrolls back to where it was (keyboardScrollBack.ts), on the browser's smooth scroll. Safari on iOS reports the keyboard gone about half a second after the blur that closes it, once it is down. There the scroll back starts at that blur, once the focus change settles on nothing that brings up a keyboard with no finger on the screen, and slides down beside the keyboard; the report only confirms it. A finger then can be a tap that brings the keyboard back, so the report decides, as elsewhere and under Reduce Motion, where the scroll lands at once. Safari applies a scripted scroll a frame late, so a scroll set each frame jitters. A scroller the person scrolled meanwhile keeps their scroll. A field that gains focus during the slide stops the scroll back where the page is (`stopKeyboardScrollBack`), and its reveal goes on from there as Core's own scroll. A sandbox page puts three fields in the middle of a page that scrolls the document. Each field's `.keyboard.test.tsx` drives the keyboard module's test double. Mobile keyboard stories on TextInput place the fields low in the page, a TextInput in a toolbar fixed at the bottom (docked, floating above the edge, or with its own `translate`), a last field at the end of a short page and of a scroll area, a scroll area low on the page, a scroll area in a floating panel and in a full-viewport panel, and a field in a sheet of a set height. Firefox for Android can carry the reveal's document scroll as a visual-viewport offset, show the document where it was before the reveal at the keyboard's hide report, and turn the offset back into a document scroll only after it. The scroll back then waits up to a second for the first document scroll: one that lands where Core left the document is the browser's own, and the scroll back follows it. A touch, a keyboard that comes back, the field's page going, or the wait's end puts nothing back. The reveal-pan watch's touch flag now holds through a report that comes while a finger is on the screen. In Firefox the toolbar hides in a drag, which changes the measured keyboard height mid-drag; the watch then took the drag's own pan for the browser's and put it back. The input stream now counts the fingers on the screen from touch events (`isTouchOnScreen`), only while `touchend` and `touchcancel` are heard. A native pan keeps a finger there, though its `pointercancel` drops the press from `getDownPresses`, so that record cannot serve. The watch's shared touch subscription hears those two types, and a report reads the count. After the show's first reveal, a keyboard report reveals nothing while a press that started after the last reveal is down. In Firefox the toolbar hides in a drag, and the reveal re-applied itself with small scrolls under the person's finger. The report's height is kept, so the field stays where the person put it, and a later report with the finger up reveals it as before. The press that focused the field holds nothing: a long press focuses with the finger still down, and Gboard can report a 48 px keyboard first, then its full height. The input stream also counts the touches that start (`getTouchStartCount`), and each reveal notes that count. The keyboard module reads the finger count through `isFingerOnScreen`: a finger down at the keyboard's last hide counts no more until a touch starts, since a touch whose target leaves the page ends at a node the window never hears. The count includes a stylus, whose drag moves the page as a finger does. Nine unit tests cover the scroll back from the blur on iOS: it starts at the blur and the report moves nothing more; focus that moves on to another field or into a frame keeps the page; a finger on the screen at the blur leaves it to the report; a person's scroll stands; Reduce Motion waits for the report; a field focused again during the slide stops the scroll back and rises from where the page is, or stays where a touch stopped it with nothing left to raise; and the next close goes back to the first place, at a blur or at a report. Six unit tests cover the scroll back: the page's smooth scroll at the report (nothing before it), Reduce Motion, a theme that reduces motion, a person's scroll kept, a scroll area after Back, and a focus move to another field. Firefox-shaped cases carry the reveal as an offset and close the keyboard before the fold: the scroll back follows the fold, a touch-drag control keeps the page, only the first document scroll counts, and each way the wait ends leaves no scroll listener. Safari's and Chrome's close sequences still decide at the report, with no wait. A Firefox-shaped drag grows the viewport twice with the finger down and finds no put-back; after the finger is up, a browser pan is put back. Another drags the page with the toolbar hiding twice and finds no reveal scroll until the finger is up. A long press focuses the field while Gboard grows from 48 to 290 px, and the field is revealed at 290; the next show's first reveal runs again under the same press, and a press that starts after the reveal holds the next report until it lifts. After the keyboard goes with no finger down, a long press that brings it back is revealed with that press still down. Another holds a report while the long press's finger stays down after a second finger tapped and lifted. Another misses a touch's end, as when its target leaves the page, and finds a browser pan put back once the keyboard has hidden and shown again. The input stream's tests count fingers through a second finger, a cancel and a native pan's `pointercancel`, count nothing while a touch end could go unheard, and count the touches that start. Six cover the rise on iOS: its smooth scroll, Reduce Motion, a theme that reduces motion, the scroll back after a rise drawn later, a rise carried on at a new height, and no second reveal while a scroll area's rise is drawn. Their CSS.supports stub answers both of Safari's forms, a property and value or a condition. Another drives a scroll area with a smooth `scroll-behavior` and finds its own `scrollBy` called at once. Two in the motion module cover `reducesMotion`: the setting, and a theme that reduces motion for everyone.
…opy dismissal CodeBunny on meta#9769: a dismissal onto a copy detached the animator, and a handed-in one was never attached again, so its owner's writes stopped reaching the element. Only the morph's own animator lets go now. Co-authored-by: Cindy Zhang <[email protected]>
…er and the morph CodeBunny on meta#9769: solveAnimatedPageScroll already played this curve and keeps the velocity of the move it retargets. timedCurve in progress.ts is now that one curve; the pager and the morph's timed motion call it, so a timed present that interrupts a dismissal keeps its velocity. The INV12 note states the system only. File header and comments trimmed. Co-authored-by: Cindy Zhang <[email protected]>
CodeBunny on meta#9769: with nothing in flight the morph handed timedCurve a velocity of 0, which it treats as a retarget and uses to cancel the easing's starting slope. Only a motion in flight hands its velocity on now; tests check a present from rest and a dismissal from a settled present against the easing itself. Header and comments shortened. Co-authored-by: Cindy Zhang <[email protected]>
The type's doc, the example and the changeset name no rule of their own about which input plays which timing: each play takes the timing the adopting component's motion record names (AST-094 FR45). Co-authored-by: Christopher Chedeau <[email protected]>
FR9's scrolling-content bullet adds the spec owners' sentence: where a browser carries out the document's scroll by moving the visual viewport, that offset is the reveal, not a pan. Gap 2 is met. Gaps 1, 10 and 11 say what the three fields now do. Gap 11 keeps the missing scroll range as the fix; until a scroller gains it, Core pans the visual viewport where the document cannot scroll far enough. Two verification rows cover Firefox for Android (the offset equals the computed reveal) and Chrome (no pan added after Core places the field). Chrome's names the cases Core pans, and fails a field Core pans that ends other than 10 CSS px above the keyboard. In Firefox for Android the pan moves nothing where the page has no scroll range; Gap 11 names those cases. The device-evidence row records that a docked toolbar resting under the keyboard while a field outside it has focus is not a failure. BottomSheet's height doc says what such a field gets in a sheet that is not a fully expanded Tall sheet. FR9's scrolling-content bullet adds the close: each scroller that revealed the field scrolls back to where it was before the reveal, and a scroll the person made while the keyboard showed is kept. A verification row covers a field in the middle of a page that scrolls the document. FR9's scrolling-content bullet adds the open: on iOS the field rises on the browser's own smooth scroll beside the keyboard's slide, settling within 0.15 s after the keyboard settles, and it moves in one frame under Reduce Motion, in a theme that reduces motion for everyone, and in other browsers. A verification row reads every drawn frame of the rise. Gap 13 records Chrome's rise, which stays in one frame because Chrome checks the field in the resize's own commit; Firefox for Android takes the same path. The device-evidence row's failure for a reveal later than the keyboard's report notes that on iOS the rise starts in that frame and settles as FR9 states. FR9's scrolling-content bullet adds the hold: a show's first report always places the field, and a later report that comes while a finger is down, after a touch has begun since the field's last placement, moves nothing. FR9's close adds that at the hide report, Firefox for Android can still show the document where it was before the reveal, and turns the reveal back into a document scroll only after that report; the scroll back follows that scroll. A row closes the keyboard with Back in Firefox for Android at normal speed and on a slow profile. The input-fields family's FR13 status says the same: the three fields meet FR13 through FR9, apart from Gap 11. FR9's close now starts the scroll back at the blur that closes the keyboard in Safari on iOS, beside the keyboard's slide; the report that the keyboard has gone comes later and only confirms it. Elsewhere it starts at that report, and under Reduce Motion, and in a theme that reduces motion for everyone, it lands at once there. A scroller the person scrolled keeps the person's scroll, a finger on the screen at the blur leaves the scroll back to the report, and a field that gains focus during the slide stops the scroll back where the page is. Safari's close row reads every drawn frame from Done until the page rests, and adds a tap on the field 80 ms and 150 ms after Done. The open sentence is rewrapped, word for word.
Main renamed the engine's factory to createMotionEngine. The merge takes that name in the test bundle and in rectMorph and its tests.
The morph's comment cited AST-094 FR45 as its only link to that record. AST-094 now lists the file, and the comment keeps the fact without the citation. The proof imports `test` from the a11y-spec package, whose contexts reach no remote host, as main's lint asks.
The pager's timed settle takes its curve from motion/progress.ts, so the hook adds that module over Carousel alone. The bundle test lists it as pager code.
The morph's popover proofs played a copy of Popover's growth that had drifted: it lacked the overlap rule, so an overlapping popover grew from its left edge where Popover grows from its top. The proofs now import popoverCollapsedState, popoverFrame and frameOf from Popover. A new overlapping case, which the deleted copy fails, pins the growth from the top edge.
The rect morph's timedProgressCurve played, from rest, the curve that easedProgress already plays for Popover, SegmentedControl and the layout glide. easedProgress moves into progress.ts and takes an optional velocity: the Hermite carry that the pager and the morph use. From rest its values do not change. Its velocity is a central difference that stays inside the curve, and from rest it starts on the curve's own slope. timedProgressCurve goes, and timedCurve maps easedProgress onto values, keeping only its carry for no distance.
The morph's turn-around proof compared restartFrom with lines written in the test, so a change to Popover's readState or surfaceCurves left it green. Popover exports both for the proofs, which now replay its own turn-around. morphPath.ts's header keeps only its tags: the paths' own JSDoc says the rest.
The note said timedProgressCurve joins the progress helpers, which this pull request no longer adds. It now says easedProgress moves to them with a retargeted velocity, and timedCurve joins them.
Main's Popover touch growth, which plays on the surface and floors its opacity curve with motion/opacityFloor.ts, meets the rect morph's move of easedProgress into motion/progress.ts in the imports of popoverSurfaceMotion.ts. The merge keeps both: the floor's import, and easedProgress from progress.
Popover's surface curves now stop their opacity at 0 or a floor above it. Past its end, a turn-around toward the source takes the popover path's opacity below 0, where Popover's stops at 0. An opacity draws clamped to 0 through 1, so both draw 0. The proof now compares the two as drawn, which holds with Popover's curves before and after the floor.
A popover's grow path read its opacity on a straight line, so before its start and past its end it went below 0: a turn-around toward the source read -0.025 at 1.05. An opacity below 0 draws as 0, so opacityAt now stops at 0. The popover proofs compare opacities as drawn, since Popover's own model still reads below 0 there.
Under a finger or a pen, a DropdownMenu or MoreMenu trigger opens its menu as it is pressed, instead of after a 500 ms hold (spec:AST-094 FR29, FR43). Inside a scroll view it opens once the 150 ms content-touch delay passes with no scroll, so a scroll that starts on the trigger still scrolls. The finger that opened the menu picks a row only after moving 10 px. presentation="popover" keeps the previous behavior. useMenuPress with no longPressDelayMs follows the same rules, and longPressDelayMs: 500 keeps the previous hold.
The anchored menu's case modeled a straight line from a 22 px square on its control. The menu now grows out of its trigger on Popover's edge path, which the popover cases already check, so the case no longer describes any presentation's model. The file header follows.
|
/approve-spec ff541aa |
There was a problem hiding this comment.
Changes requested: the code in #8080 and in this pull request checks out, but the device evidence behind both was taken before a main merge that spec:AST-094 DEC-31 does not carry it across.
#9777: approved (already merged); no blocking finding.
#8080: changes requested.
- Regression: its iPhone 14 and Android emulator grow takes ran before its latest
mainmerge, which changesLayer/useLayer.tsx(a shared layer module DEC-31 lists) andPopover/usePopover.tsx,Layer/gestureCounter.tsandutils/focusReturn.ts, whichDropdownMenu.tsximports, so those takes need to run again at its head.
#11859: changes requested.
- Regression: its iPhone 14 and Android emulator takes (Testing steps 6 to 8) ran before the same merge, which changes
Layer/useLayer.tsxandLayer/gestureCounter.tsandutils/focusReturn.ts, whichuseMenuPress.tsimports, so under DEC-31 they need to run again at this head.
Whole stack: passes. The two open increments touch the press model in separate places and together add no public API. A pull request lands only when it and every pull request below it are approved.
- New Android takes follow DEC-27 as amended: the pinned test kit, raw logs, the evidence verifier's pass and one spot check on a second device.
- The earlier finding on the CI timing table is resolved: this head no longer changes that file.
- Non-blocking: the two comment-style suggestions on
DropdownMenu.tsxandclickGuard.tsstill apply.
Claims and files checked
Review mode: same-head; reason: none
- Stack declaration: holds. All three descriptions carry the identical Stack line, and each lower head is contained in the next.
- Claim (fix release note): a finger's pick that closes a menu now cancels its
touchendon the node the touch began on, so no click reaches the control beneath. Verified:clickGuard.ts:195-202,useMenuPress.ts:836and the four new unit cases. - Claim (fix release note): a submenu pick takes its row out of the page before the
touchend, which the window then never received, and a busy main thread let the click through after the 400 ms window. Verified: the base click guard listens only on the window; the four new cases fail without the change. - Claim (fix release note): item and radio-item picks are covered. Verified: two unit cases; three browser cases in test code (not run here).
- Claim (grow release note, #8080): a finger's or a pen's open grows DropdownMenu and MoreMenu out of the trigger and back, on Popover's path and timing. Verified:
DropdownMenu.tsx:1206-1219,MoreMenu.tsx:23and the touch-grow unit cases. - Claim (grow release note): a tap's open grows as a hold's does; under Reduce Motion on a coarse pointer the menu fades; a mouse, the keyboard and the pinned popover presentation keep the layer's entrance. Verified: unit cases; the fade frames are in test code (not run here).
- Claim: seen in a production app on a phone. Stated by the author.
- Claim: at a finger's release the press model arms the click guard, then dispatches the row's click. Verified:
useMenuPress.ts:689-697. - Claim: the press model keeps the node from the
touchstartthat names the touch, the guard listens there too, and the first listener to hear thetouchendcancels it and both stop. Verified:useMenuPress.ts:824-836,clickGuard.ts:172-203. - Claim: the touch-presentation record requires the
touchendcancelled and the gesture's browser click to act on nothing. Verified against the current record's FR21 and FR26. - Claim: the guard's options gain a touch target with one
touchendlistener, and the menu still closes at the pick. Verified:clickGuard.ts:92,:199. - Claim: before the change the detached row's
touchendis not cancelled in jsdom, Chromium and WebKit. Verified in jsdom; the engine runs are stated. - Claim: after the change the
touchendis cancelled for an item and a radio item, also after a 600 ms long task. Unit cases verified; the long-task browser cases are stated. - Claim: the four new unit cases and the three browser cases fail on main's code and pass here. Unit cases verified; browser cases stated.
- Claim: the menus' accessibility and interaction specs pass. Stated, not run here.
- Claim: the emulator, simulator and real-iPhone runs pass, including a 600 ms task where main lets a click reach the button beneath. Stated for an earlier revision; they do not carry to this head (blocking finding).
- Claim: this head's tree differs from the tree last checked only in one re-padded table row, and Prettier, ESLint and the repository checks pass here. The checked tree is not in the repository's history, so not verified; Prettier verified on the changed files.
- Claim: no export, prop, type, default or attribute changes; the guard's internal options gain a touch target and the private touch helper returns the touch. Verified: the built API surfaces are identical;
clickGuard.ts:92,useMenuPress.ts:296. - Claim: Storybook gains a submenu radio-group story. Verified:
DropdownMenu.stories.tsx. - Claim: this pull request's own change is +488/-33 lines. Verified.
- Claim: the four reference pages grow 53, 49, 107 and 96 B gzip from this change, and the whole stack adds more. Stated: the authors' measurements at earlier revisions.
- Claim: no file under the CLI package changes. Verified.
.changeset/menu-pick-touchend-on-target.md: clear.changeset/menu-touch-grow.md: clearapps/sandbox/scripts/next-export-routes.json: clear (generated route list)apps/sandbox/src/app/(raw)/pages/menu-grow-cases/page.tsx: clearapps/sandbox/src/app/sandboxPages.ts: clearapps/storybook/stories/DropdownMenu.stories.tsx: cleardocs/architecture/layer-runtime.md: cleardocs/specs/AST-094-touch-presentations/spec.md: clear (one row re-padded by the merge)docs/specs/components/DropdownMenu/DropdownMenu.spec.md: cleardocs/specs/components/DropdownMenu/modules/useMenuPress.spec.md: cleardocs/specs/components/Popover/Popover.spec.md: clearpackages/core/src/DropdownMenu/DropdownMenu.test.tsx: clearpackages/core/src/DropdownMenu/DropdownMenu.tsx: blocking finding for #8080 (device takes do not carry); one non-blocking comment suggestionpackages/core/src/DropdownMenu/DropdownMenuPickTouchEnd.test.tsx: clearpackages/core/src/DropdownMenu/DropdownMenuTouchGrow.test.tsx: clearpackages/core/src/DropdownMenu/DropdownMenuTouchGrowPending.test.tsx: clearpackages/core/src/DropdownMenu/__tests__/DropdownMenuEntranceHold.interaction.browser.spec.ts: clearpackages/core/src/DropdownMenu/__tests__/DropdownMenuPickTapThrough.interaction.browser.spec.ts: clearpackages/core/src/DropdownMenu/__tests__/DropdownMenuTouchFocusRing.a11y.chromium.spec.ts: clearpackages/core/src/DropdownMenu/__tests__/DropdownMenuTouchGrow.interaction.browser.spec.ts: clearpackages/core/src/DropdownMenu/__tests__/MenuPress.a11y.chromium.spec.ts: clearpackages/core/src/Layer/settledBox.ts: clearpackages/core/src/Popover/popoverSurfaceMotion.test.ts: clearpackages/core/src/Popover/popoverSurfaceMotion.ts: clearpackages/core/src/Popover/usePopoverSurfaceMotion.test.tsx: clearpackages/core/src/Popover/usePopoverSurfaceMotion.ts: clearpackages/core/src/hooks/useMenuPress.test.tsx: clearpackages/core/src/hooks/useMenuPress.ts: blocking finding for #11859 (device takes do not carry)packages/core/src/utils/clickGuard.test.ts: clearpackages/core/src/utils/clickGuard.ts: clear (one non-blocking comment suggestion)scripts/lazy-sheet-bundle.test.mjs: clear- #9777's 24 files: clear (verdict carried from its own review)
There was a problem hiding this comment.
Approved pending CI for this pull request: CI has not run on this head yet because it skips drafts, and the merge guard waits for it to pass. #8080 below it needs one change before the stack can land.
#9777: approved (already merged); no blocking finding.
#8080: changes requested.
- Regression: its own Pixel 8 takes at its current head show presses that start in the menu's entrance hold acting under reduced motion in the held Projects case (5 of 16, against 0 of 16 at the head the owner passed), which
component:DropdownMenuFR22 forbids, and because both builds in that comparison carry the grow, nothing yet shows the defect is older than #8080, so either run the same cell on amainbuild or end the hold so that no press that starts inside it acts.
#11859: approved pending CI; no blocking finding. Its iPhone 14 and Pixel 8 takes now ran at this head, which resolves the earlier device-evidence request.
Whole stack: passes; a pull request lands only when it and every pull request below it are approved.
- Non-blocking: the two comment-style suggestions on
DropdownMenu.tsxandclickGuard.tsstill apply; a follow-up is fine.
Claims and files checked
Review mode: same-head; reason: none
- Stack declaration: holds. All three descriptions carry the identical Stack line, and each lower head is contained in the next.
- Claim (fix release note): a finger's pick that closes a menu now cancels its
touchendon the node the touch began on, so no click reaches the control beneath. Verified:clickGuard.ts:195-202,useMenuPress.ts:834-836and the four new unit cases. - Claim (fix release note): a submenu pick takes its row out of the page before the
touchend, which the window then never received, and a busy main thread let the click through after the 400 ms window. Verified: the base click guard listens only on the window; the four new cases fail without the change. - Claim (fix release note): item and radio-item picks are covered. Verified: two unit cases; three browser cases in test code (stated, not run here).
- Claim (grow release note, #8080): a finger's or a pen's open grows DropdownMenu and MoreMenu out of the trigger and back, on Popover's path and timing. Verified:
DropdownMenu.tsx:1206-1219and the touch-grow unit cases. - Claim (grow release note): a tap's open grows as a hold's does; under Reduce Motion on a coarse pointer the menu fades; a mouse, the keyboard and the pinned popover presentation keep the layer's entrance. Verified: unit cases; the fade frames are in test code (stated).
- Claim: seen in a production app on a phone. Stated by the author.
- Claim: at a finger's release the press model arms the click guard, then dispatches the row's click. Verified:
useMenuPress.ts:689-697. - Claim: the press model keeps the node from the
touchstartthat names the touch, the guard listens there too, and the first listener to hear thetouchendcancels it and both stop. Verified:useMenuPress.ts:824-836,clickGuard.ts:172-203. - Claim: the touch-presentation record requires the
touchendcancelled and the gesture's browser click to act on nothing. Verified against the current record's FR21 and FR26. - Claim: the guard's options gain a touch target with one
touchendlistener, and the menu still closes at the pick. Verified:clickGuard.ts:92,:199. - Claim: before the change the detached row's
touchendis not cancelled in jsdom, Chromium and WebKit. Verified in jsdom and in Chromium touch; WebKit is stated. - Claim: after the change the
touchendis cancelled for an item and a radio item, also after a 600 ms long task. Unit cases verified; the long-task browser cases are stated. - Claim: the four new unit cases and the three browser cases fail on main's code and pass here. Unit cases verified; browser cases stated.
- Claim: the menus' accessibility and interaction specs and the local gates pass at earlier revisions. Stated, not run here.
- Claim: the earlier emulator, simulator and real-iPhone runs do not carry to this head, and new real Pixel 8 and real iPhone 14 runs at this head pass side by side with the head the owner passed, under the amended Android evidence rule. Stated with device, browser, head and result; accepted as device evidence.
- Claim: this head's tree differs from the tree last checked only in one re-padded table row, and Prettier, ESLint and the repository checks pass here. Prettier verified on the changed files; the rest stated.
- Claim: no export, prop, type, default or attribute changes; the guard's internal options gain a touch target and the private touch helper returns the touch. Verified: the built API surfaces are identical;
clickGuard.ts:92,useMenuPress.ts:296. - Claim: Storybook gains a submenu radio-group story. Verified:
DropdownMenu.stories.tsx. - Claim: this pull request's own change is +488/-33 lines. Verified.
- Claim: the four reference pages grow 53, 49, 107 and 96 B gzip from this change, and the whole stack adds more. Stated: the authors' measurements at earlier revisions.
- Claim: no file under the CLI package changes. Verified.
- Claim: the comment-style note on
clickGuard.tsgoes to a follow-up so the device evidence keeps carrying. Consistent with the evidence-carry rule. - Claim (#8080): the reduced-motion hold failure on its Pixel 8 is a timing defect older than #8080. Not shown: both compared builds carry #8080's grow (blocking finding for #8080).
.changeset/menu-pick-touchend-on-target.md: clear.changeset/menu-touch-grow.md: clearapps/sandbox/scripts/next-export-routes.json: clear (generated route list)apps/sandbox/src/app/(raw)/pages/menu-grow-cases/page.tsx: clearapps/sandbox/src/app/sandboxPages.ts: clearapps/storybook/stories/DropdownMenu.stories.tsx: cleardocs/architecture/layer-runtime.md: cleardocs/specs/AST-094-touch-presentations/spec.md: cleardocs/specs/components/DropdownMenu/DropdownMenu.spec.md: cleardocs/specs/components/DropdownMenu/modules/useMenuPress.spec.md: cleardocs/specs/components/Popover/Popover.spec.md: clearpackages/core/src/DropdownMenu/DropdownMenu.test.tsx: clearpackages/core/src/DropdownMenu/DropdownMenu.tsx: blocking finding for #8080 (reduced-motion entrance hold on a Pixel 8); one non-blocking comment suggestionpackages/core/src/DropdownMenu/DropdownMenuPickTouchEnd.test.tsx: clearpackages/core/src/DropdownMenu/DropdownMenuTouchGrow.test.tsx: clearpackages/core/src/DropdownMenu/DropdownMenuTouchGrowPending.test.tsx: clearpackages/core/src/DropdownMenu/__tests__/DropdownMenuEntranceHold.interaction.browser.spec.ts: clearpackages/core/src/DropdownMenu/__tests__/DropdownMenuPickTapThrough.interaction.browser.spec.ts: clearpackages/core/src/DropdownMenu/__tests__/DropdownMenuTouchFocusRing.a11y.chromium.spec.ts: clearpackages/core/src/DropdownMenu/__tests__/DropdownMenuTouchGrow.interaction.browser.spec.ts: clearpackages/core/src/DropdownMenu/__tests__/MenuPress.a11y.chromium.spec.ts: clearpackages/core/src/Layer/settledBox.ts: clearpackages/core/src/Popover/popoverSurfaceMotion.test.ts: clearpackages/core/src/Popover/popoverSurfaceMotion.ts: blocking finding for #8080 (the grow's hold under reduced motion)packages/core/src/Popover/usePopoverSurfaceMotion.test.tsx: clearpackages/core/src/Popover/usePopoverSurfaceMotion.ts: blocking finding for #8080 (the hold until the first frame shares that shield)packages/core/src/hooks/useMenuPress.test.tsx: clearpackages/core/src/hooks/useMenuPress.ts: clearpackages/core/src/utils/clickGuard.test.ts: clearpackages/core/src/utils/clickGuard.ts: clear (one non-blocking comment suggestion)scripts/lazy-sheet-bundle.test.mjs: clear- #9777's 24 files: clear (verdict carried from its own review)
|
/approve-spec 948472f |
There was a problem hiding this comment.
Changes requested: the code in #8080 and in this pull request is unchanged since the last review and still checks out, and an engineering owner's spec approval for each current head is now recorded, but both heads merge a main change to the shared input hold that their code imports, so the device takes behind them have to run again.
#9777: approved (already merged); no blocking finding.
#8080: changes requested.
- Regression: the merged
mainchange editsLayer/inputHold.tsandutils/scrollView.ts, whichPopover/popoverSurfaceMotion.ts,Popover/usePopoverSurfaceMotion.tsandhooks/useMenuPress.tsimport directly, so underspec:AST-094DEC-31 the iPhone 14 and Pixel 8 cells need to run again at this pull request's head, and the reduced-motion held Projects cell, which failed at the previous head againstcomponent:DropdownMenuFR22 (5 of 16 presses in the entrance hold acted), has to show no press acting.
#11859: changes requested.
- Regression: the same merge edits
Layer/inputHold.tsandutils/scrollView.ts, whichhooks/useMenuPress.tsimports directly, so underspec:AST-094DEC-31 the real iPhone 14 and Pixel 8 takes in Testing steps 9 to 11 need to run again at this head, side by side with the head the owner passed, and the description, which still names the previous head as the live head, should state them.
Whole stack: passes; a pull request lands only when it and every pull request below it are approved.
- Non-blocking: the two comment-style suggestions on
DropdownMenu.tsxandclickGuard.tsstill apply; a follow-up is fine.
Claims and files checked
Review mode: same-head; reason: none
- Changed rules (0): none.
- Stack declaration: holds. All three descriptions carry the identical Stack line, and each lower head is contained in the next.
- Spec approval: an engineering owner approved the record edits at each current head; this settles spec authority, not the device evidence.
- Claim (fix release note): a finger's pick that closes a menu now cancels its
touchendon the node the touch began on, so no click reaches the control beneath. Verified:clickGuard.ts:195-203,useMenuPress.ts:824-836, the four new unit cases, and a real-touch Chromium pick at this head. - Claim (fix release note): a submenu pick takes its row out of the page before the
touchend, which the window then never received, and a busy main thread let the click through after the 400 ms window. Verified: the base click guard listens only on the window; the four new cases fail without the change. - Claim (fix release note): item and radio-item picks are covered. Verified: two unit cases; three browser cases in test code (stated, not run here).
- Claim (grow release note, #8080): a finger's or a pen's open grows DropdownMenu and MoreMenu out of the trigger and back, on Popover's path and timing. Verified:
DropdownMenu.tsx:1206-1219, the touch-grow unit cases and a Chromium frame 30 ms into a tap's open. - Claim (grow release note): a tap's open grows as a hold's does; under Reduce Motion on a coarse pointer the menu fades; a mouse, the keyboard and the pinned popover presentation keep the layer's entrance. Verified: unit cases; the fade frames are in test code (stated).
- Claim: seen in a production app on a phone. Stated by the author.
- Claim: at a finger's release the press model arms the click guard, then dispatches the row's click. Verified:
useMenuPress.ts:689-697. - Claim: the press model keeps the node from the
touchstartthat names the touch, the guard listens there too, and the first listener to hear thetouchendcancels it and both stop. Verified:useMenuPress.ts:824-836,clickGuard.ts:172-203. - Claim: the touch-presentation record requires the
touchendcancelled and the gesture's browser click to act on nothing. Verified against the current record's FR21 and FR26. - Claim: the guard's options gain a touch target with one
touchendlistener, and the menu still closes at the pick. Verified:clickGuard.ts:92,:199. - Claim: before the change the detached row's
touchendis not cancelled in jsdom, Chromium and WebKit. Verified in jsdom and in Chromium touch; WebKit is stated. - Claim: after the change the
touchendis cancelled for an item and a radio item, also after a 600 ms long task. Unit cases verified; the long-task browser cases are stated. - Claim: the four new unit cases and the three browser cases fail on main's code and pass here. Unit cases verified; browser cases stated.
- Claim: the menus' accessibility and interaction specs and the local gates pass at earlier revisions. Stated, not run here.
- Claim: real Pixel 8 and real iPhone 14 runs pass at the live head, side by side with the head the owner passed. Not current: they ran at the previous head, and the merge since changes direct imports of the press model, so they do not carry (blocking finding).
- Claim: the live head's tree differs from the checked tree only in one re-padded table row, and Prettier, ESLint and the repository checks pass there. Not current: it describes the previous head; Prettier is clean on the changed files at this head.
- Claim: no export, prop, type, default or attribute changes; the guard's internal options gain a touch target and the private touch helper returns the touch. Verified: the built API surfaces are identical;
clickGuard.ts:92,useMenuPress.ts:296. - Claim: Storybook gains a submenu radio-group story. Verified:
DropdownMenu.stories.tsx. - Claim: this pull request's own change is +488/-33 lines. Verified.
- Claim: the four reference pages grow 53, 49, 107 and 96 B gzip from this change, and the whole stack adds more. Stated: the authors' measurements at earlier revisions; the measured code is unchanged.
- Claim: no file under the CLI package changes. Verified.
- Claim: the comment-style note on
clickGuard.tsgoes to a follow-up so the device evidence keeps carrying. Consistent with the evidence-carry rule. - Claim (#8080): its device takes ran at its live head against the head the owner passed. Not current: they ran at its previous head and do not carry to its new one (blocking finding).
- Claim (#8080): the reduced-motion hold failure on its Pixel 8 is a timing defect older than #8080, tracked separately. Not shown: both compared builds carry #8080's grow, and the cell has not run since
main's late-press fix merged in (blocking finding). .changeset/menu-pick-touchend-on-target.md: clear.changeset/menu-touch-grow.md: clearapps/sandbox/scripts/next-export-routes.json: clear (generated route list)apps/sandbox/src/app/(raw)/pages/menu-grow-cases/page.tsx: clearapps/sandbox/src/app/sandboxPages.ts: clearapps/storybook/stories/DropdownMenu.stories.tsx: cleardocs/architecture/layer-runtime.md: cleardocs/specs/AST-094-touch-presentations/spec.md: cleardocs/specs/components/DropdownMenu/DropdownMenu.spec.md: cleardocs/specs/components/DropdownMenu/modules/useMenuPress.spec.md: cleardocs/specs/components/Popover/Popover.spec.md: clearpackages/core/src/DropdownMenu/DropdownMenu.test.tsx: clearpackages/core/src/DropdownMenu/DropdownMenu.tsx: blocking finding for #8080 (device takes, FR22 cell); one non-blocking comment suggestionpackages/core/src/DropdownMenu/DropdownMenuPickTouchEnd.test.tsx: clearpackages/core/src/DropdownMenu/DropdownMenuTouchGrow.test.tsx: clearpackages/core/src/DropdownMenu/DropdownMenuTouchGrowPending.test.tsx: clearpackages/core/src/DropdownMenu/__tests__/DropdownMenuEntranceHold.interaction.browser.spec.ts: clearpackages/core/src/DropdownMenu/__tests__/DropdownMenuPickTapThrough.interaction.browser.spec.ts: clearpackages/core/src/DropdownMenu/__tests__/DropdownMenuTouchFocusRing.a11y.chromium.spec.ts: clearpackages/core/src/DropdownMenu/__tests__/DropdownMenuTouchGrow.interaction.browser.spec.ts: clearpackages/core/src/DropdownMenu/__tests__/MenuPress.a11y.chromium.spec.ts: clearpackages/core/src/Layer/settledBox.ts: clearpackages/core/src/Popover/popoverSurfaceMotion.test.ts: clearpackages/core/src/Popover/popoverSurfaceMotion.ts: blocking finding for #8080 (its input-hold import changed; device takes)packages/core/src/Popover/usePopoverSurfaceMotion.test.tsx: clearpackages/core/src/Popover/usePopoverSurfaceMotion.ts: blocking finding for #8080 (its input-hold import changed; device takes)packages/core/src/hooks/useMenuPress.test.tsx: clearpackages/core/src/hooks/useMenuPress.ts: blocking finding for #11859 and #8080 (its input-hold and scroll-view imports changed; device takes)packages/core/src/utils/clickGuard.test.ts: clearpackages/core/src/utils/clickGuard.ts: clear (one non-blocking comment suggestion)scripts/lazy-sheet-bundle.test.mjs: clear- #9777's 24 files: clear (verdict carried from its own review)
|
/approve-spec 128a529 |
There was a problem hiding this comment.
Changes requested: the code in #8080 and in this pull request still checks out, and an engineering owner approved the record edits at both heads, but both heads merge main changes to the shared input hold and the animator under that code, so the device takes behind them have to run again; a spec approval covers the records, not this device evidence.
#9777: approved (already merged); no blocking finding.
#8080: changes requested.
- Regression: the merged
mainchanges editLayer/inputHold.ts, whichPopover/popoverSurfaceMotion.ts,Popover/usePopoverSurfaceMotion.tsandhooks/useMenuPress.tsimport directly, and the sharedmotion/animator.ts, so underspec:AST-094DEC-31 the iPhone 14 and Pixel 8 cells need to run again at this pull request's head, and the reduced-motion held Projects cell, which failed at an earlier head againstcomponent:DropdownMenuFR22 (5 of 16 presses in the entrance hold acted), has to show no press acting.
#11859: changes requested.
- Regression: the same merges edit
Layer/inputHold.tsandutils/scrollView.ts, whichhooks/useMenuPress.tsimports directly, and the sharedmotion/animator.ts, so underspec:AST-094DEC-31 the real iPhone 14 and Pixel 8 takes in Testing steps 9 to 11 need to run again at this head, side by side with the head the owner passed, and the description, which still names an earlier head as the live head, should state them.
Whole stack: passes; a pull request lands only when it and every pull request below it are approved.
- Non-blocking: the two comment-style suggestions on
DropdownMenu.tsxandclickGuard.tsstill apply; a follow-up is fine.
Claims and files checked
Review mode: same-head; reason: none
- Changed rules (0): none.
- Change since the last review: no code change; an engineering owner posted the exact-head spec approval again on both pull requests, and neither description changed.
- Stack declaration: holds. All three descriptions carry the identical Stack line, and each lower head is contained in the next.
- Spec approval: an engineering owner approved the record edits at each open head; this settles spec authority, not the device evidence.
- Claim (fix release note): a finger's pick that closes a menu now cancels its
touchendon the node the touch began on, so no click reaches the control beneath. Verified:clickGuard.ts:195-203,useMenuPress.ts:824-836, and the four new unit cases, which pass at this head. - Claim (fix release note): a submenu pick takes its row out of the page before the
touchend, which the window then never received, and a busy main thread let the click through after the 400 ms window. Verified: the base click guard listens only on the window; the four new cases fail without the change. - Claim (fix release note): item and radio-item picks are covered. Verified: two unit cases; three browser cases in test code (stated, not run here).
- Claim (grow release note, #8080): a finger's or a pen's open grows DropdownMenu and MoreMenu out of the trigger and back, on Popover's path and timing. Verified:
DropdownMenu.tsx:1206-1219and the touch-grow unit cases, which pass at this head. - Claim (grow release note): a tap's open grows as a hold's does; under Reduce Motion on a coarse pointer the menu fades; a mouse, the keyboard and the pinned popover presentation keep the layer's entrance. Verified: unit cases; the fade frames are in test code (stated).
- Claim: seen in a production app on a phone. Stated by the author.
- Claim: at a finger's release the press model arms the click guard, then dispatches the row's click. Verified:
useMenuPress.ts:689-697. - Claim: the press model keeps the node from the
touchstartthat names the touch, the guard listens there too, and the first listener to hear thetouchendcancels it and both stop. Verified:useMenuPress.ts:824-836,clickGuard.ts:172-203. - Claim: the touch-presentation record requires the
touchendcancelled and the gesture's browser click to act on nothing. Verified against the current record's FR21 and FR26. - Claim: the guard's options gain a touch target with one
touchendlistener, and the menu still closes at the pick. Verified:clickGuard.ts:92,:199. - Claim: before the change the detached row's
touchendis not cancelled in jsdom, Chromium and WebKit. Verified in jsdom; Chromium was checked on this same patch in an earlier review; WebKit is stated. - Claim: after the change the
touchendis cancelled for an item and a radio item, also after a 600 ms long task. Unit cases verified; the long-task browser cases are stated. - Claim: the four new unit cases and the three browser cases fail on main's code and pass here. Unit cases verified; browser cases stated.
- Claim: the menus' accessibility and interaction specs and the local gates pass at earlier revisions. Stated, not run here.
- Claim: real Pixel 8 and real iPhone 14 runs pass at the live head, side by side with the head the owner passed. Not current: they ran at an earlier head, and the merges since change a direct import of the press model and a shared motion module, so they do not carry (blocking finding).
- Claim: the live head's tree differs from the checked tree only in one re-padded table row, and Prettier, ESLint and the repository checks pass there. Not current: it describes an earlier head.
- Claim: no export, prop, type, default or attribute changes; the guard's internal options gain a touch target and the private touch helper returns the touch. Verified: the built API surfaces are identical at this head;
clickGuard.ts:92,useMenuPress.ts:296. - Claim: Storybook gains a submenu radio-group story. Verified:
DropdownMenu.stories.tsx. - Claim: this pull request's own change is +488/-33 lines. Verified.
- Claim: the four reference pages grow 53, 49, 107 and 96 B gzip from this change, and the whole stack adds more. Stated: the authors' measurements at earlier revisions; the measured code is unchanged.
- Claim: no file under the CLI package changes. Verified.
- Claim: the comment-style note on
clickGuard.tsgoes to a follow-up so the device evidence keeps carrying. Consistent with the evidence-carry rule. - Claim (#8080): its device takes ran at its live head against the head the owner passed. Not current: they ran at an earlier head and do not carry to its new one (blocking finding).
- Claim (#8080): the reduced-motion hold failure on its Pixel 8 is a timing defect older than #8080, tracked separately. Not shown: both compared builds carry #8080's grow, and the cell has not run since
main's input-hold fixes merged in (blocking finding). .changeset/menu-pick-touchend-on-target.md: clear.changeset/menu-touch-grow.md: clearapps/sandbox/scripts/next-export-routes.json: clear (generated route list)apps/sandbox/src/app/(raw)/pages/menu-grow-cases/page.tsx: clearapps/sandbox/src/app/sandboxPages.ts: clearapps/storybook/stories/DropdownMenu.stories.tsx: cleardocs/architecture/layer-runtime.md: cleardocs/specs/AST-094-touch-presentations/spec.md: cleardocs/specs/components/DropdownMenu/DropdownMenu.spec.md: cleardocs/specs/components/DropdownMenu/modules/useMenuPress.spec.md: cleardocs/specs/components/Popover/Popover.spec.md: clearpackages/core/src/DropdownMenu/DropdownMenu.test.tsx: clearpackages/core/src/DropdownMenu/DropdownMenu.tsx: blocking finding for #8080 (device takes, FR22 cell); one non-blocking comment suggestionpackages/core/src/DropdownMenu/DropdownMenuPickTouchEnd.test.tsx: clearpackages/core/src/DropdownMenu/DropdownMenuTouchGrow.test.tsx: clearpackages/core/src/DropdownMenu/DropdownMenuTouchGrowPending.test.tsx: clearpackages/core/src/DropdownMenu/__tests__/DropdownMenuEntranceHold.interaction.browser.spec.ts: clearpackages/core/src/DropdownMenu/__tests__/DropdownMenuPickTapThrough.interaction.browser.spec.ts: clearpackages/core/src/DropdownMenu/__tests__/DropdownMenuTouchFocusRing.a11y.chromium.spec.ts: clearpackages/core/src/DropdownMenu/__tests__/DropdownMenuTouchGrow.interaction.browser.spec.ts: clearpackages/core/src/DropdownMenu/__tests__/MenuPress.a11y.chromium.spec.ts: clearpackages/core/src/Layer/settledBox.ts: clearpackages/core/src/Popover/popoverSurfaceMotion.test.ts: clearpackages/core/src/Popover/popoverSurfaceMotion.ts: blocking finding for #8080 (its input-hold and animator imports changed; device takes)packages/core/src/Popover/usePopoverSurfaceMotion.test.tsx: clearpackages/core/src/Popover/usePopoverSurfaceMotion.ts: blocking finding for #8080 (its input-hold import changed; device takes)packages/core/src/hooks/useMenuPress.test.tsx: clearpackages/core/src/hooks/useMenuPress.ts: blocking finding for #11859 and #8080 (its input-hold and scroll-view imports changed; device takes)packages/core/src/utils/clickGuard.test.ts: clearpackages/core/src/utils/clickGuard.ts: clear (one non-blocking comment suggestion)scripts/lazy-sheet-bundle.test.mjs: clear- #9777's 24 files: clear (verdict carried from its own review)
|
/approve-spec 128a529 |
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet because it skips drafts, and the merge guard waits for it to pass.
#9777: approved (already merged).
#8080: approved pending CI. Its real iPhone 14 and Pixel 8 runs at its own head, the reduced-motion held Projects cell included, clear the evidence finding from the last review.
#11859: approved pending CI. The real iPhone 14 and Pixel 8 takes in Testing steps 12 to 14 clear the evidence finding from the last review.
Whole stack: passes; a pull request lands only when it and every pull request below it are approved.
- Non-blocking: the two comment-style suggestions on
DropdownMenu.tsxandclickGuard.tsstill apply; a follow-up is fine.
Claims and files checked
Review mode: same-head; reason: none
- Changed rules (0): none.
- Change since the last review: no code change; both open descriptions now report real iPhone 14 and Pixel 8 takes at their current heads.
- Stack declaration: holds. All three descriptions carry the identical Stack line, and each lower head is contained in the next.
- Spec approval: an engineering owner approved the record edits at each open head, and the spec-owner status succeeds; no decider or approver line changes.
- #11859 release note: a finger's pick that closes a menu cancels its
touchendon the node the touch began on, so no click reaches the control beneath. Verified:clickGuard.ts:195-203,useMenuPress.ts:689-693,:722-726,:832-836, and the new unit cases. - #11859 release note: a submenu pick takes its row out of the page before the
touchend, which the window then never received, and a busy main thread let the click through after the 400 ms window. Verified: the base guard listens only on the window;clickGuard.ts:206; the unit case asserts the row is detached. - #11859 release note: item and radio-item picks are covered. Verified: two unit cases; three browser cases in test code (read, not run here).
- Seen in a production app on a phone. Stated by the author.
- The press model arms the click guard at the lift, then dispatches the row's click. Verified:
useMenuPress.ts:689-697. - The window listener came with an earlier pull request. Stated.
- The press model keeps the node from the
touchstartthat names the touch, the guard listens there too, and the first listener to hear thetouchendcancels it and both stop. Verified:useMenuPress.ts:832-836,clickGuard.ts:172-203, and the unit case for atouchendboth listeners hear. - The touch-presentation record requires the
touchendcancelled and the gesture's browser click to act on nothing. Verified against the current record's FR21 and FR26. - The guard's options gain a touch target with one
touchendlistener, and the menu still closes at the pick. Verified:clickGuard.ts:92,:199. - Before the change, the detached row's
touchendis not cancelled in jsdom, Chromium and WebKit. jsdom and Chromium verified on this code; WebKit stated. - After the change it is cancelled for an item and a radio item, also after a 600 ms long task. Unit cases verified; the long-task browser cases stated.
- The four new unit cases and the three browser cases fail on main's code and pass here. Verified for the unit cases: four of the five new cases fail without the change; the fifth guards the case where both listeners hear the
touchend. Browser cases stated. - The menus' accessibility and interaction specs, the local gates and the strict preflight pass. Stated, at the revisions named.
- Real Pixel 8 runs at this head, side by side with the previous head: three cells at normal speed, a 4× CPU slowdown and reduced motion pass 3 of 3 on both builds, with a second Pixel 8 as the spot check; nothing beneath acts and the pick's
touchendis cancelled. Stated in text with device, browser, head, speed and result, as the touch record asks. - Real iPhone 14 runs at this head, side by side with the previous head, plain and with a 600 ms task: nothing beneath acts, 3 of 3 each, and the pick's
touchendis cancelled. Stated likewise. - Escape, Tab and typeahead rows are carried from the head before the last
mainmerge. Stated; no claim of this pull request rests on them. - The earlier device runs do not carry to this head because the merge brings changes to the input hold, the scroll-view check and the animator. Verified from the history.
- The comment-style note on
clickGuard.tsgoes to a follow-up so the device evidence keeps carrying. Consistent with the evidence-carry rule. - No export, prop, type, default or attribute changes; the guard's internal options gain a touch target and the private touch helper returns the touch; Storybook gains a submenu radio-group story. Verified:
clickGuard.ts:92,useMenuPress.ts:296,DropdownMenu.stories.tsx:971. - This pull request's own change is +488/-33 lines; no file under the CLI package changes. Verified.
- The four reference pages grow 53, 49, 107 and 96 B gzip from this change, and the whole stack adds more. Stated: measured at an earlier revision of the same code.
- The live head merges #8080's head over the current base. Verified.
- #8080 release note: a finger's or a pen's open grows DropdownMenu and MoreMenu out of the trigger and back, on Popover's path and timing, a tap's open included. Verified:
DropdownMenu.tsx:1206-1219,:1564-1565,:1618, and the touch-grow unit cases. - #8080 release note: under Reduce Motion on a coarse pointer the menu fades; a mouse, the keyboard and the pinned popover presentation keep the layer's entrance. Verified: unit cases; the fade frames are in browser test code (stated).
- #8080: taps stay held from the open to the grow's first frame under a coarse pointer, and a touchscreen laptop holds nothing. Verified:
usePopoverSurfaceMotion.ts:91,popoverSurfaceMotion.ts:333-335, and the fine-pointer unit case. - #8080: the grow measures the trigger without its press scale. Verified:
usePopoverSurfaceMotion.ts:182and two unit cases. - #8080: its real iPhone 14 and Pixel 8 runs at its head match the previous head; in the held Projects case no press in the hold acts (0 of 34, and 0 of 38 under reduced motion) on five Pixel 8 phones, one a spot check. Stated in text, as the touch record asks.
- #8080: the earlier reduced-motion hold failure is a gap in the input hold that
main's late-press fix closes. Consistent: that fix changes the input hold and is in this head. - #8080: its module line counts under the engine rule. Stated at an earlier revision; at this head they are 1,978 to 2,046, 1,178 to 1,221 with #11859, 400 to 416 and 137 to 206 lines, and each module's conclusion holds.
- #8080: its size report (menu page +18,814 B gzip, table +88 B, docs and form unchanged) and its earlier device and gate runs. Stated, at the revisions named.
.changeset/menu-pick-touchend-on-target.md: clear.changeset/menu-touch-grow.md: clearapps/sandbox/scripts/next-export-routes.json: clear (generated route list)apps/sandbox/src/app/(raw)/pages/menu-grow-cases/page.tsx: clearapps/sandbox/src/app/sandboxPages.ts: clearapps/storybook/stories/DropdownMenu.stories.tsx: cleardocs/architecture/layer-runtime.md: clear (owner-approved)docs/specs/AST-094-touch-presentations/spec.md: clear (owner-approved)docs/specs/components/DropdownMenu/DropdownMenu.spec.md: clear (owner-approved)docs/specs/components/DropdownMenu/modules/useMenuPress.spec.md: clear (owner-approved)docs/specs/components/Popover/Popover.spec.md: clear (owner-approved)packages/core/src/DropdownMenu/DropdownMenu.test.tsx: clearpackages/core/src/DropdownMenu/DropdownMenu.tsx: clear (one non-blocking comment suggestion)packages/core/src/DropdownMenu/DropdownMenuPickTouchEnd.test.tsx: clearpackages/core/src/DropdownMenu/DropdownMenuTouchGrow.test.tsx: clearpackages/core/src/DropdownMenu/DropdownMenuTouchGrowPending.test.tsx: clearpackages/core/src/DropdownMenu/__tests__/DropdownMenuEntranceHold.interaction.browser.spec.ts: clearpackages/core/src/DropdownMenu/__tests__/DropdownMenuPickTapThrough.interaction.browser.spec.ts: clearpackages/core/src/DropdownMenu/__tests__/DropdownMenuTouchFocusRing.a11y.chromium.spec.ts: clearpackages/core/src/DropdownMenu/__tests__/DropdownMenuTouchGrow.interaction.browser.spec.ts: clearpackages/core/src/DropdownMenu/__tests__/MenuPress.a11y.chromium.spec.ts: clearpackages/core/src/Layer/settledBox.ts: clearpackages/core/src/Popover/popoverSurfaceMotion.test.ts: clearpackages/core/src/Popover/popoverSurfaceMotion.ts: clearpackages/core/src/Popover/usePopoverSurfaceMotion.test.tsx: clearpackages/core/src/Popover/usePopoverSurfaceMotion.ts: clearpackages/core/src/hooks/useMenuPress.test.tsx: clearpackages/core/src/hooks/useMenuPress.ts: clearpackages/core/src/utils/clickGuard.test.ts: clearpackages/core/src/utils/clickGuard.ts: clear (one non-blocking comment suggestion)scripts/lazy-sheet-bundle.test.mjs: clear- #9777's 24 files: clear (verdict carried from its own review)
cixzhang
left a comment
There was a problem hiding this comment.
Engineering-owner approval at this exact head (128a529), posted by Cindy's agent (agent-made, not a human review) under her standing instruction. CodeBunny approved this head (review 6012351035), CI is green at this head, and Specs records are current.
…12179) * feat(core): one progress module for the motion foundation progressCurve, mapProgress, mapRange and presentedProgressVelocity in motion/progress.ts, internal, one velocity unit (progress per second). Rebuilt on main from the pull request's own change, without the open dependency chain it no longer needs. Co-authored-by: Cindy Zhang <[email protected]> * refactor(animatedLayout): take the settle spring's progress from progressCurve CodeBunny on #9755: springProgress solved the same spring as progressCurve. It now reads progressCurve (remaining = 1 - progress), so one implementation remains. Same curve, same settle epsilon (0.001) and duration. * feat(core): the rect morph's paths, the rect a grow-out presentation shows at each progress lerpPath, edgeGrowPath, each path's restartFrom and morphCurves in motion/morphPath.ts, internal. Pure geometry over a progress curve: the caller chooses the timing. Rebuilt on the progress module from the pull request's own change, without the open chain it no longer needs. Co-authored-by: Cindy Zhang <[email protected]> * Merge remote-tracking branch 'origin/main' into motion/morph-path # Conflicts: # packages/core/src/motion/README.md * feat(core): one rect morph for touch presentations that grow out of a source rect createRectMorph in motion/rectMorph.ts, internal: present along a path and dismiss back onto a copy or the element, each continuing the other from the rect on screen. Rebuilt on main from the pull request's own change and ported to main's engine (createMotionAnimator). Timing follows the owner's rule for touch motion: present and dismiss take a motion, either a theme duration and easing (a tap, a key, the program) or a spring (a gesture's release, from its velocity). timedProgressCurve joins the progress helpers. architecture:react-component-runtime INV12 records the implementation gap: the size-change glide moves onto the morph next. Co-authored-by: Cindy Zhang <[email protected]> * feat(TextInput, TextArea, NumberInput): fields stay above the keyboard Each passes its input to `useMobileKeyboard` from its own render, with no prop and no Effect of its own. On focus the field decides where it is: inside a keyboard target such as a Tall BottomSheet it moves nothing; in an app's bar docked at the viewport's bottom, the bar rides the keyboard, its bottom on the keyboard's top; in scrolling content, its nearest scroller, the document included, scrolls it 10 px above the keyboard in the keyboard's report. In a fixed container the app positions itself, a scroller around the field reveals it, and with none the browser's own reveal stays. Its first tap and focus moves into it arrive without the browser's reveal where the module places the field, so the page never pans there. A scroll area does not gain the range it lacks at its end yet. Where a field's scroll area cannot place it, the document reveals it, in the page and in a fixed container where the document's scroll moves the container, as in Safari while its keyboard shows; elsewhere Core scrolls the document back. Where the document cannot scroll far enough, as at a short page's end in Chrome, a pan of the visual viewport takes the rest in the same frame (`panVisualViewportTo`): a probe fixed in the layout viewport is scrolled into view, as the reveal-pan watch puts a pan back. The watch takes Core's own pan as the new rest. Firefox for Android does not pan for the probe. A page with nothing to scroll keeps the browser's own reveal. On Chrome's show, a docked bar first sets its field 4 px above the keyboard's top at once, as the Tall sheet does, and only the rest rides, so Chrome's own pan finds the field clear. Every viewport report now feeds the ride's reveal-pan watch, so a pan Chrome still makes is put back, and a pan made at one keyboard height goes back at the next. Under Remove animations, Gboard first reports a keyboard 48 px tall, and Chrome may then reveal the bar's field itself: it scrolls the page behind the bar, then pans. In Chrome, the ride's watch scrolls the document back as well, when the scroll and the pan centre the field as Chrome's reveal does; the app's own scroll to another element stays. On iOS, a reveal that places the field rises on the browser's smooth scroll from the keyboard's first report, which comes as the keyboard starts to slide, so the field rises beside it (`risesSmoothly`, which reads Core's iOS WebKit check, `isIosWebKit`). The scroll back records where the rise is headed, and a rise still on its way when the keyboard changes height carries on from its target. Under Reduce Motion, in a theme that reduces motion for everyone, and in Chrome, which checks the field in the resize's own commit, the reveal moves at once. The rise and the scroll back ask the motion module's new `reducesMotion`, beside `reducedMotionFade`, which now uses it, so a theme that reduces motion for everyone counts as the setting for both. A scroll area's reveal goes through its own `scrollBy` with an explicit behavior where it has one, so a smooth `scroll-behavior` on the area cannot slow an instant reveal, as the Tall sheet's reveal already does. When the keyboard closes, each scroller a reveal moved scrolls back to where it was (keyboardScrollBack.ts), on the browser's smooth scroll. Safari on iOS reports the keyboard gone about half a second after the blur that closes it, once it is down. There the scroll back starts at that blur, once the focus change settles on nothing that brings up a keyboard with no finger on the screen, and slides down beside the keyboard; the report only confirms it. A finger then can be a tap that brings the keyboard back, so the report decides, as elsewhere and under Reduce Motion, where the scroll lands at once. Safari applies a scripted scroll a frame late, so a scroll set each frame jitters. A scroller the person scrolled meanwhile keeps their scroll. A field that gains focus during the slide stops the scroll back where the page is (`stopKeyboardScrollBack`), and its reveal goes on from there as Core's own scroll. A sandbox page puts three fields in the middle of a page that scrolls the document. Each field's `.keyboard.test.tsx` drives the keyboard module's test double. Mobile keyboard stories on TextInput place the fields low in the page, a TextInput in a toolbar fixed at the bottom (docked, floating above the edge, or with its own `translate`), a last field at the end of a short page and of a scroll area, a scroll area low on the page, a scroll area in a floating panel and in a full-viewport panel, and a field in a sheet of a set height. Firefox for Android can carry the reveal's document scroll as a visual-viewport offset, show the document where it was before the reveal at the keyboard's hide report, and turn the offset back into a document scroll only after it. The scroll back then waits up to a second for the first document scroll: one that lands where Core left the document is the browser's own, and the scroll back follows it. A touch, a keyboard that comes back, the field's page going, or the wait's end puts nothing back. The reveal-pan watch's touch flag now holds through a report that comes while a finger is on the screen. In Firefox the toolbar hides in a drag, which changes the measured keyboard height mid-drag; the watch then took the drag's own pan for the browser's and put it back. The input stream now counts the fingers on the screen from touch events (`isTouchOnScreen`), only while `touchend` and `touchcancel` are heard. A native pan keeps a finger there, though its `pointercancel` drops the press from `getDownPresses`, so that record cannot serve. The watch's shared touch subscription hears those two types, and a report reads the count. After the show's first reveal, a keyboard report reveals nothing while a press that started after the last reveal is down. In Firefox the toolbar hides in a drag, and the reveal re-applied itself with small scrolls under the person's finger. The report's height is kept, so the field stays where the person put it, and a later report with the finger up reveals it as before. The press that focused the field holds nothing: a long press focuses with the finger still down, and Gboard can report a 48 px keyboard first, then its full height. The input stream also counts the touches that start (`getTouchStartCount`), and each reveal notes that count. The keyboard module reads the finger count through `isFingerOnScreen`: a finger down at the keyboard's last hide counts no more until a touch starts, since a touch whose target leaves the page ends at a node the window never hears. The count includes a stylus, whose drag moves the page as a finger does. Nine unit tests cover the scroll back from the blur on iOS: it starts at the blur and the report moves nothing more; focus that moves on to another field or into a frame keeps the page; a finger on the screen at the blur leaves it to the report; a person's scroll stands; Reduce Motion waits for the report; a field focused again during the slide stops the scroll back and rises from where the page is, or stays where a touch stopped it with nothing left to raise; and the next close goes back to the first place, at a blur or at a report. Six unit tests cover the scroll back: the page's smooth scroll at the report (nothing before it), Reduce Motion, a theme that reduces motion, a person's scroll kept, a scroll area after Back, and a focus move to another field. Firefox-shaped cases carry the reveal as an offset and close the keyboard before the fold: the scroll back follows the fold, a touch-drag control keeps the page, only the first document scroll counts, and each way the wait ends leaves no scroll listener. Safari's and Chrome's close sequences still decide at the report, with no wait. A Firefox-shaped drag grows the viewport twice with the finger down and finds no put-back; after the finger is up, a browser pan is put back. Another drags the page with the toolbar hiding twice and finds no reveal scroll until the finger is up. A long press focuses the field while Gboard grows from 48 to 290 px, and the field is revealed at 290; the next show's first reveal runs again under the same press, and a press that starts after the reveal holds the next report until it lifts. After the keyboard goes with no finger down, a long press that brings it back is revealed with that press still down. Another holds a report while the long press's finger stays down after a second finger tapped and lifted. Another misses a touch's end, as when its target leaves the page, and finds a browser pan put back once the keyboard has hidden and shown again. The input stream's tests count fingers through a second finger, a cancel and a native pan's `pointercancel`, count nothing while a touch end could go unheard, and count the touches that start. Six cover the rise on iOS: its smooth scroll, Reduce Motion, a theme that reduces motion, the scroll back after a rise drawn later, a rise carried on at a new height, and no second reveal while a scroll area's rise is drawn. Their CSS.supports stub answers both of Safari's forms, a property and value or a condition. Another drives a scroll area with a smooth `scroll-behavior` and finds its own `scrollBy` called at once. Two in the motion module cover `reducesMotion`: the setting, and a theme that reduces motion for everyone. * fix(rectMorph): a handed-in animator stays on the element through a copy dismissal CodeBunny on #9769: a dismissal onto a copy detached the animator, and a handed-in one was never attached again, so its owner's writes stopped reaching the element. Only the morph's own animator lets go now. Co-authored-by: Cindy Zhang <[email protected]> * fix(motion): one timed curve keeps a retargeted velocity, for the pager and the morph CodeBunny on #9769: solveAnimatedPageScroll already played this curve and keeps the velocity of the move it retargets. timedCurve in progress.ts is now that one curve; the pager and the morph's timed motion call it, so a timed present that interrupts a dismissal keeps its velocity. The INV12 note states the system only. File header and comments trimmed. Co-authored-by: Cindy Zhang <[email protected]> * fix(rectMorph): a timed motion from rest plays its easing as given CodeBunny on #9769: with nothing in flight the morph handed timedCurve a velocity of 0, which it treats as a retarget and uses to cancel the easing's starting slope. Only a motion in flight hands its velocity on now; tests check a present from rest and a dismissal from a settled present against the easing itself. Header and comments shortened. Co-authored-by: Cindy Zhang <[email protected]> * docs(rectMorph): the timing follows the component's motion record The type's doc, the example and the changeset name no rule of their own about which input plays which timing: each play takes the timing the adopting component's motion record names (AST-094 FR45). Co-authored-by: Christopher Chedeau <[email protected]> * docs(AST-099): TextInput, TextArea and NumberInput meet FR9 FR9's scrolling-content bullet adds the spec owners' sentence: where a browser carries out the document's scroll by moving the visual viewport, that offset is the reveal, not a pan. Gap 2 is met. Gaps 1, 10 and 11 say what the three fields now do. Gap 11 keeps the missing scroll range as the fix; until a scroller gains it, Core pans the visual viewport where the document cannot scroll far enough. Two verification rows cover Firefox for Android (the offset equals the computed reveal) and Chrome (no pan added after Core places the field). Chrome's names the cases Core pans, and fails a field Core pans that ends other than 10 CSS px above the keyboard. In Firefox for Android the pan moves nothing where the page has no scroll range; Gap 11 names those cases. The device-evidence row records that a docked toolbar resting under the keyboard while a field outside it has focus is not a failure. BottomSheet's height doc says what such a field gets in a sheet that is not a fully expanded Tall sheet. FR9's scrolling-content bullet adds the close: each scroller that revealed the field scrolls back to where it was before the reveal, and a scroll the person made while the keyboard showed is kept. A verification row covers a field in the middle of a page that scrolls the document. FR9's scrolling-content bullet adds the open: on iOS the field rises on the browser's own smooth scroll beside the keyboard's slide, settling within 0.15 s after the keyboard settles, and it moves in one frame under Reduce Motion, in a theme that reduces motion for everyone, and in other browsers. A verification row reads every drawn frame of the rise. Gap 13 records Chrome's rise, which stays in one frame because Chrome checks the field in the resize's own commit; Firefox for Android takes the same path. The device-evidence row's failure for a reveal later than the keyboard's report notes that on iOS the rise starts in that frame and settles as FR9 states. FR9's scrolling-content bullet adds the hold: a show's first report always places the field, and a later report that comes while a finger is down, after a touch has begun since the field's last placement, moves nothing. FR9's close adds that at the hide report, Firefox for Android can still show the document where it was before the reveal, and turns the reveal back into a document scroll only after that report; the scroll back follows that scroll. A row closes the keyboard with Back in Firefox for Android at normal speed and on a slow profile. The input-fields family's FR13 status says the same: the three fields meet FR13 through FR9, apart from Gap 11. FR9's close now starts the scroll back at the blur that closes the keyboard in Safari on iOS, beside the keyboard's slide; the report that the keyboard has gone comes later and only confirms it. Elsewhere it starts at that report, and under Reduce Motion, and in a theme that reduces motion for everyone, it lands at once there. A scroller the person scrolled keeps the person's scroll, a finger on the screen at the blur leaves the scroll back to the report, and a field that gains focus during the slide stops the scroll back where the page is. Safari's close row reads every drawn frame from Done until the page rests, and adds a tap on the field 80 ms and 150 ms after Done. The open sentence is rewrapped, word for word. * Merge main into motion/morph-path * Merge motion/morph-path into motion/rect-morph Main renamed the engine's factory to createMotionEngine. The merge takes that name in the test bundle and in rectMorph and its tests. * fix(rectMorph): AST-094 links the morph; the proof imports a safe test The morph's comment cited AST-094 FR45 as its only link to that record. AST-094 now lists the file, and the comment keeps the fact without the citation. The proof imports `test` from the a11y-spec package, whose contexts reach no remote host, as main's lint asks. * test(SnapPaging): the pager's bundle lists the progress module The pager's timed settle takes its curve from motion/progress.ts, so the hook adds that module over Carousel alone. The bundle test lists it as pager code. * test(motion): the popover's proofs read Popover's live geometry The morph's popover proofs played a copy of Popover's growth that had drifted: it lacked the overlap rule, so an overlapping popover grew from its left edge where Popover grows from its top. The proofs now import popoverCollapsedState, popoverFrame and frameOf from Popover. A new overlapping case, which the deleted copy fails, pins the growth from the top edge. * Merge motion/morph-path into motion/rect-morph * refactor(motion): one eased progress, with a retargeted velocity The rect morph's timedProgressCurve played, from rest, the curve that easedProgress already plays for Popover, SegmentedControl and the layout glide. easedProgress moves into progress.ts and takes an optional velocity: the Hermite carry that the pager and the morph use. From rest its values do not change. Its velocity is a central difference that stays inside the curve, and from rest it starts on the curve's own slope. timedProgressCurve goes, and timedCurve maps easedProgress onto values, keeping only its carry for no distance. * test(motion): the popover's turn-around reads Popover's live curves The morph's turn-around proof compared restartFrom with lines written in the test, so a change to Popover's readState or surfaceCurves left it green. Popover exports both for the proofs, which now replay its own turn-around. morphPath.ts's header keeps only its tags: the paths' own JSDoc says the rest. * Merge motion/morph-path into motion/rect-morph * docs(changeset): the rect morph's note names the eased-progress move The note said timedProgressCurve joins the progress helpers, which this pull request no longer adds. It now says easedProgress moves to them with a retargeted velocity, and timedCurve joins them. * Merge main into motion/rect-morph Main's Popover touch growth, which plays on the surface and floors its opacity curve with motion/opacityFloor.ts, meets the rect morph's move of easedProgress into motion/progress.ts in the imports of popoverSurfaceMotion.ts. The merge keeps both: the floor's import, and easedProgress from progress. * test(motion): the popover's turn-around compares opacity as drawn Popover's surface curves now stop their opacity at 0 or a floor above it. Past its end, a turn-around toward the source takes the popover path's opacity below 0, where Popover's stops at 0. An opacity draws clamped to 0 through 1, so both draw 0. The proof now compares the two as drawn, which holds with Popover's curves before and after the floor. * Merge motion/morph-path into motion/rect-morph * Merge main * fix(motion): a popover's morph never reads an opacity below 0 A popover's grow path read its opacity on a straight line, so before its start and past its end it went below 0: a turn-around toward the source read -0.025 at 1.05. An opacity below 0 draws as 0, so opacityAt now stops at 0. The popover proofs compare opacities as drawn, since Popover's own model still reads below 0 there. * Merge motion/morph-path into motion/rect-morph * feat(DropdownMenu): a finger or a pen opens the menu as it presses Under a finger or a pen, a DropdownMenu or MoreMenu trigger opens its menu as it is pressed, instead of after a 500 ms hold (spec:AST-094 FR29, FR43). Inside a scroll view it opens once the 150 ms content-touch delay passes with no scroll, so a scroll that starts on the trigger still scrolls. The finger that opened the menu picks a row only after moving 10 px. presentation="popover" keeps the previous behavior. useMenuPress with no longPressDelayMs follows the same rules, and longPressDelayMs: 500 keeps the previous hold. * test(motion): the morph proofs drop the menu's old straight line The anchored menu's case modeled a straight line from a 22 px square on its control. The menu now grows out of its trigger on Popover's edge path, which the popover cases already check, so the case no longer describes any presentation's model. The file header follows. * Merge main * Merge main * docs(DropdownMenu): open-on-press notes name the anchored menu A menu shown as a bottom sheet still opens at the tap's click, so the release note names the anchored menu, as the press does. The hook's doc names a finger or a pen on every device, as the hook acts. * Merge main * sandbox: a page to try a menu's press under a finger A raw page that scrolls with the document. Its Actions menu sits in a fixed top bar, so it opens as a finger presses it, and a slide onto a row runs that row once. Its More menu sits in the page, so a flick that starts on it scrolls the page. The bar shows which row ran and how many times. * Merge main * Merge the open-on-press change into the rect morph stack * feat(DropdownMenu): a finger's open grows the menu out of its trigger Under a finger or a pen, a DropdownMenu or MoreMenu grows out of its trigger as it opens and shrinks back into it as it closes. It plays on the shared rect morph, on the popover's path and timing, so it grows as a Popover does. A tap's open grows as a hold's does: the open at a tap's lift used to take the mouse's path. The grow's code loads at the first touch on the page or on a trigger. A mouse, the keyboard and presentation="popover" keep the layer's own entrance. * fix(DropdownMenu): under Reduce Motion a finger's open only fades in Under Reduce Motion, a finger's open played the grow, which the animator turns into a dip: for its first half the menu sat collapsed at the trigger. A resting mouse's click then missed the row it rested on. The open now keeps the layer's own entrance, which only fades in where the menu rests, as before the grow. FR21 and the changeset say so. * test(DropdownMenu): touch specs wait out a finger's grow A finger's grow starts a frame after the open, or once its code arrives, and holds input until its curve ends. The press specs now wait for three still frames, and the entrance-hold spec waits for the grow to start and for its natural end. Finishing its animations from a script leaves the grow's hold in place until its curve ends. * refactor(core): one Reduce Motion predicate for the animator and menu The menu's glue copied the animator's Reduce Motion read. A leaf module now holds the one predicate: the person's setting, or a theme that reduces motion for everyone. The animator, the Reduced Motion policy and the glue call it. It imports no motion code, so the glue reads it without the animator in DropdownMenu's static bundle. No behavior changes. * fix(DropdownMenu): every copy of Core shares the grow's one load The menu kept its loaded grow code, the load in flight and the replaceable import in module scope. Every copy of Core now shares them under a registered key. A change to the module's calls bumps the version, so each copy then keeps its own. * fix(DropdownMenu): taps stay off the page until the menu shows Under a coarse primary pointer, the grow takes its input hold at its first frame. Before that frame, a tap reached the page: on an open with the code loaded, and on the first open between the code's arrival and the grow. A hold now lasts from the open until the grow's first frame. The press model's unit cases stub the presentation's hold, as jsdom never ends the grow. * docs(AST-094): FR31 grows once the grow's code is loaded Until the code is loaded, an open fades. Only an open before the code first loads in a page session can fade: the first open, or an open after a failed load. * Merge main * docs(AST-094): FR31's faded open closes with no shrink An open before the grow's code loads fades, and its close plays no shrink, as the DropdownMenu record's FR21 states. * fix(keyboard): the scroll back's records are one per page across copies keyboardScrollBack.ts keeps its four per-window stores under registered shared keys, as main now keeps the rest of the keyboard model. A swizzled copy's field and the package's field then note into one record, so one scroll back runs per page. The shared-identity check flagged the four module-scope stores after the merge of main. focusKeyboard.shared.test.tsx gains a case: the package sees where a copy's scroll for the keyboard is headed. * fix(DropdownMenu): the grow's code loads through the shared loader The grow's code now loads through the shared module loader that the menu's bottom sheet uses, as the import boundaries require. A failed load warns once in development builds, and the next open still asks again. The DropdownMenu record's FR21 names when the code loads: at a trigger's first touch, or the page's first touch where touch is the primary input. * Merge main * fix(keyboard): a field focused as it mounts starts its session at attach A TextInput, TextArea or NumberInput with hasAutoFocus has focus before the keyboard path attaches, so no later focus event starts its session, and it kept only the browser's own reveal. keepFieldAboveKeyboard now starts the session at attach when the field already has focus. Every other route is unchanged. Each field's keyboard test gains a hasAutoFocus case, which fails without the fix. * Merge main * Merge the open-on-press change into the rect morph stack * Merge main and the open-on-press change * Merge commit 'ebb9ddecc0219bc6eaf3caf40b6e4e45f81dc0e5' into motion/rect-morph * fix(motion): existing callers keep easedProgress's values; the pager and the rect morph use timedCurve easedProgress moves to the progress helpers byte for byte, so Popover and SegmentedControl read the same positions and velocities as on main. timedCurve is the pager's curve as on main, with one change: from rest, its velocity at t <= 0 is the curve's own starting slope. The rect morph plays its timed motion on timedCurve from 0 to 1. callerMotionValues.test.ts pins easedProgress and the pager on a fixed grid, bit for bit, to main's values. Based on vjeux's test (vjeux/astryx coverage/rect-morph-first-instant) * test(paging): a retarget at the first instant goes on at the starting speed A linear move of 300 px over 0.3 s, retargeted at t = 0, reads 0 px/s on main, so the retarget starts from rest. Now it reads about 1000 px/s, the curve's own starting slope, and the retarget keeps that speed. The position stays continuous. Based on vjeux's test (vjeux/astryx coverage/rect-morph-first-instant) * test(paging): a 0 ms move is on its target at once, at rest On main a 0 ms animated scroll reads NaN at t = 0 and its start position before it. timedCurve's 0 ms guard puts it on its target with no speed, as the rect morph's 0 ms timing does. * test(motion): compare the callers' values with copies of the earlier functions A float64 hash of easedProgress's values is not the same on every platform: macOS arm64 and CI's Linux give different hashes for main's code. The test now keeps copies of easedProgress and solveAnimatedPageScroll as they are on main (ebb9dde), and checks that the shipped functions give the same number, bit for bit (Object.is), for each position and velocity on the grid. From rest, the pager's velocity at t <= 0 stays the one value left out. Based on vjeux's test (vjeux/astryx coverage/rect-morph-first-instant) * Merge the open-on-press change into the rect morph stack * Merge the rect morph's new head * refactor(core): one useMenuPress for every menu * refactor(keyboard): read Reduce Motion through reducedMotionFade The keyboard path asks the Reduced Motion policy that already serves motion the animator does not drive: reducedMotionFade(element) is null when motion is not reduced. That answer counts the person's setting and a theme that reduces motion for everyone, as before. reducesMotion, which this branch added to reducedMotion.ts, goes, so reducedMotion.ts, its test and the motion README are as on main. Behavior is unchanged. * refactor(keyboard): the scroll back lives in keyboardTarget.ts keyboardTarget.ts, the scroll back's only caller, already imports everything it uses, so the scroll back moves there verbatim and its functions become private. keyboardScrollBack.ts and its five exports go. Its four stores keep their shared keys, now named for keyboardTarget. focusKeyboard.shared.test.tsx is as on main: the shared-identity source check covers the stores. Behavior is unchanged. * docs(AST-099): name the keyboard module's new cross-module exports Current-state impact names the five exports the keyboard path adds and why each one is needed: the input stream's two touch counts, keyboardHeight's finger read and visual-viewport pan, and keyboardTarget's clearance at the first report. * Merge the open-on-press change into the rect morph stack * Merge the open-on-press change's rework * docs(AST-099): Gap 19, a field in a modal sheet shorter than tall FR9's implementation gaps gain Gap 19. A modal BottomSheet shorter than tall is a full-viewport dialog with no scroller, and BottomSheet's keyboard path runs only for a tall sheet. So a field there keeps the browser's own reveal, and Chrome on Android pans the page. * refactor(DropdownMenu): grow with the page, on Popover's surface motion * docs(Popover): name the surface motion options DropdownMenu passes * Merge main * Merge main * Merge the open-on-press change into the rect morph stack * Merge the open-on-press change's main merge * test(DropdownMenu): read the row under a held finger once the grow rests * docs(AST-099): name Gap 19 where the fields meet FR9 The implementation-gaps lead, Gap 2 and family:input-fields' FR13 status line say TextInput, TextArea and NumberInput meet FR9 apart from the missing scroll range. They now also name Gap 19, a modal BottomSheet shorter than tall. * refactor(input): one touch reader in the input stream isTouchOnScreen and getTouchStartCount become one reader, getTouches. It returns the record the stream already keeps: the fingers on the screen and how many touches started. The keyboard module reads it at each of its five places. No behavior changes, and the same tests pass through the one reader. * docs(AST-099): name the input stream's one touch reader AST-099's current-state list names getTouches, the one reader that replaces isTouchOnScreen and getTouchStartCount. * Merge commit '7e7fbae0fa0ba389ad37fafdb26e6495fab19fd4' into motion/rect-morph # Conflicts: # packages/core/src/SegmentedControl/useSegmentedSelectionMotion.ts * Merge main into the rect morph stack * Merge main and the rect morph stack's live head * docs(AST-094): name the morph path module * Merge commit '6176b9dccc1986b83713e4c9dcf39688e7c5b3e6' into motion/rect-morph * docs(AST-094): name the rect morph module * refactor(Popover): name the tap hold until the grow's first frame * Merge main into the rect morph stack * Merge main and the rect morph stack's live head * refactor(DropdownMenu): grow on Popover's own surface motion * Merge main, without the rect morph stack * fix(Popover): grow from the trigger's box without its press scale * Merge main for useCommittedRefInto * fix(DropdownMenu): commit presentSurfaceRef through useCommittedRefInto * refactor(DropdownMenu): read the click's press from the press model * docs(DropdownMenu): record the press report and the entrance without one * docs(DropdownMenu): word the press records in the present tense * Merge main for the press model's committed refs * fix(DropdownMenu): mark a finger's open only where the menu opens * Merge main * fix(DropdownMenu): tie a finger's open to its gesture * fix(core): keep the keyboard store apart from copies of another shape The hide's touch count changes the keyboard store's shape, so its shared key moves to version 2. A copy of Core built against the earlier shape keeps its own store, as spec:AST-110 FR3 requires. A case puts an earlier copy's listening store under version 1: the package keeps its own store and reads its own height, and the other store keeps its height and shape. On version 1 the package reads the other copy's 300 px. touchQueries.ts's comment also names the scroll back from the blur among isIosWebKit's readers. * fix(DropdownMenu): an open from code plays the layer's entrance A Reduce Motion comment drops a claim a reduced-motion theme breaks. * Merge main * refactor(core): state the keyboard store's constraint in its comment The version comment now says what the store holds and why a copy of Core with another store shape keeps its own, instead of how the version came to change. * Merge main for the menu press's touch identifier * fix(DropdownMenu): under Reduce Motion a menu fades out where it stands * Merge main * Merge main for the menu's show and hide refs at commit * Merge main * fix(DropdownMenu): say Reduce Motion fades only on a coarse pointer * Merge main for the layer's show from another trigger * Merge main * Merge main * Merge main for the alert dialog's touch motion and the swipe actions * Merge main for the popover's focus-return target * fix(Layer): an exit copy keeps the padding and colors of what it copies * Merge the exit copy fix, with main * test(DropdownMenu): a finger's close copy draws the menu's rows in place * test(Layer): the browser's popover style reaches the exit copy * docs(DropdownMenu): the press model's record says why no engine fits * Merge the exit copy fix's test update * Merge main into the exit copy fix * Merge main for the kept-inside hold's release * fix(menu press): cancel a pick's touchend on the node the touch began on A finger's pick that closes the menu can take its row out of the document before the touch's touchend arrives: a pick in a submenu does. The browser still sends that touchend to the row, but the window, where the click guard listened, never receives it. So the touchend went uncancelled, and the browser's click for it reached the control under the finger once a busy main thread had outlasted the 400 ms click guard. The menu press model now keeps the node the touch began on, from the touchstart that names the touch, and the click guard also listens for the touchend there. One listener cancels it, and both stop together. The menu still closes at the pick. * Merge main into the exit copy fix * Merge main * Merge main * Merge main * Merge main * Merge main * fix(DropdownMenu): a finger's open that waits still grows * fix(menu press): swallow a Home Screen app's late click after a pick * test(menu press): a later tap still acts; cite the records exercised * Merge main * Merge main * Merge main * docs(keyboard): record Back in Firefox for Android as a gap Main shows it too. * docs(keyboard): say that Gap 21 shows more often on main * Merge #9777 * Merge #8080 * Merge #11859 * docs(keyboard): narrow the changeset for Back in Firefox for Android Gap 21 names FR9 and no longer names main. * test(DropdownMenu): pin a waiting finger open that another press leaves * Merge main * Merge #9777 * Merge #8080 * Merge #11859 * Merge main * Merge #9777 * Merge #8080 * Merge #11859 * Merge main * Merge #8080 * Merge #11859 * Merge main * Merge #8080 * Merge #11859 * Merge main * Merge #8080 * Merge #11859 * Merge main * Merge #8080 * Merge #11859 * Merge #11859 * Merge main * Merge #8080 * fix(DropdownMenu): a pick's late click stays guarded after touchend WebKit in a Home Screen web app can still send the mousedown, mouseup and click after a menu pick's cancelled touchend, also when the touch's touchstart was cancelable. The menu press model's click guard now stays armed after that touchend, until the next pointerdown or the 400 ms window. It takes only the browser's own late events there (isTrusted, through utils/eventTrust.ts): a page's dispatchEvent or click() still acts. A click whose detail is 0 still acts. Other arms keep the early disarm. * fix(DropdownMenu): one top-layer shield for a finger's open A finger's open raised two viewport shields: the hold until the grow's first frame keyed on the menu's surface, and the entrance hold on its popover. Each showed its shield in the top layer, which forces a style update in the open's task. The touch presentation's holds now key on the top-layer popover around the surface (holdLayerOf), so they share one shield. The gap until the first frame stays held over the viewport. * Merge #8080 * Merge #11859 * refactor(clickGuard): keep the trust read in clickGuard.ts The trust read belongs to the guard, so it stays in the guard's module. The read and its test-only setter now live in utils/clickGuard.ts, beside __resetClickGuardForTest, and utils/eventTrust.ts is gone. No behavior changes; the tests change only their import. * fix(clickGuard): register the trust read like the guard's state The trust read is module state that the test-only setter changes, so it sits under a registered key (sharedKey and realmValue), as the guard's own state does. A second copy of Core then reads trust the same way. * Merge main * chore: re-trigger the preview deployment (empty commit; tree unchanged) Co-authored-by: Cindy Zhang <[email protected]>
Base: main. Stack: #9777 → #8080 → #11859.
User impact
Seen in a production app on the canary: tapping an option in a phone submenu activated the control beneath it. A finger's pick that closes the menu could let the browser's click reach what was under the finger. It takes a pick whose row leaves the page before the touch's
touchend, as in a submenu, and a main thread busy past 400 ms.Problem and solution fit
At a finger's release on a row, the menu press model arms the click guard to cancel that touch's
touchend. Then it dispatches the row's click. The guard listened on the window. A pick that closes the menu can take the row out of the document first. The browser still sends thetouchendto the row, but the window no longer receives it.Nothing cancelled it, so the browser made its click at the finger's point. The guard swallows that click only within 400 ms, and a busy main thread outlasts that. The window listener came with #8275.
The press model now also keeps the node the touch began on, from the
touchstartthat names the touch. The guard listens for thetouchendthere too. Whichever listener hears it first cancels it, and both stop.Expected behavior and authority
spec:AST-094FR26: one gesture acts at most once, and the browser's click for that gesture acts on nothing.spec:AST-094FR21: when the press model takes a touch, itstouchendMUST be cancelled, and no click or compatibility mouse event reaches the page. The press model ismodule:DropdownMenu/useMenuPress.Smallest restoration
The click guard's options gain
touchTarget, with onetouchendlistener on it. The menu still closes at the pick.Evidence
touchendis not cancelled. That holds in jsdom, Chromium and WebKit.touchendis cancelled, for an item and a radio item, also after a 600 ms long task. Nothing reaches the control beneath.Scope
Components: the menu press model (
useMenuPress), the click guard, and a DropdownMenu storyTesting
At d93fa3d, which merges #8080's head 4651f21 into 330eb1c. That merge changes none of this pull request's 8 files. It changes
Popover/usePopoverSurfaceMotion.ts, whichDropdownMenu.tsximports, andPopover/popoverSurfaceMotion.ts, which that hook imports. 330eb1c merges #8080's stacked head 5c385e8 into b892503. That merge brings main 4493a3c. It changes none of this pull request's 8 files. It changesDropdownMenu.tsxandutils/focusReturn.ts, which the tests and story here import. So step 5's Simulator runs at b892503 do not carry to d93fa3d. Step 8 runs a submenu pick with a 600 ms task, as step 5 does, on a real iPhone at d93fa3d. On iOS, a repository owner checked the menus at d93fa3d on an iPhone. A real iPhone 14 with iOS 26.2 and Safari ran 9 takes at d93fa3d, and all pass (test). An outside tap, a pick and a re-press each close the menu, 3 of 3. The trigger's box does not move, and no focus ring shows under the finger. Step 6 runs the Android emulator at d93fa3d itself. Before that, b892503 merged #8080's 093df78 into c112acf, bringing main c1c5cdf. Git merged this pull request's story file with no conflict, and its own lines are unchanged. That merge also changed the sharedLayer/useLayer.tsx. Before that, c112acf merged #8080's 53e66d6, bringing main 230045a. That merge changed DropdownMenu's files, which the tests and story here import, and the sharedgestures/GestureHost.ts. So the device runs at f5ce8f7 do not carry to b892503 (spec:AST-094DEC-31), and steps 4 and 5 ran again there. Before that, 5752d21 merged #8080's 02b9ae6 into ee30a11, bringing main cda6ca7. ee30a11 merged #8080's 6ff65df into 975f954, bringing main 9e83b70. 975f954 merged #8080's 42d1bf8 into f5ce8f7, bringing main be7f821's 39 files. None of those three merges changed a file here or a file they import. So the runs at f5ce8f7 carried to 5752d21. Earlier merges brought #8080's 76439a4 and 01f57af onto 67e2492. In the stack below, #8080 and #9777 changeuseMenuPress.tsand its test, edited here. Git merges both with no conflict. They also changeDropdownMenu.tsx,TextInput.tsxandutils/inputStream.ts, which this pull request's code, story or tests import. #9777's head merges main ffd1c8e and then be7f821. Main changesButton/Button.tsx(#12169), which the story imports. 67e2492 merges main 120629d into ec5dba0. Since a79b454, main changes only this pull request's story file, outside its own lines. Every browser run serves a Storybook built at the commit under test, with the new story; itsastryx-build-sha.txtnames that commit.clickGuard.tsanduseMenuPress.ts.clickGuard.test.tsfails 1 of 19, "armed with the touch's target, cancels that touch's touchend after the target leaves the document".useMenuPress.test.tsxfails 1 of 80, "cancels the touchend of a tap whose row leaves the document before it".DropdownMenuPickTouchEnd.test.tsxfails 2 of 2, an item and a radio item in a drill-in submenu.__tests__/DropdownMenuPickTapThrough.interaction.browser.spec.tsfails its three cases in both engines. Each reads "touchend not cancelled" on the detached row.pointerup. The third is a radio item pick with that long task. The newSubmenuRadioGroupstory holds the radio items.useMenuPress.test.tsxgains feat(DropdownMenu): a finger's open grows the menu out of its trigger #8080's cases. The browser spec passes in Chromium and WebKit, 3 of 3 each.DropdownMenuSecondDocument.a11y.chromium.spec.tspasses in Chromium (9). At ec5dba0, DropdownMenu's, ContextMenu's, Selector's and the hooks' accessibility specs pass in Chromium (293). DropdownMenu's and the hooks' interaction specs pass in Chromium (53 pass, 2 skip) and in WebKit's container at one worker (49 pass, 6 skip).version.json. On theSubmenustory, a finger picks Actions, Move to, Folder C. The page then runs a 600 ms task.touchendin 4 of 4 picks each. The menu closes each time.touchenduncancelled in 4 of 4 each. In neither build did a click reach the control beneath: Chromium made no click from it here.SubmenuRadioGroupstory, a finger picks View, Sort by, Oldest, and a 600 ms task follows.touchendin 7 of 7, and main in 0 of 7.touchendreached the row, and the cause is not known.The grow and keyboard handling that this head carries from below have their device results in #8080 and #9777.
Android emulator (test), Android 17 with Chrome 145, at d93fa3d against main 4493a3c. Each take read the build's
version.json.touchend.Real iPhone 14 (test), iOS 26.2 with Mobile Safari 26.2, at d93fa3d, on the
Submenustory. Each take relaunched Safari, read the build'sversion.jsonand was checked against a screenshot.touchendnever reaches the document, because its target left the page with the menu. No click reaches anything beneath.touchendis cancelled, so no native click follows.Real iPhone 14 (test), iOS 26.2 with Mobile Safari 26.2, at d93fa3d against main ee65f4f, on the
Submenustory. The builds alternate, 3 takes each. Each take relaunched Safari, read the build'sversion.jsonand was checked against a screenshot.pointerup. A full-screen button lies beneath the menu.touchendarrives as the task ends, and it is cancelled. The menu closes.touchendis not cancelled. A trusted click reaches the button beneath 3 ms after it, 3 of 3.Steps 6 to 8 do not carry to ff541aa. Through #8080's head b01d48c, it merges main facdcb9. That brings #11156's changes to
Layer/gestureCounter.tsandutils/focusReturn.ts, whichuseMenuPress.tsimports, and to the sharedLayer/useLayer.tsx(spec:AST-094DEC-31). They ran again at ff541aa, side by side with d93fa3d in one session. The device record is https://github.com/vjeux/astryx/blob/318b3083346af8d5ec299487532e0afbc2aadb4c/index.md.spec:AST-094DEC-27 as amended: the pinned test kit, raw logs and the evidence verifier's pass. A second Pixel 8 checked the busy pick at normal speed.touchendis cancelled.version.jsonand was checked against a screenshot.touchendis cancelled, and the pick runs at the finger's lift.touchendarrives as the task ends, and it is cancelled.Steps 9 to 11 do not carry to 128a529. Through #8080's head a5cfd2a, it merges main 3b1719a.
That brings #13436's and #13526's changes to
Layer/inputHold.tsand #12888's toutils/scrollView.ts, whichuseMenuPress.tsimports. It also brings #9763's change to the sharedmotion/animator.ts(spec:AST-094DEC-31).They ran again at 128a529, side by side with ff541aa. The device record is https://github.com/vjeux/astryx/blob/47dfbc45ae782be1607bae3ea3c21b428bdfaa74/index.md. The repository owners found no major difference.
touchendis cancelled.version.json.touchendis cancelled, the pick runs at the finger's lift, and the menu closes.touchendarrives as the task ends, and it is cancelled.The automated review's comment-style note on
clickGuard.tsline 198 goes to a follow-up pull request. A change to that file here would end the carry of this head's device evidence (spec:AST-094DEC-31).Local gates at b892503: the ui project (26,794, at 16 workers), the core type check,
pnpm check:knowledgeandpnpm check:repopass. ESLint and Prettier pass on the changed files, with main's lint config. At 67e2492, strict ESLint, Prettier andpnpm review:prepass. This pull request changes no file underpackages/cli.Review only this pull request's change: vjeux/astryx@4651f21...d93fa3d
At the live head (test), 128a529 merges #8080's head a5cfd2a over main 3b1719a. The strict
pnpm preflight --browserpasses there, and it reports "ready to flip". It ran withASTRYX_STRICT_LINT=1. Its Chromium interaction step passes 1,938 tests and skips 54. That step's selection reads: "Chromium selection: the full suite (the change touches shared infrastructure or is undecided)."Public and internal API delta
None public. No export, prop, type, default or attribute changes. The click guard's internal
ClickGuardOptionsgainstouchTarget. The press model's privatetouchOfPointerreturns the touch, not only its identifier. Storybook gains theSubmenuRadioGroupstory.pnpm size:pages, at 67e2492 against main 120629d.architecture:component-import-boundariesINV10's pages gain 53 B (docs), 49 B (form), 107 B (menu) and 96 B (table) gzip. Each of these pages loads the click guard. At f5ce8f7, against main ffd1c8e, the whole stack gives +251 B (docs), +26,006 B (form), +19,280 B (menu) and +647 B (table) gzip (test). Most of it is feat(TextInput, TextArea, NumberInput): fields stay above the keyboard #9777's keyboard handling and feat(DropdownMenu): a finger's open grows the menu out of its trigger #8080's grow.Stack: #9777 → #8080 → #11859