Skip to content

feat(DropdownMenu): a finger's open grows the menu out of its trigger - #8080

Merged
cixzhang merged 147 commits into
meta:mainfrom
vjeux:uikit/c19-menu-motion
Nov 22, 2026
Merged

cixzhang merged 147 commits into
meta:mainfrom
vjeux:uikit/c19-menu-motion

Conversation

@vjeux

@vjeux vjeux commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Base: main. Stack: #9777 → #8080 → #11859.

User need

Under a finger a DropdownMenu played the layer's own entrance: a fade, a --spacing-2 slide and a scale up from 0.95. A Popover, like an iOS menu, grows out of its control.

Problem and solution fit

A finger's or a pen's open now grows the menu out of its trigger, and its close shrinks it back (spec:AST-094 FR31). It plays Popover's own surface motion, on its path and timing tokens, from the trigger's unscaled box.

A tap's open, at the lift in a scroll view too, counts as a finger's.

The grow ships with DropdownMenu, so even the first open grows. Under a coarse primary pointer, taps stay held from the open until the menu shows.

Current specification

spec:AST-094 FR31 adds that tap-opened layers grow on Popover's surface motion, and that an open without an accepted press keeps the layer's entrance; and FR45. component:DropdownMenu FR21: its grow gap closes, Reduce Motion fades (design:reduced-motion DR2), and its pan-dismissal gap stays. component:Popover names the options DropdownMenu passes. architecture:layer-runtime INV22: the grow measures its source unscaled, for Popover too. module:DropdownMenu/useMenuPress names useMenuPressInternal; PR4 says why no engine fits.

Public delta and caller burden

  • No new prop, type or default. A mouse, the keyboard and presentation="popover" keep the layer's entrance.
  • App-level size: +496 B gzip, eager, on a 12-component page with DropdownMenu, MoreMenu, Popover, Dialog, BottomSheet and Selector.

Design and alternatives

  • The shared rect morph as the one path: more bytes per Popover page.
  • Loading the grow at the first touch: a loader, a wait, a fallback.
  • Popover's own surface motion, loaded with the page (chosen): one path, the fewest bytes.

Evidence

  • Under Reduce Motion on a phone or tablet, it fades in at its size and out in place, as Popover does.
  • In both engines it plays Popover's frames: scale within 0.01, progress within 0.02.
  • On a phone the menu opens below its trigger.
  • On a touchscreen laptop the grow holds no taps (spec:AST-094 Current-state impact; component:DropdownMenu FR22).

Writing rubric results

R1 narration, R2 research, R4 rejected alternatives, R5 change references, R6 open questions: none. R3 evidence: FR21's verification row names the grow tests. R7 project status: FR21 keeps its pan-dismissal gap.

Scope

Components: DropdownMenu, MoreMenu, Popover (surface motion options, coarse-only hold, unscaled source box), useMenuPress (internal click report).

  • One capability is added.
  • Unrelated fixes, cleanup, and policy changes were removed or split.
  • Consumer docs, focused tests, and migration evidence ship with the feature.
  • Public text and artifacts contain no internal Meta context.

Testing

At 4651f21: 2db3ef8 with nine merges, a test fix and a shield fix. 315db84 merges main 120629d (#11938), which changes DropdownMenu.tsx, Layer/useLayer.tsx and Layer/gestureCounter.ts. 01f57af merges #9777's head 584d8a3, below it in the stack. That merge changes two direct imports: utils/inputStream.ts, from useMenuPress.ts, and utils/touchQueries.ts, from DropdownMenuTouchGrow.test.tsx. It also changes the sandbox route list, edited here, which Git merges with no conflict. 9318341 fixes a test, below. 76439a4 merges #9777's head c3e3df7, which merges main ffd1c8e. That merge changes Button/Button.tsx and Tooltip/Tooltip.tsx (#12169), which DropdownMenu.tsx, the sandbox page and DropdownMenu.test.tsx import. It changes no file edited here. Then 42d1bf8 merges #9777's head f1b8bf3, which merges main be7f821. That merge changes only main's Selector, CLI, docs and CI files, which nothing here imports. Then 6ff65df merges main 9e83b70, which has #9777's squash and #12619. That merge changes no file edited here. Of the files that this change imports, it changes DropdownMenu/lazyMenuBottomSheet.ts (#12619), and only the comments of utils/focusOutline.stylex.ts. Then 02b9ae6 merges main cda6ca7, which brings #12644. That merge changes no file edited here. Of the files that this change imports, it changes only hooks/useTypeahead.ts, from DropdownMenu.tsx. Then 53e66d6 merges main 230045a. Git merges six files edited here with no conflict: DropdownMenu.tsx, DropdownMenu.test.tsx and four records. This change's own lines in them are unchanged. Then 093df78 merges main c1c5cdf. Git merges three files edited here with no conflict: DropdownMenu.test.tsx and two records. This change's own lines in them are unchanged. Then 5c385e8 merges main 4493a3c. Git merges four files edited here with no conflict: DropdownMenu.tsx, DropdownMenu.test.tsx and two records. This change's own lines in them are unchanged. Then 4651f21 makes a finger's open show one input shield, not two (below).

At 093df78 (test): the ui project (26,789, at 16 workers), the core type check, pnpm check:knowledge and pnpm check:repo pass. ESLint and Prettier pass on the changed files, with main's lint config. At 53e66d6, DropdownMenu's, the hooks', Layer's and Popover's interaction specs pass in Chromium (192 pass, 11 skip). They pass in WebKit's CI container too (149 pass, 54 skip). DropdownMenu's, ContextMenu's, Selector's, the hooks' and Layer's accessibility specs pass in Chromium (394).

Before those merges, at 2db3ef8, on main a79b454. Its 6f51984 moves the menus onto Popover's own surface motion. Then main is merged in without the rect morph stack. Then d15f2d7 measures the trigger without its press scale. Then main is merged again, and dfbaecc commits presentSurfaceRef through useCommittedRefInto. Then 1a4c38a reads the click's press from the press model, and 681ed71 and a2c2f3c record it. Then 6c8aeaa merges main a65ea05. Then 0cd83b8 marks a finger's open only where the menu opens, and dd68a2a ties that mark to its gesture. Then b9c1bdb clears it for an open from code. Then 26af8e6 merges main a4595ef, and 827967d lets Reduce Motion play Popover's fade. Then e15b9fd merges main 3449161 (#10905), which already imports useCommittedRefInto. Git merges it with no conflict but keeps both imports, so the merge commit drops this pull request's copy. Then c765ff2 says Reduce Motion fades only on a coarse pointer, and 6a89434 merges main 36f68b0. Then 9fa057e merges main 4800d99. That merge changes five direct imports of the code here: #7677's Popover/usePopover.tsx, Layer/inputHold.ts (#11447, #8373), #8373's motion/themeTiming.ts, #10949's Popover/popoverSurfaceFrame.ts and #11578's DropdownMenu/menuItemRoles.ts. Two tests' direct imports change too: DropdownMenuSubMenu.tsx (#7677), from DropdownMenu.test.tsx, and Layer/__tests__/layerEntranceSide.fixture.ts (#10949), from popoverSurfaceMotion.test.ts. The sandbox page imports @astryxdesign/core/Button, which #11062 and #7677 change. Main also changes seven files edited here, among them #8373's popoverSurfaceMotion.ts and #8690's sandbox lists; Git merges all seven with no conflict. Then efe9125 merges main 8d3e010. That merge changes one direct import, #11682's Popover/usePopover.tsx, and no file edited here. Then 3529093 merges #11796, with main 270f680. It changes layer-runtime.md, which this pull request edits, and Git merges it with no conflict. It changes no direct import. Then c0dc00f adds the menu's case for #11796's fix. Then f9885ce adds the press model's record line, PR4. Then 1acd00c merges #11796's test update, f25d71c. Then 37cf451 merges main 16fe6a8, through 2937d9a. That merge changes Layer/inputHold.ts (#11684), which useMenuPress.ts, both Popover surface-motion files and four of the tests here import directly. It changes no file edited here. Then f894ca8 merges main da710f6, through 7373633. That merge changes two direct imports: #11599's Layer/gestureCounter.ts and #11616's DropdownMenu/lazyMenuBottomSheet.ts. Main also changes two files edited here, the AST-094 spec and the sandbox route list. Git merges both with no conflict. Then 946e2b5 merges main 8c8dd05, #11796's squash. Its #11796 lines are already here, and it changes no direct import. Then 804b708 merges main a79b454, which holds #11905's squash 5a24fc0. That merge changes three direct imports of DropdownMenu.tsx: Layer/useLayer.tsx (#11864, #11892, #11905), #11905's Popover/usePopover.tsx and utils/accessibleName.ts (1d2d629). Main also changes four files edited here: DropdownMenu.tsx, DropdownMenu.test.tsx, layer-runtime.md and the sandbox route list. Only DropdownMenu.tsx conflicts, in openAndFocus. The merge keeps #11905's 'open' | 'pending' | 'refused' result and this pull request's touch marks. Last, 2db3ef8 keeps a finger's open growing when the layer makes that open wait. On the sandbox page "Menu grow cases" (/sandbox/pages/menu-grow-cases/), on a phone:

  1. Load the page and tap "Projects". The menu grows out of the button, and a tap outside shrinks it back.
  2. Press and hold "Filters". It grows as the tap's menu did.
  3. Tap "Popover". It grows the same way.
  4. Scroll to the end and tap "Bottom left". The menu flips above and grows upward.

Android emulator (test), Android 16 with Chrome 133, at 76439a4, side by side with the earlier head 781b36e, whose runs passed. The merge to 42d1bf8 changed nothing here, so these runs carried to it.

  • Ten cells ran at normal speed, with the CPU slowed 4×, and with animations removed under Reduce Motion. All ten were kept at each speed.
  • At 4×, two cells were kept on a retake. One first missed its time bound, and one first failed to register the earlier head's hold.
  • Opens, closes, the first frame at full size and the held-tap outcomes match 781b36e.
  • Under Reduce Motion, 76439a4's menu cells show 0 grow frames, where 781b36e shows 2. Zero is correct: Reduce Motion plays opacity only, at the final size (design:reduced-motion DR2). 781b36e's 2 scale frames were a defect. At the other speeds, frame counts vary in both directions.
  • The first visible frame came later at 76439a4 at 4× in all ten cells, by 11 to 71 ms. At normal speed it was within 9 ms either way, except the Popover's timing cell, 44 ms later. Under Reduce Motion it was within 5 ms.
  • For the Popover, a rerun against main ffd1c8e gave medians of 16 against 16 ms at normal speed, and 70 against 73 ms at 4×.
  • Main itself opens the Popover later than 781b36e at 4× (68 against 61 ms), and about the same at normal speed (15 against 13 ms).
  • For the menu at 4×, reruns against main ffd1c8e gave Actions medians of 73 and 74 against 79 and 74 ms. More gave 66 against 66 ms. Main's menu opens with the layer's own entrance, since main has no grow.
  • Main itself opens the menu later than 781b36e at 4×. Its Actions medians are 80 and 96 against 57 and 64 ms, and More 61 against 57 ms.
  • So this change adds no delay against main.

iPhone 14 (test), iOS 26.2 Safari with Reduce Motion off, at 42d1bf8 side by side with 781b36e. The Reduce Motion setting was read from Settings before the first take. Each take read the build's version.json first. The builds alternated, with 2 takes per case. The phone's screen stream ran at 39 to 41 frames a second, and at 35 to 36 on the Projects page.

  • On both builds, the menu grows out of its button and shrinks back into it on close. Neither build jumps or flashes.
  • In More options, Controlled Menu and Actions, the first menu frame comes 1 to 2 frames after the press at 42d1bf8. That is about 25 to 50 ms.
  • At 781b36e it is the same, except for its first opens of More options and Actions: 7 and 9 frames, about 175 and 230 ms.
  • The grow takes 3 to 5 frames, about 75 to 130 ms, on both builds. The shrink takes 2 to 4 frames, about 50 to 100 ms.
  • The Projects menu, with 40 rows, grows downward out of its button on both, in about 5 frames. Its counts are by eye: the frame metric cannot separate that list from the page.
  • Both Projects takes on each build were run again, because the script's tap outside had landed on another trigger.

Neither set carries to 6ff65df. Its main merge changes DropdownMenu/lazyMenuBottomSheet.ts, which DropdownMenu.tsx imports (spec:AST-094 DEC-31). Both sets ran again at 6ff65df.

Android emulator (test), Android 17 with Chrome 145, at 6ff65df side by side with 42d1bf8. Both are static builds of those commits, and each cell read both builds' version.json before its takes. The emulator could not reach the web font host, so both builds drew fallback fonts.

  • Ten cells ran at normal speed, with the CPU slowed 4×, and with animations removed under Reduce Motion. All ten were kept at each speed.
  • At each speed, a first attempt stopped before any take, because the harness could not read version.json. It ran again.
  • Opens, closes, the first frame at full size and the held-tap outcomes match 42d1bf8 in every cell, at every speed.
  • Under Reduce Motion, both builds' menu cells show 0 grow frames, with the first frame at full size.
  • At normal speed and under Reduce Motion, each take's first visible frame is within 10 ms of its 42d1bf8 pair.
  • At 4×, three cells alternate five pairs each. Their first-visible medians are 93 against 93 ms, 108 against 97 and 82 against 82.
  • At 4×, the seven two-take cells first read later at 6ff65df in 13 of 14 pairs. They ran again as direct take records, with five strictly alternating pairs each (reps=5, order=pairs).
  • In that rerun, the paired medians, head minus base, run from −35 to +6 ms. Five of the seven are at or below 0.
  • In each rerun cell, every pair runs the head first, so the cell's first take is on the head side. Three of those takes sampled 2, 5 and 3 grow frames, against 10 to 13 in the cells' other takes.
  • At normal speed, one head take of Projects sampled 3 grow frames, against 12 in the other Projects takes.

iPhone 14 (test), iOS 26.2 Safari, at 6ff65df side by side with 42d1bf8. Reduce Motion was off, read from Settings before and after the takes. The phone read each build's version.json before the takes. Three rounds of Projects, Actions, More options and Controlled Menu alternated the builds: 24 takes, all kept.

  • Controlled Menu's page prints "Menu is open" as the menu opens, and the frame counts include that text. So the counts below leave that case out.
  • On both builds, the menu grows out of its trigger to its full size and place. That takes 4 to 6 frames, about 100 to 157 ms.
  • A tap outside shrinks the menu away in 2 to 3 frames, about 50 to 78 ms, on both builds.
  • The two builds' takes in the same round differ by one frame or less, in both directions.
  • The stream ran at 38.0 to 40.8 fps. A first pass of 8 takes ran at about 10 fps and was left out for that rate.

iPhone 14 (test), iOS 26.2 Safari, at 6ff65df side by side with the earlier head 781b36e, whose runs passed. Reduce Motion was off, read from Settings before the takes. The phone read each build's version.json before the takes. Three rounds of the same four cases alternated the builds: 24 takes, all kept.

  • As above, the counts below leave Controlled Menu out. In its round-3 base take, the text showed 3 frames before the menu did.
  • On both builds, the menu grows out of its trigger to its full size and place. That takes 3 to 6 frames, about 76 to 157 ms.
  • The two builds' grows in the same round differ by 2 frames or fewer, in both directions.
  • A tap outside shrinks the menu away in 2 to 3 frames, about 52 to 79 ms. In every round, both builds take the same number of frames.
  • The first menu frame's size varies take to take on both builds, from 8% to 57% of the full menu.
  • The stream ran at 37.5 to 40.6 fps.

On this result, the owners carry 781b36e's device pass to 6ff65df. The device record is on file with the owners.

None of the device runs above carries to 093df78. The merge to 02b9ae6 changes hooks/useTypeahead.ts, which DropdownMenu.tsx imports. The merge to 53e66d6 changes DropdownMenu.tsx itself and the shared gestures/GestureHost.ts. The merge to 093df78 changes the shared Layer/useLayer.tsx (spec:AST-094 DEC-31). So the iPhone ran again at 093df78, below. Then the merge to 5c385e8 changes DropdownMenu.tsx, Popover/usePopover.tsx, utils/focusReturn.ts and utils/nodeType.ts: main's one focus return. Then 4651f21 changes the input holds' shield, below. On iOS, a repository owner checked the menus at 4651f21 on an iPhone. A real iPhone 14 with iOS 26.2 and Safari ran 9 takes at 4651f21, 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. A real iPhone and the Android emulator also ran at 4651f21 against 781b36e, below.

iPhone 14 (test), iOS 26.2 Safari, at 093df78 side by side with 781b36e. The phone read each build's version.json, and Reduce Motion read as off. Each case ran 3 takes per build, with the builds interleaved: 24 takes, all kept.

  • The counts take only the menu's own surface, and Controlled Menu is left out, as above. They count distinct frames, not times.
  • On both builds, the menu grows out of its trigger to the same box. Opens take 6 to 9 frames at this head and 5 to 8 at 781b36e.
  • The median opens are 8 against 8 frames in More options, 7 against 6 in Actions and 8 against 7 in Projects.
  • The 5-frame opens are 781b36e's first takes of More options and Projects. Its other takes there open in 7 or 8 frames.
  • A tap outside shrinks the menu away in 3 to 4 frames on both builds. The median closes are 3 against 4, 4 against 4 and 4 against 3.
  • The stream ran at 33.8 to 40.9 fps.

9318341 changes only DropdownMenuTouchGrowPending.test.tsx, to fix a flaky case. Its header said another press cancels a waiting open, which was wrong: nothing in this pull request or in main does that. The case passed only when its last check ran before the layer's deferred show. Now it flushes that release's next task and pins the actual behavior: the open shows after the other press's release, and still grows. Under load from four parallel copies, it fails 0 of 24 runs (test). The old check fails 10 of 10 at 01f57af once that task runs.

A finger's open can wait: the layer holds it until its trigger is a valid anchor. 2db3ef8 marks such an open, so it still grows when it shows. The new DropdownMenuTouchGrowPending.test.tsx covers it in jsdom, with the layer's layout stubbed. Its case "grows a finger's open that waits, also when a key is pressed before it opens" fails at 804b708, without the fix. There that open plays the layer's own entrance. A new browser case taps a trigger in a closed dialog that the page displays, and the menu grows. It passes at 804b708 and at 2db3ef8, in Chromium and in WebKit's CI container. The layer decides there inside the press, so the case guards that path's real timing, not the fix.

Taps stay held from the open to the grow's first frame, where the grow's own hold takes over. The unit case "keeps taps off the page from a finger's open until the grow's first frame" checks it. So does DropdownMenuEntranceHold.interaction.browser.spec.ts, which passes at 2db3ef8 in both engines.

4651f21 keys those holds on the top-layer popover around the menu's surface, as the entrance hold already is. The three holds then share one shield. So a finger's open shows one shield in the top layer, not two, and the gap until the first frame stays held over the viewport.

  • The new unit case "raises one viewport shield for a finger's open" fails at 5c385e8 and passes at 4651f21. The case above passes at both.
  • Desktop Chromium (test), with touch emulation and 4× CPU throttling, counts the shields an open shows: two at 5c385e8 and one at 4651f21. That holds for Controlled Menu and for the sandbox page's Projects menu.
  • A trace of 3 opens per build times the style work the input hold forces in the open's task. The medians fall from 12.3 to 8.4 ms (Controlled Menu) and from 22.0 to 17.9 ms (Projects). The 5c385e8 runs use its hosted preview; the runs after the fix, a local build of 3ab8cf7 (4651f21 differs only in a comment).

Under Reduce Motion, Popover's surface motion plays its 200 ms cross-fade. An open's first frame shows the menu at opacity 0, at its full size and place. A tap outside fades the menu out where it stands, within 200 ms. The touch-grow spec's two Reduce Motion cases check both, and pass at 2db3ef8 in both engines. At 26af8e6, as on main, that close removed the menu in one frame.

The menu's close plays on the layer runtime's exit copy, which #11796 fixes. A new case, "a finger's close copy draws the menu's rows where the open menu drew them", checks it. With this case on efe9125, before #11796, the copy's first row sits 4 px right of the open menu's, in 2 of 2 runs. At 2db3ef8 it passes in Chromium and in WebKit's CI container.

Local gates, at 2db3ef8: the ui project (25,920), the core type check, strict ESLint, pnpm check:knowledge, pnpm check:repo and pnpm review:pre pass. The Node project passes 25,399 cases and fails 6, all under packages/cli. The same 6 fail on main a79b454 on this machine, and they pass when run alone (72 cases). This pull request changes no file under packages/cli. The DropdownMenu, hooks, motion, Layer, nav, Popover, BottomSheet, Carousel and SnapPaging interaction specs pass in Chromium: 462 pass, 17 skip. In WebKit's CI container at one worker: 374 pass, 105 skip. Motion's set includes animatedLayout, animatedLayoutAdopters, animatedLayoutBusy, animatedLayoutRevealPaint, themeTempo and themeTiming. Their accessibility specs, with ContextMenu's, Selector's and NavMenu's, pass in Chromium (414), and the browser ones in WebKit's container (22). Two press-model cases in DropdownMenu.test.tsx stub the presentation's input hold, which jsdom never ends. The browser touch-press specs cover the real hold in both engines.

scripts/lazy-sheet-bundle.test.mjs now pins DropdownMenu's import loading the animator at once, for the grow; rideKeyboard still waits for the sheet. At 92dd62a, the lazy base, that updated case fails.

DropdownMenuTouchFocusRing.a11y.chromium.spec.ts read its held finger's row while the menu grew. At six workers its lift missed the row twice in 20. It now reads the row once the grow rests: 60 of 60 at six workers, at 2db3ef8.

Red first, at dfbaecc: on main 923b53a, "the menu's grow follows Popover's path and timing, frame by frame" fails. There the menu plays the layer's own entrance, not the grow. A new popoverSurfaceMotion.test.ts case, "holds nothing under a fine primary pointer", fails on the old motion, which held every touch. Two new unit cases, for Popover and the menu, press-scale the trigger 0.98 about its centre. At ea3b6ce the grow read its source at 117.6 × 43.12 px; at dfbaecc, at 120 × 44. The frames stay the same, since the grow reads only the source's centre and the side it faces. A second finger's tap, a press the press model ignores, now keeps the layer's entrance; at dfbaecc it grew. Two new cases open a controlled menu from code after a finger's tap that did not open it. One tap closes the menu, and one presses an aria-disabled trigger. At 6c8aeaa both opens grew; now both play the layer's own entrance. One more case lets the light dismiss close the menu at the lift, before the tap's click. The layer refuses that click's reopen. At 0cd83b8 a later open from code grew; now it plays the entrance. A last case opens the menu from code right after that refused reopen, before any other press. At dd68a2a it grew; now it plays the entrance. Under Reduce Motion, a new browser case closes the menu with a tap outside and reads the exit copy's frames. At 26af8e6 nothing fades, in both engines. Now the copy fades out at the menu's place within 200 ms, and two unit cases pin it.

Earlier red first: a new case pins that a finger's first open on a page grows at once. At a831c2c, the lazy head, it fails: the grow waits for its code. At 61b57b9, with a tap's lift open counted as a mouse's, only the scrolling-content tap fails. Under Reduce Motion, the new unit and browser cases and two entrance-hold cases fail, and so does the theme case. Before the hold until the grow's first frame, both tap-hold cases fail.

Review only this pull request's change: vjeux/astryx@4493a3c...4651f21

Real iPhone 14 (test), iOS 26.2 with Mobile Safari 26.2, at 4651f21 against 781b36e. Each take relaunched Safari, read the build's version.json and was checked against a screenshot.

  • Both builds grow the menu over 5 to 8 captured frames and shrink it over 3 to 4. That holds in More options, Actions and Projects, 3 takes each.
  • The menu never pops in or closes at once. The counts are distinct frames of a 15% screen stream, not times.
  • More options opens in 7, 5 and 5 frames, against 8, 7 and 8. It closes in 4, 4 and 3, against 3, 4 and 4.
  • Actions opens in 7, 7 and 6 frames, against 6, 7 and 6. It closes in 3, 4 and 4, against 4, 3 and 4.
  • Projects opens in 8, 8 and 8 frames, against 6, 8 and 8. It closes in 3, 3 and 4, against 3, 3 and 3.

Android emulator (test), Android 17 with Chrome 145, at 4651f21 against 781b36e. Each take read the build's version.json.

  • At normal speed and under reduced motion, the six menu cells pass, 6 of 6 each.
  • At a 4× CPU slowdown, Projects and the held Projects pass, 2 of 2. Of the other four, three pass. More options missed its first-visible bound in that set: 137 against 62 ms, over a 50 ms allowance.
  • A rerun of More options' timing cell and the Actions timing cell, in five strictly alternating pairs, passes 2 of 2.
  • Against main 4493a3c, as information, 5 of 9 cells pass in each profile. The other four fail by construction: main closes at once, with no shrink.

At 4× CPU on an Android emulator, first-visible paired medians are +19 ms (More options) and +21 ms (actions timing) against the earlier implementation (test). Repository owners judged these differences not major. In desktop Chromium at 4× CPU, this change's open task runs 18.8 and 14.9 ms longer than main's (test). It forces no extra layout. A follow-up trims the press model and grow setup.

The device runs above do not carry to b01d48c. Its merge of main facdcb9 brings #11156's changes to Layer/useLayer.tsx, Popover/usePopover.tsx, Layer/gestureCounter.ts and utils/focusReturn.ts. DropdownMenu.tsx and its press model import them (spec:AST-094 DEC-31). The same cases ran again at b01d48c, side by side with 4651f21 in one session. The device record is https://github.com/vjeux/astryx/blob/318b3083346af8d5ec299487532e0afbc2aadb4c/index.md.

Real iPhone 14 (test), iOS 26.2 with Mobile Safari 26.2, at b01d48c against 4651f21. Each take relaunched Safari, read the build's version.json and was checked against a screenshot.

  • Both builds grow the menu over 6 to 8 captured frames and shrink it over 3 to 4. That holds in More options, Actions and Projects, 3 takes each.
  • More options opens in 7, 8 and 7 frames, against 6, 7 and 6. It closes in 3, 4 and 4, against 4, 4 and 4.
  • Actions opens in 6, 7 and 7 frames, against 6, 6 and 6. It closes in 4, 4 and 4, against 4, 4 and 3.
  • Projects opens in 8, 8 and 6 frames, against 7, 6 and 8. It closes in 4, 3 and 3, against 3, 4 and 4.

Real Pixel 8 phones (test), Android build CP3A.260905.009 with Chrome 156 or 157, at b01d48c against 4651f21. They follow spec:AST-094 DEC-27 as amended: the pinned test kit, raw logs and the evidence verifier. A second Pixel 8 ran Actions and the held Projects under reduced motion. Both passed on both builds.

  • At normal speed and at a 4× CPU slowdown, the six menu cells pass on both builds, 6 of 6.
  • Under reduced motion, 6 of 6 pass at 4651f21 and 5 of 6 at b01d48c. The held Projects case fails there.
  • In that case, a press that starts in the open's input hold must not act. At b01d48c, 5 of 16 such presses acted, against 0 of 16.
  • Each of the 5 came 28 to 35 ms before a late hold end, 291 to 307 ms after the open. The base's holds ended by 287 ms.
  • With the hold forced past 290 ms, presses within 45 ms of its end act on both builds. That is 3 of 13 at 4651f21 and 1 of 12 at b01d48c.
  • That gap in the input hold is older than this pull request. Main's fix(Layer): hold a press that reaches the page just after an input hold ends #13526 closes it, as the runs at a5cfd2a below show.
  • The first-visible paired medians at the 4× slowdown, head minus base, are −9 ms (Actions timing) and +7 ms (More options), 5 pairs each.
  • On another Pixel 8 with Android 17 and Chrome 155, Escape, Tab and typeahead pass on both builds, 3 of 3 each.

The device runs above do not carry to a5cfd2a. Its merge of main 3b1719a brings #13436's and #13526's changes to Layer/inputHold.ts, and #9763's to motion/animator.ts.
Popover's surface motion imports both, and the menu's press model imports Layer/inputHold.ts (spec:AST-094 DEC-31). The merge also brings #12888's change to utils/scrollView.ts, which reaches a menu only inside a bottom sheet.
The same cases ran again at a5cfd2a, side by side with b01d48c. The device record is https://github.com/vjeux/astryx/blob/47dfbc45ae782be1607bae3ea3c21b428bdfaa74/index.md. The repository owners found no major difference.

Real iPhone 14 (test), iOS 26.2 Safari, at a5cfd2a against b01d48c. Each take read the build's version.json.

  • The menu grows over 6 to 8 captured frames at b01d48c and 5 to 9 at a5cfd2a. It shrinks over 3 to 4 on both.
  • That holds in More options, Controlled Menu, Actions and Projects, 3 takes each.

Real Pixel 8 phones (test), Chrome 156 or 157, at a5cfd2a against b01d48c. Each take read the build's version.json.

  • The six menu cells open and close on both builds, 6 of 6. That holds at normal speed, at a 4× CPU slowdown and under reduced motion.
  • Per cell, the first-visible medians, head minus base, run from −20 to +20 ms. The paired medians are +1 ms (Actions timing) and −4 ms (More options), 5 pairs each.
  • In the held Projects case, a press stamped before the hold's end must not act. The record counts a press stamped more than 1 ms before the shield's removal as in the hold.
  • At a5cfd2a, 0 of 34 such presses acted at normal speed, and 0 of 38 under reduced motion. Five Pixel 8 phones ran it, one as a spot check.
  • Escape, Tab and typeahead passed 3 of 3 each at the previous head, 47b1104. The repository owners carry those rows to a5cfd2a.

The automated review's comment-style note on DropdownMenu.tsx line 1054 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-094 DEC-31).

At the live head (test), a5cfd2a merges main 3b1719a. The strict pnpm preflight --browser passes there, and it reports "ready to flip". It ran with ASTRYX_STRICT_LINT=1. Its Chromium interaction step passes 1,935 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

  • Size: +1,912/−85 lines (a79b454..2db3ef8), tests included. 4651f21 adds +54/−6.

  • App-level size: +496 B gzip, eager, on the 12-component page above; without the menus, +224 B. A Popover-only page gains 135 B, for the options below. A DropdownMenu and MoreMenu page gains 18,665 B: the grow loads with the page. A Lightbox page is unchanged. architecture:component-import-boundaries INV10's pages, at 4651f21 against main 4493a3c (test): docs and form unchanged, menu +18,814 B, table +88 B. The other pages are measured at 2db3ef8 against main a79b454. The method is .github/scripts/lib/component-size.js's: the size report's esbuild options, eager chunks only. The grow is default behavior under a finger, so INV10's optional-feature budget does not apply (DEC-5). A shared module's growth is reported here, as INV10 asks.

  • Size follow-up: at this head, the menu reference page's first-load gzip grows 18,814 B (test). It is to shrink by deferring what can defer.

  • On a page with DropdownMenu and MoreMenu and no Popover, the grow adds 18,665 B gzip. It buys the grow on a finger's first open, since the grow loads with the page (spec:AST-080 DEC-5). By minified bytes, about 77% of what it adds is the animator and the motion modules it uses. The layer runtime's exit copy is 12%, Popover's surface motion 8%, and the rest, the menu's own new code included, 2%. Every page that shows a Popover already loads all of these, so there the grow adds about 0.5 KB, as on the 12-component page. The part that could slim is the animator, which every animated component shares; this pull request does not change it.

  • Modules this pull request grows, none new. architecture:react-component-runtime INV19 asks a behavior module over 300 lines or 3 KB gzip to name its shared engine. Lines are source lines, against main a79b454.

    Module Lines Shared engine
    DropdownMenu/DropdownMenu.tsx 1,970 → 2,038 Its touch open hands the grow to Popover's surface motion, on the animator, and reads the press from useMenuPress.
    hooks/useMenuPress.ts 1,178 → 1,217 The menus' own press model, on the layer runtime's gesture counter and input hold; its record's PR4 says why no engine fits.
    Popover/popoverSurfaceMotion.ts 400 → 406 The animator, with the layer runtime's input hold and exit copy.
    Popover/usePopoverSurfaceMotion.ts 137 → 203 Under both limits: 1,231 B minified, so under 3 KB gzip, on the DropdownMenu and MoreMenu page, measured as .github/scripts/lib/component-size.js measures an import.
    Layer/settledBox.ts 301 → 302 Part of the layer runtime.
  • Public: none. No export, prop, type or default changes.

  • Internal, new in an existing Popover module, named in component:Popover:

    • usePopoverSurfaceMotion.ts: PopoverSurfaceMotionOptions, with holdUntilFirstFrame, and present's isTouch. Popover passes neither.
    • Usage: usePopoverSurfaceMotion({holdUntilFirstFrame: true}).
    • Existing modules considered: the menu plays Popover's own surface motion, so no module is added.
    • Why: one grow path for tap-opened layers, with the fewest bytes.
  • Internal, new in hooks/useMenuPress.ts: useMenuPressInternal returns useMenuPress's calls and triggerClickPointerType(), the pointer type of the press a trigger click comes from. DropdownMenu reads it; public useMenuPress is unchanged.

  • Internal, removed: createRectMorphSurfaceMotion, useMenuSurfaceMotion.ts, menuSurfaceMotion.ts, menuExit.stylex.ts and reducedMotionPreference.ts, which earlier heads added.

Stack: #9777 → #8080 → #11859

@vercel

vercel Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
astryx Ready Ready Preview Nov 22, 2026 9:48am UTC

Request Review

@astracat-bot

astracat-bot Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
❓ Needs maintainer input (for maintainers only) Nov 22, 2026, 3:17 PM UTC

@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Oct 24, 2026
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Oct 24, 2026

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This needs an engineering owner's decision before it can be approved: the touch motion follows the draft AST-094, whose FR4 narrows the current theme-tokens architecture (INV3) to pointer presentations, and the useMenuPress FR8, FR9, DEC-4 and new DEC-8 are still proposals. An engineering owner records that decision by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner. Whatever the ruling, these changes are still needed:

  • Rebase onto the landed predecessors, or split, so this pull request carries its own change rather than 26,186 changed lines.
  • Keep the pan-outside dismissal's pointer set across renders in DropdownMenu.tsx, because closeMenu changes identity on every render and the set starts empty again.
  • Bring useMenuPress.spec.md (the 500 ms row, FR9 and DEC-4) in line with the 150 ms hold and the 10 px handoff, and name the old longPressDelayMs default and the option that restores it in the changeset.

[Automated review]

Comment thread .changeset/menu-press-uimenu.md Resolved
@github-actions

github-actions Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · a5cfd2a

Storybook · Sandbox · built from this PR's head

Modified components

Component Size LoC Visual · A11y · RTL
MoreMenu 🔴 133.4 kB (+18.5 kB) · 19.8 kB CSS (0) — — · — · —
DropdownMenu 🔴 133.1 kB (+18.5 kB) · 19.8 kB CSS (0) — ✓ · ✓ · ✓
lab/MediaVolume 🔴 229.2 kB (+4.2 kB) · 1.5 kB CSS (0) — — · — · —
132 more components
Component Size LoC Visual · A11y · RTL
lab/MediaPlaybackRate 🔴 229.2 kB (+4.2 kB) · 1.5 kB CSS (0) — — · — · —
lab/MediaCaptionsButton 🔴 229.2 kB (+4.2 kB) · 1.5 kB CSS (0) — — · — · —
lab/MediaFullscreenButton 🔴 229.2 kB (+4.2 kB) · 1.5 kB CSS (0) — — · — · —
lab/MediaPlayButton 🔴 229.2 kB (+4.2 kB) · 1.5 kB CSS (0) — — · — · —
lab/MediaSeekButton 🔴 229.2 kB (+4.2 kB) · 1.5 kB CSS (0) — — · — · —
lab/MediaTimeSlider 🔴 229.2 kB (+4.2 kB) · 1.5 kB CSS (0) — — · — · —
lab/MediaTime 🔴 229.2 kB (+4.2 kB) · 1.5 kB CSS (0) — — · — · —
lab/VideoPlayer 🔴 236.6 kB (+4.0 kB) · 2.1 kB CSS (0) — — · — · —
lab/AudioPlayer 🔴 239.0 kB (+4.0 kB) · 1.8 kB CSS (0) — — · — · —
lab/Comments 390.5 kB (+401 B) · 2.5 kB CSS (0) — — · — · —
lab/CommentThread 383.5 kB (+401 B) · 2.4 kB CSS (0) — — · — · —
richtext/RichTextEditorToolbar 316.8 kB (+232 B) · 454 B CSS (0) — — · — · —
lab/CommentComposer 186.9 kB (+219 B) · 1.9 kB CSS (0) — — · — · —
lab/ChatReactionBar 130.3 kB (+156 B) · 1.1 kB CSS (0) — — · — · —
lab/ChatEmojiPicker 129.1 kB (+153 B) · 773 B CSS (0) — — · — · —
Popover · Storybook 105.6 kB (+139 B) · 15.5 kB CSS (0) 1,825 (+52) ✓ · ✓ · ✓
DropdownMenuSubMenu 80.8 kB (+138 B) · 11.0 kB CSS (0) — ✓ · ✓ · ✓
TopNavMenu 87.7 kB (+130 B) · 12.4 kB CSS (0) — — · — · —
TopNavHeading 88.3 kB (+114 B) · 12.4 kB CSS (0) — — · — · —
TableCell 107.8 kB (+111 B) · 20.2 kB CSS (0) — — · — · —
PowerSearch 319.8 kB (+109 B) · 27.3 kB CSS (0) — — · — · —
SideNavHeading 88.6 kB (+106 B) · 12.5 kB CSS (0) — — · — · —
Pagination 154.6 kB (+104 B) · 20.1 kB CSS (0) — — · — · —
TabMenu 84.8 kB (+104 B) · 12.3 kB CSS (0) — — · — · —
TableHeaderCell 107.7 kB (+103 B) · 20.0 kB CSS (0) — — · — · —
BreadcrumbItem 102.9 kB (+102 B) · 14.0 kB CSS (0) — — · — · —
ContextMenu 106.6 kB (+101 B) · 19.6 kB CSS (0) — — · — · —
Selector 121.4 kB (+98 B) · 19.7 kB CSS (0) — — · — · —
NavHeadingMenu 19.0 kB (+97 B) · 3.5 kB CSS (0) — — · — · —
Table 126.0 kB (+95 B) · 21.2 kB CSS (0) — — · — · —
charts/ChartTooltip 226.3 kB (+72 B) · 451 B CSS (0) — — · — · —
charts/Chart 249.8 kB (+70 B) · 516 B CSS (0) — — · — · —
Markdown 210.7 kB (+67 B) · 23.5 kB CSS (0) — — · — · —
charts/ChartLegend 42.2 kB (0) · 224 B CSS (0) — — · — · —
AlertDialog 134.4 kB (0) · 16.3 kB CSS (0) — — · — · —
AppShell 102.6 kB (0) · 14.9 kB CSS (0) — — · — · —
Avatar 47.0 kB (0) · 6.0 kB CSS (0) — — · — · —
AvatarGroup 49.8 kB (0) · 6.1 kB CSS (0) — — · — · —
AvatarGroupOverflow 53.0 kB (0) · 6.0 kB CSS (0) — — · — · —
Banner 70.0 kB (0) · 11.7 kB CSS (0) — — · — · —
BaseTypeahead 84.3 kB (0) · 12.1 kB CSS (0) — — · — · —
Button 67.9 kB (0) · 11.2 kB CSS (0) — — · — · —
Calendar 79.1 kB (0) · 11.8 kB CSS (0) — — · — · —
Carousel 78.1 kB (0) · 12.1 kB CSS (0) — — · — · —
ChatComposer 90.9 kB (0) · 13.5 kB CSS (0) — — · — · —
ChatComposerInput 88.0 kB (0) · 12.5 kB CSS (0) — — · — · —
ChatComposerTokenElement 88.0 kB (0) · 12.5 kB CSS (0) — — · — · —
ChatDictationButton 68.5 kB (0) · 11.2 kB CSS (0) — — · — · —
ChatLayout 91.6 kB (0) · 11.7 kB CSS (0) — — · — · —
ChatLayoutScrollButton 68.5 kB (0) · 11.4 kB CSS (0) — — · — · —
ChatMessageList 28.7 kB (0) · 7.4 kB CSS (0) — — · — · —
ChatSendButton 68.3 kB (0) · 11.2 kB CSS (0) — — · — · —
ChatToolCalls 33.1 kB (0) · 8.8 kB CSS (0) — — · — · —
CheckboxInput 71.7 kB (0) · 10.7 kB CSS (0) — — · — · —
CheckboxList 75.8 kB (0) · 8.2 kB CSS (0) — — · — · —
CheckboxListItem 82.7 kB (0) · 12.6 kB CSS (0) — — · — · —
CodeBlock 84.0 kB (0) · 12.9 kB CSS (0) — — · — · —
CommandPalette 83.9 kB (0) · 13.5 kB CSS (0) — — · — · —
CommandPaletteInput 34.3 kB (0) · 7.9 kB CSS (0) — — · — · —
ComplexSelector 84.1 kB (0) · 13.3 kB CSS (0) — — · — · —
ContextMenuItem 39.1 kB (0) · 7.3 kB CSS (0) — — · — · —
DateInput 209.4 kB (0) · 19.0 kB CSS (0) — — · — · —
DateRangeInput 106.6 kB (0) · 14.2 kB CSS (0) — — · — · —
DateTimeInput 233.3 kB (0) · 20.7 kB CSS (0) — — · — · —
DialogHeader 71.2 kB (0) · 12.9 kB CSS (0) — — · — · —
DrawerHeader 71.3 kB (0) · 14.3 kB CSS (0) — — · — · —
DropdownMenuCheckboxItem 29.5 kB (0) · 7.6 kB CSS (0) — ✓ · ✓ · ✓
DropdownMenuDivider 5.4 kB (0) · 548 B CSS (0) — ✓ · ✓ · —
DropdownMenuGroup 6.6 kB (0) · 3.4 kB CSS (0) — ✓ · ✓ · —
DropdownMenuItem 28.7 kB (0) · 7.1 kB CSS (0) — ✓ · ✓ · —
DropdownMenuRadioGroup 6.7 kB (0) · 3.4 kB CSS (0) — ✓ · ✓ · —
DropdownMenuRadioItem 29.6 kB (0) · 7.6 kB CSS (0) — ✓ · ✓ · —
Field 61.7 kB (0) · 7.7 kB CSS (0) — — · — · —
FieldLabel 57.3 kB (0) · 6.1 kB CSS (0) — — · — · —
FileInput 77.8 kB (0) · 12.9 kB CSS (0) — — · — · —
Heading 12.5 kB (0) · 5.8 kB CSS (0) — — · — · —
HoverCard 31.1 kB (0) · 4.8 kB CSS (0) — — · — · —
IconButton 67.9 kB (0) · 11.2 kB CSS (0) — — · — · —
InfoTip 52.0 kB (0) · 5.7 kB CSS (0) — — · — · —
InputGroup 63.8 kB (0) · 8.9 kB CSS (0) — — · — · —
LayerProvider 4.4 kB (0) · 20 B CSS (0) — ✓ · ✓ · —
Lightbox 151.6 kB (0) · 12.3 kB CSS (0) — — · — · —
Link 58.2 kB (0) · 7.4 kB CSS (0) — — · — · —
ListItem 81.8 kB (0) · 12.6 kB CSS (0) — — · — · —
MobileNav 80.3 kB (0) · 11.8 kB CSS (0) — — · — · —
MobileNavToggle 68.2 kB (0) · 11.2 kB CSS (0) — — · — · —
MultiSelector 109.6 kB (0) · 18.9 kB CSS (0) — — · — · —
NavHeadingMenuItem 17.1 kB (0) · 6.7 kB CSS (0) — — · — · —
NumberInput 106.6 kB (0) · 13.1 kB CSS (0) — — · — · —
ProgressBar 12.5 kB (0) · 6.7 kB CSS (0) — — · — · —
RadioList 63.2 kB (0) · 7.7 kB CSS (0) — — · — · —
RadioListItem 78.7 kB (0) · 11.2 kB CSS (0) — — · — · —
SegmentedControl 103.7 kB (0) · 7.2 kB CSS (0) — — · — · —
SideNav 125.7 kB (0) · 12.6 kB CSS (0) — — · — · —
SideNavCollapseButton 68.8 kB (0) · 11.2 kB CSS (0) — — · — · —
SideNavItem 82.8 kB (0) · 12.3 kB CSS (0) — — · — · —
Slider 117.2 kB (0) · 9.3 kB CSS (0) — — · — · —
Spinner 25.3 kB (0) · 6.6 kB CSS (0) — — · — · —
StatusDot 34.8 kB (0) · 5.7 kB CSS (0) — — · — · —
Stepper 69.6 kB (0) · 11.3 kB CSS (0) — — · — · —
Switch 111.8 kB (0) · 10.5 kB CSS (0) — — · — · —
TableSelectionToolbar 78.4 kB (0) · 14.6 kB CSS (0) — — · — · —
TabList 48.5 kB (0) · 6.8 kB CSS (0) — — · — · —
Text 11.6 kB (0) · 5.8 kB CSS (0) — — · — · —
TextArea 95.3 kB (0) · 10.0 kB CSS (0) — — · — · —
TextInput 101.7 kB (0) · 12.9 kB CSS (0) — — · — · —
Thumbnail 72.3 kB (0) · 12.7 kB CSS (0) — — · — · —
TimeInput 181.5 kB (0) · 17.9 kB CSS (0) — — · — · —
Timer 14.1 kB (0) · 6.4 kB CSS (0) — — · — · —
Timestamp 28.0 kB (0) · 11.4 kB CSS (0) — — · — · —
Toast 107.7 kB (0) · 11.5 kB CSS (0) — — · — · —
ToggleButton 95.2 kB (0) · 11.3 kB CSS (0) — — · — · —
Tokenizer 113.1 kB (0) · 21.9 kB CSS (0) — — · — · —
Toolbar 48.4 kB (0) · 8.6 kB CSS (0) — — · — · —
Tooltip 33.1 kB (0) · 4.8 kB CSS (0) — — · — · —
TopNav 82.1 kB (0) · 12.1 kB CSS (0) — — · — · —
TopNavMegaMenu 82.1 kB (0) · 13.1 kB CSS (0) — — · — · —
Typeahead 95.1 kB (0) · 14.4 kB CSS (0) — — · — · —
lab/CommentPin 61.8 kB (0) · 1.2 kB CSS (0) — — · — · —
lab/DialogHeroHeader 92.5 kB (0) · 372 B CSS (0) — — · — · —
lab/DiffViewer 95.9 kB (0) · 2.1 kB CSS (0) — — · — · —
lab/EmojiPicker 121.3 kB (0) · 751 B CSS (0) — — · — · —
lab/LineClamp 14.1 kB (0) · 168 B CSS (0) — — · — · —
lab/ListInput 97.5 kB (0) · 922 B CSS (0) — — · — · —
lab/Schedule 119.1 kB (0) · 3.9 kB CSS (0) — — · — · —
lab/SelectableCardGroup 72.1 kB (0) · 162 B CSS (0) — — · — · —
lab/TabBarMoreList 105.1 kB (0) · 1.8 kB CSS (0) — — · — · —
lab/TourStep 97.1 kB (0) · 691 B CSS (0) — — · — · —
lab/TransferList 139.9 kB (0) · 1.2 kB CSS (0) — — · — · —
lab/TransferListSelector 151.9 kB (0) · 1.4 kB CSS (0) — — · — · —
richtext/RichTextEditor 311.2 kB (0) · 2.7 kB CSS (0) — — · — · —
richtext/RichTextView 287.9 kB (0) · 2.4 kB CSS (0) — — · — · —

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

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


Generated by PR Enrichment workflow | View full report

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This needs an engineering owner's decision before it can be approved: the touch motion follows the draft AST-094, whose FR4 narrows the current theme-tokens architecture (INV3) to pointer presentations, and the useMenuPress FR8, FR9, DEC-4 and DEC-8 are still proposals. An engineering owner records that decision by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner. Whatever the ruling, these changes are still needed:

  • Rebase onto the landed predecessors, or split, so this pull request carries its own change rather than 28,469 changed lines.
  • Show the menu's closing copy in the top layer instead of beside the popover with position: fixed and z-index: 2147483647, which AST-027 DEC-3 rules out for menus.
  • Keep the pan-outside dismissal's pointer set across renders in DropdownMenu.tsx.
  • Bring useMenuPress.spec.md (the 500 ms row, FR9 and DEC-4) in line with the 150 ms hold and the 10 px handoff.
  • Name the old longPressDelayMs default and its restoring option in the changeset, and recommend only touch-action: pinch-zoom for a press-open trigger.

[Automated review]

@cixzhang

Copy link
Copy Markdown
Contributor

Posted by Cindy's agent on her behalf.

Parts of this PR re-implement behavior that already exists, or is being specified, as a shared part of core. Converging keeps one implementation per behavior:

This is about where the behavior lives, not about the PR's intent.

@vjeux

vjeux commented Oct 24, 2026

Copy link
Copy Markdown
Contributor Author

Agreed: one implementation.

  • Reduced motion: the local handling and reducedMotion: 'keep' are gone; the animator resolves it (design:reduced-motion).
  • Following a press to its release: the document listeners for an outside press are held only while that press is live (react-component-runtime INV5), until the shared press-to-release tracker replaces them.
  • Exit copy: chore(core): the layer runtime's exit copy, for a touch presentation's close #8186, stacked on this PR, moves the close copy onto Layer/layerExitCopy.ts.

@vjeux
vjeux force-pushed the uikit/c19-menu-motion branch from 9f00657 to e88dc4c Compare October 25, 2026 01:56
@github-actions github-actions Bot added the needs:design-review Affects visuals — Design should review label Oct 25, 2026
@cixzhang

Copy link
Copy Markdown
Contributor

/approve-spec 093df78

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This pull request is reviewed as part of its stack; see the review on #12216.

Automated review (maintainer link)

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.

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This pull request is reviewed as part of its stack; see the review on #12216.

Automated review (maintainer link)

@cixzhang

Copy link
Copy Markdown
Contributor

/approve-spec 4651f21

@cixzhang cixzhang left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Engineering-owner approval at this exact head (4651f21), posted by Cindy's agent on her instruction. CodeBunny approves at this head, CI (including heavy) is green, and Cindy checked the stack's previews herself.

@cixzhang

Copy link
Copy Markdown
Contributor

/approve-spec a03b535

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved pending CI: CI has not run on this revision yet, and it runs once the pull request leaves draft.

Under a finger or a pen, DropdownMenu and MoreMenu now grow out of their trigger and shrink back into it on Popover's own surface motion, as spec:AST-094 FR31 requires. An engineering owner approved the record text this pull request adds at this revision, the reference-page sizes are reported, and the code needs no change.

  • Non-blocking: the Stack line still does not hold, because #9777's description carries only the five-entry line and this description still names #12179 and #12216, which do not contain this revision; one identical Stack line in every listed description, naming only pull requests the top contains, lets them be reviewed as a stack again.
Claims and files checked

Review mode: same-head; reason: none

  • Release note: under a finger or a pen, DropdownMenu and MoreMenu grow out of the trigger on open and shrink back on close, on Popover's path and timing: verified (DropdownMenu.tsx:1206-1219 hands the touch decision to Popover's surface motion; MoreMenu.tsx:164 renders DropdownMenu; unit and browser grow cases).
  • Release note: a tap's open grows as a hold's does: verified (unit case for a tap that opens at its lift in a scroll view).
  • Release note: under Reduce Motion on a phone or tablet the menu fades in at its size and out where it stands: verified (two browser cases; the animator decides).
  • Release note: a mouse, the keyboard and presentation="popover" keep the layer's entrance: verified (DropdownMenu.tsx:2040 picks the pointer model for popover; unit and browser mouse cases).
  • Description: the released finger entrance was a fade, a short slide and a scale up from 0.95: verified (Layer/layerAnimations.stylex.ts).
  • Description: the grow starts from the trigger's box without its press scale, for Popover too: verified (usePopoverSurfaceMotion.ts:182 reads it through settledBox; a unit case per path).
  • Description: the grow ships with the menu, so the first open grows: verified (static import; unit case for the first open; lazy-sheet-bundle.test.mjs pins the eager animator).
  • Description: under a coarse primary pointer taps stay held from the open until the menu shows, and a touchscreen laptop holds none: verified (usePopoverSurfaceMotion.ts:91-93, popoverSurfaceMotion.ts:333; unit cases).
  • Description: a finger's open shows one input shield, not two: verified (every hold keys on the top-layer popover; unit case for one viewport shield).
  • Description: an open the layer holds until its trigger is a valid anchor still grows, also after a key press or another press: verified (unit cases in DropdownMenuTouchGrowPending.test.tsx).
  • Description: a second finger, a closed controlled menu, a refused reopen and a disabled trigger leave a later open from code with the entrance: verified (unit cases).
  • Description: the record edits it lists (two FR31 sentences; FR21's grow gap closing, its Reduce Motion fade and its remaining pan-dismissal gap; the Popover options; the layer runtime's unscaled source; the press model's internal report and PR4): verified in the diff.
  • Description: no export, prop, type or default changes: verified (the API generator lists no row).
  • Description: the internal options and press report are new, Popover passes neither option, and the earlier rect-morph and lazy-load modules are gone: verified (Popover.tsx:554, :607; those files are absent).
  • Description: reference-page sizes (docs and form unchanged, menu about +18.8 KB, table under 0.1 KB): verified at this revision (+0, +0, +18,804 B and +95 B gzip).
  • Description: the app-level and Popover-only page sizes and the menu page's byte breakdown: stated, not re-measured.
  • Description: module sizes for the shared-engine rule: stated against an earlier main; at this revision the files are 2,046, 1,217, 416, 206 and 302 lines, and the judgement is unchanged.
  • Description: lines added and removed over earlier ranges: stated; at this revision the pull request's own diff is +1,967/−85.
  • Description: Popover's frames within 0.01 scale and 0.02 progress, and on a phone the menu opens below its trigger: covered by browser cases with those bounds; not rerun here.
  • Description: real-iPhone and Android emulator side-by-sides at the previous revision against the revision the owner passed: stated in text and accepted; they carry here because this revision only merges main, which touches the pull request's own files only in two records and none of the shared motion and layer modules.
  • Description: red-first, local gate, browser, accessibility and preflight results at earlier revisions: stated, not rerun; the six unit files pass at this revision (388 tests).
  • Description: the writing-rubric results (FR21's verification row names the grow tests; its pan-dismissal gap stays): verified.
  • Description: both Stack lines: neither holds at this revision, so this pull request is reviewed on its own.
  • Files: .changeset/menu-touch-grow.md, apps/sandbox/scripts/next-export-routes.json, apps/sandbox/src/app/(raw)/pages/menu-grow-cases/page.tsx, apps/sandbox/src/app/sandboxPages.ts: clear.
  • Files: docs/architecture/layer-runtime.md, docs/specs/AST-094-touch-presentations/spec.md, docs/specs/components/DropdownMenu/DropdownMenu.spec.md, docs/specs/components/DropdownMenu/modules/useMenuPress.spec.md, docs/specs/components/Popover/Popover.spec.md: clear.
  • Files: packages/core/src/DropdownMenu/DropdownMenu.tsx, packages/core/src/Popover/usePopoverSurfaceMotion.ts, packages/core/src/Popover/popoverSurfaceMotion.ts, packages/core/src/hooks/useMenuPress.ts, packages/core/src/Layer/settledBox.ts: clear.
  • Files: DropdownMenu.test.tsx, DropdownMenuTouchGrow.test.tsx, DropdownMenuTouchGrowPending.test.tsx, DropdownMenuEntranceHold.interaction.browser.spec.ts, DropdownMenuTouchFocusRing.a11y.chromium.spec.ts, DropdownMenuTouchGrow.interaction.browser.spec.ts, MenuPress.a11y.chromium.spec.ts, popoverSurfaceMotion.test.ts, usePopoverSurfaceMotion.test.tsx, useMenuPress.test.tsx, scripts/lazy-sheet-bundle.test.mjs: clear.
  • Files: 25 of 25 files read, each consistent with the others.

Automated review (maintainer link)

The pr-interaction leg that ran it took 13.2 s for its 11 tests, timed
as recordLog times a file. Without a time, fewer than nine in ten of the
interaction specs on main plus this change have one.
@cixzhang

Copy link
Copy Markdown
Contributor

/approve-spec 81d6e84

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This pull request is reviewed as part of its stack; see the review on #11859.

Automated review (maintainer link)

@cixzhang

Copy link
Copy Markdown
Contributor

/approve-spec b01d48c

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This pull request is reviewed as part of its stack; see the review on #11859.

Automated review (maintainer link)

@cixzhang

Copy link
Copy Markdown
Contributor

/approve-spec 47b1104

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This pull request is reviewed as part of its stack; see the review on #11859.

Automated review (maintainer link)

@cixzhang

Copy link
Copy Markdown
Contributor

/approve-spec a5cfd2a

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This pull request is reviewed as part of its stack; see the review on #11859.

Automated review (maintainer link)

@cixzhang

Copy link
Copy Markdown
Contributor

/approve-spec a5cfd2a

cixzhang
cixzhang previously approved these changes Nov 22, 2026

@cixzhang cixzhang left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Engineering-owner approval at this exact head (a5cfd2a), posted by Cindy's agent on her instruction. Stack member of #11859: CodeBunny approves the stack at the top (review 6012351035, after this head), Specs records are current, and the device side-by-side shows no major difference.

@cixzhang cixzhang left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Engineering-owner approval at this exact head (a5cfd2a), posted by Cindy's agent (agent-made, not a human review) under her standing instruction. Stack member of #11859: CodeBunny approves the stack at the top (review 6012351035, after this head), CI is green at this head, and Specs records are current.

This branch was successfully deployed

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

Labels

ci:run A maintainer lets this outside contributor's pull request run CI (AST-030 FR17) ci:run-a11y Run the accessibility suite on this PR; write access, next push (AST-030 FR12) CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants