Skip to content

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

Draft
vjeux wants to merge 141 commits into
meta:mainfrom
vjeux:uikit/c19-menu-motion
Draft

vjeux wants to merge 141 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 → #12179 → #12216.

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 5c385e8: 2db3ef8 with nine merges and a test 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.

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, and Android emulator runs there are in progress. Then the merge to 5c385e8 changes DropdownMenu.tsx, Popover/usePopover.tsx, utils/focusReturn.ts and utils/nodeType.ts: main's one focus return. A side-by-side of 093df78 and 5c385e8, on the iPhone and the Android emulator, is pending.

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.

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...5c385e8

Public and internal API delta

  • Size: +1,912/−85 lines (a79b454..2db3ef8), tests included.

  • 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: docs and form unchanged, menu +18,684 B, table +70 B. Each is 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.

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

@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 20, 2026 2:44am 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 20, 2026, 2:40 AM 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

Current run: The current CI run concluded skipped. Current analysis is unavailable.


Generated by PR Enrichment workflow | View current CI run

@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 42d1bf8

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Changes requested: one blocking item remains; the record text this pull request adds is owner-approved at this revision, and the code needs no change.

  • spec:AST-094 DEC-31 needs the menu grow's iPhone Safari side-by-side against the head the owner passed, stated in the description at the final revision, because the description says those runs are pending and the earlier real-device run does not carry past this branch's own DropdownMenu.tsx change and the merged changes to its direct imports.

This review covers only this pull request's own change on top of #9777, whose keyboard change is reviewed there. The Android emulator side-by-side that the description states carries to this revision. CI has not run on this draft yet.

Claims and files checked

Review mode: same-head; reason: none

  • Release note: a finger's or a pen's open grows the menu on a Popover's path and timing, and a tap's open grows as a hold's does: verified (DropdownMenu.tsx:1557, :1613-1621, :1199-1212; the touch-grow unit cases).
  • Release note: under Reduce Motion on a phone or tablet the menu fades in at its size and out where it stands: verified (the Reduce Motion unit cases; the surface motion's cross-fade).
  • Release note: a mouse, the keyboard and the pinned popover presentation keep the layer's own entrance: verified (DropdownMenu.tsx:1464, :1557, :1208; the touch-grow unit cases).
  • Description: no new prop, type or default: verified (hooks/index.ts exports useMenuPress by name; no export, prop or default changes).
  • Description: this pull request sits in the stack #9777, #8080, #11859, #12179, #12216: verified (every body carries the same stack line, and the top contains every listed head).
  • Description: the latest merge brings #9777's head, which changes only Selector, CLI, docs and CI files that nothing here imports: verified (it changes none of this change's files, their direct imports or the shared motion and layer modules).
  • Description: the Android emulator side-by-side at the previous revision, at normal speed, with a 4x CPU slowdown and with animations removed, carries here: verified as carrying; the results are judged from the description's text.
  • Description: iPhone Safari runs at this revision are pending: true (blocking).
  • Description: taps stay held from the open to the grow's first frame on a phone or tablet, and nothing is held on a touchscreen laptop: verified (usePopoverSurfaceMotion.ts:90-103, :182; popoverSurfaceMotion.ts:323; the hold unit cases).
  • Description: the grow measures the trigger without its press scale: verified (usePopoverSurfaceMotion.ts:179; the two unit cases).
  • Description: a second finger's tap and opens from code after a refused, closing or disabled press keep the entrance: verified (DropdownMenu.tsx:1280, :1473; the touch-grow unit cases).
  • Description: a finger's open that waits for its trigger still grows, also after another press: verified (DropdownMenu.tsx:1492; the waiting-open unit cases).
  • Description: the bundle test pins DropdownMenu loading the animator with the page: verified (scripts/lazy-sheet-bundle.test.mjs).
  • Description: the internal motion modules of earlier revisions are removed: verified (none exists at this revision).
  • Description: first-load size figures for the menu grow: reported, not rebuilt here.
  • Description: local gates and the browser and accessibility specs pass: stated, not rerun here.
  • Menu grow source: packages/core/src/DropdownMenu/DropdownMenu.tsx, packages/core/src/hooks/useMenuPress.ts, packages/core/src/Popover/usePopoverSurfaceMotion.ts, packages/core/src/Popover/popoverSurfaceMotion.ts, packages/core/src/Layer/settledBox.ts: clear; the real-device side-by-side is pending.
  • Records and release note: 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, docs/architecture/layer-runtime.md, .changeset/menu-touch-grow.md: clear, owner-approved at this revision.
  • Tests: packages/core/src/DropdownMenu/DropdownMenu.test.tsx, packages/core/src/DropdownMenu/DropdownMenuTouchGrow.test.tsx, packages/core/src/DropdownMenu/DropdownMenuTouchGrowPending.test.tsx, packages/core/src/DropdownMenu/__tests__/DropdownMenuEntranceHold.interaction.browser.spec.ts, packages/core/src/DropdownMenu/__tests__/DropdownMenuTouchFocusRing.a11y.chromium.spec.ts, packages/core/src/DropdownMenu/__tests__/DropdownMenuTouchGrow.interaction.browser.spec.ts, packages/core/src/DropdownMenu/__tests__/MenuPress.a11y.chromium.spec.ts, packages/core/src/Popover/popoverSurfaceMotion.test.ts, packages/core/src/Popover/usePopoverSurfaceMotion.test.tsx, packages/core/src/hooks/useMenuPress.test.tsx, scripts/lazy-sheet-bundle.test.mjs: clear; the tests were not run here.
  • Sandbox: apps/sandbox/src/app/(raw)/pages/menu-grow-cases/page.tsx, apps/sandbox/src/app/sandboxPages.ts, apps/sandbox/scripts/next-export-routes.json: clear.
  • #9777's keyboard change, which this branch merges (its fields, keyboard module, specs and stories): judged on #9777, not here.

Automated review (maintainer link)

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

The one item the last review blocked on is resolved: the description now states the menu grow's iPhone Safari side-by-side at this revision against the head the owner passed, and it shows no major difference. The record text this pull request adds is owner-approved at this revision, and the code needs no change. This review covers only this pull request's own change on top of #9777, which has merged.

Claims and files checked

Review mode: same-head; reason: none

  • Release note: a finger's or a pen's open grows the menu on a Popover's path and timing, and a tap's open grows as a hold's does: verified (DropdownMenu.tsx:1557, :1611-1621, :1199-1212; the touch-grow unit cases).
  • Release note: under Reduce Motion on a phone or tablet the menu fades in at its size and out where it stands: verified (the Reduce Motion unit cases; the surface motion's cross-fade).
  • Release note: a mouse, the keyboard and the pinned popover presentation keep the layer's own entrance: verified (DropdownMenu.tsx:1464, :1557, :1208; the touch-grow unit cases).
  • Description: no new prop, type or default: verified (hooks/index.ts exports useMenuPress by name; no export, prop or default changes).
  • Description: this pull request sits in the stack #9777, #8080, #11859, #12179, #12216: verified (every body carries the same stack line, the top contains every listed head, and #9777 has since merged).
  • Description: the latest merge brings #9777's head, which changes only Selector, CLI, docs and CI files that nothing here imports: verified (it changes none of this change's files, their direct imports or the shared motion and layer modules).
  • Description: the grow ships with DropdownMenu, so even the first open grows: verified (the unit case for a finger's first open on a page; the bundle test).
  • Description: the iPhone Safari side-by-side at this revision against the head the owner passed matches it, apart from that head's slower first opens: judged from the description's text; it meets the real-device evidence rule.
  • Description: the Android emulator side-by-side at the previous revision, at normal speed, with a 4x CPU slowdown and with animations removed, carries here and adds no delay against the base branch: verified as carrying; the results are judged from the description's text.
  • Description: taps stay held from the open to the grow's first frame on a phone or tablet, and nothing is held on a touchscreen laptop: verified (usePopoverSurfaceMotion.ts:90-103, :182; popoverSurfaceMotion.ts:323; the hold unit cases).
  • Description: the grow measures the trigger without its press scale: verified (usePopoverSurfaceMotion.ts:179; the two unit cases).
  • Description: a second finger's tap and opens from code after a refused, closing or disabled press keep the entrance: verified (DropdownMenu.tsx:1280, :1473; the touch-grow unit cases).
  • Description: a finger's open that waits for its trigger still grows, also after another press or a key press: verified (DropdownMenu.tsx:1491-1492; the waiting-open unit cases).
  • Description: in both engines the menu plays Popover's frames, and on a phone it opens below its trigger: the browser cases assert both; their Chromium and WebKit runs are stated, not rerun here.
  • Description: the bundle test pins DropdownMenu loading the animator with the page: verified (scripts/lazy-sheet-bundle.test.mjs, passing at this revision).
  • Description: the internal motion modules of earlier revisions are removed: verified (none exists at this revision).
  • Description: first-load size figures for the menu grow: reported, not rebuilt here.
  • Description: local gates and the unit, browser and accessibility specs pass: the menu, Popover, press-model and bundle unit cases pass at this revision; the browser and accessibility specs are stated, not rerun here.
  • Menu grow source: packages/core/src/DropdownMenu/DropdownMenu.tsx, packages/core/src/hooks/useMenuPress.ts, packages/core/src/Popover/usePopoverSurfaceMotion.ts, packages/core/src/Popover/popoverSurfaceMotion.ts, packages/core/src/Layer/settledBox.ts: clear.
  • Records and release note: 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, docs/architecture/layer-runtime.md, .changeset/menu-touch-grow.md: clear, owner-approved at this revision.
  • Tests: packages/core/src/DropdownMenu/DropdownMenu.test.tsx, packages/core/src/DropdownMenu/DropdownMenuTouchGrow.test.tsx, packages/core/src/DropdownMenu/DropdownMenuTouchGrowPending.test.tsx, packages/core/src/Popover/popoverSurfaceMotion.test.ts, packages/core/src/Popover/usePopoverSurfaceMotion.test.tsx, packages/core/src/hooks/useMenuPress.test.tsx, scripts/lazy-sheet-bundle.test.mjs: clear, passing at this revision.
  • Browser specs: packages/core/src/DropdownMenu/__tests__/DropdownMenuEntranceHold.interaction.browser.spec.ts, packages/core/src/DropdownMenu/__tests__/DropdownMenuTouchFocusRing.a11y.chromium.spec.ts, packages/core/src/DropdownMenu/__tests__/DropdownMenuTouchGrow.interaction.browser.spec.ts, packages/core/src/DropdownMenu/__tests__/MenuPress.a11y.chromium.spec.ts: clear; not run here.
  • Sandbox: apps/sandbox/src/app/(raw)/pages/menu-grow-cases/page.tsx, apps/sandbox/src/app/sandboxPages.ts, apps/sandbox/scripts/next-export-routes.json: clear.
  • #9777's keyboard change, which this branch merges and which is now on the base branch: judged on #9777, not here.

Automated review (maintainer link)

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Changes requested: one item blocks approval at this revision. An engineering owner has approved the record text this pull request adds at this exact revision, the code needs no change, and the Android emulator runs meet the emulator requirement.

  • Regression: the merge of main changes DropdownMenu/lazyMenuBottomSheet.ts, which DropdownMenu.tsx imports directly, so under spec:AST-094 DEC-31 the earlier device takes do not carry, and the description's iPhone Safari side-by-side still compares this revision with the previous one rather than with the head the owner passed on the device, which DEC-31's amendment names; please state the same iPhone steps at this revision side by side with that head.

This pull request is reviewed on its own change as a member of its stack, and #9777 has merged. CI has not run on this draft yet.

Claims and files checked

Review mode: same-head; reason: none

  • Changed rules (0): none.
  • Release note: a finger's or a pen's open grows the menu on a Popover's path and timing, and its close shrinks it back: verified (DropdownMenu.tsx:1199-1212, :1557-1558, :1175; the touch-grow unit cases; frames taken after a tap at this revision).
  • Release note: a tap's open grows as a hold's does: verified (DropdownMenu.tsx:1611-1621; the unit case for a tap 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 (the Reduce Motion unit cases; a Reduce Motion frame at this revision shows the menu at full size, partly faded in); the fade-out frames are the browser spec's, stated, not rerun.
  • Release note: a mouse, the keyboard and the pinned popover presentation keep the layer's own entrance: verified (DropdownMenu.tsx:1463-1465, :1557-1558, :1208-1210; the touch-grow unit cases).
  • Description: under a finger the menu used to play the layer's own entrance, while a Popover grows out of its control: verified (the base record lists the grow as a gap; the base frames show the entrance).
  • Description: the menu plays Popover's own surface motion from the trigger's unscaled box: verified (usePopoverSurfaceMotion.ts:176-182; the two press-scale unit cases).
  • Description: no new prop, type or default, and the new names are internal: verified (hooks/index.ts:43-48 re-exports only the existing press-model names; no export, prop or default changes).
  • Description: the record changes it lists (the shared grow path and the entrance exceptions, the closed grow gap with the Reduce Motion fade, the Popover options, the unpressed source box, the internal press report and why no engine fits): verified against the diff.
  • Description: the latest merge brings main with #9777 and the sheet fix, changes no file edited here, and among this change's imports changes the lazy sheet module and only the comments of the focus-outline styles: verified.
  • Description: neither earlier device set carries to this revision, because its merge of main changes the lazy sheet module the menu imports: verified (DropdownMenu.tsx:109).
  • Description: the Android emulator runs at this revision, at normal speed, with the CPU slowed 4× and with animations removed, match the previous revision in every cell: stated; meets the emulator requirement.
  • Description: the iPhone Safari side-by-side at this revision matches the previous revision within one frame: stated; its baseline is the previous revision, not the head the owner passed on the device (blocking).
  • Description: the grow ships with DropdownMenu, so even the first open grows: verified (the unit case for a finger's first open on a page; the bundle test).
  • Description: taps stay held from the open to the grow's first frame on a phone or tablet, and nothing is held on a touchscreen laptop: verified (usePopoverSurfaceMotion.ts:90-103, :181-182; popoverSurfaceMotion.ts:323; the hold unit cases).
  • Description: a second finger's tap and opens from code after a refused, closing or disabled press keep the entrance: verified (DropdownMenu.tsx:1280, :1473; the touch-grow unit cases).
  • Description: a finger's open that waits for its trigger still grows, also after another press or a key press, and another press does not cancel it: verified (DropdownMenu.tsx:1491-1492; the waiting-open unit cases).
  • Description: in both engines the menu plays Popover's frames, and on a phone it opens below its trigger: the browser cases assert both; their runs are stated, not rerun here.
  • Description: the bundle test pins DropdownMenu loading the animator with the page: verified (scripts/lazy-sheet-bundle.test.mjs, passing at this revision).
  • Description: the focus-ring spec now reads the row once the grow rests: verified (DropdownMenuTouchFocusRing.a11y.chromium.spec.ts:134).
  • Description: the internal motion modules of earlier revisions are removed: verified (none exists at this revision).
  • Description: module line counts and first-load size figures: the line counts match this revision within one line; the sizes were measured at an earlier revision and not rebuilt here.
  • Description: local gates and the unit, browser and accessibility specs pass: the menu, Popover, press-model, sheet and bundle unit cases pass at this revision; the browser and accessibility specs are stated, not rerun here.
  • Menu grow source: packages/core/src/DropdownMenu/DropdownMenu.tsx, packages/core/src/hooks/useMenuPress.ts, packages/core/src/Popover/usePopoverSurfaceMotion.ts, packages/core/src/Popover/popoverSurfaceMotion.ts, packages/core/src/Layer/settledBox.ts: clear; the iPhone side-by-side against the owner's passed head is pending.
  • Records and release note: 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, docs/architecture/layer-runtime.md, .changeset/menu-touch-grow.md: clear, owner-approved at this revision.
  • Unit and bundle tests: packages/core/src/DropdownMenu/DropdownMenu.test.tsx, packages/core/src/DropdownMenu/DropdownMenuTouchGrow.test.tsx, packages/core/src/DropdownMenu/DropdownMenuTouchGrowPending.test.tsx, packages/core/src/Popover/popoverSurfaceMotion.test.ts, packages/core/src/Popover/usePopoverSurfaceMotion.test.tsx, packages/core/src/hooks/useMenuPress.test.tsx, scripts/lazy-sheet-bundle.test.mjs: clear, passing at this revision.
  • Browser specs: packages/core/src/DropdownMenu/__tests__/DropdownMenuEntranceHold.interaction.browser.spec.ts, packages/core/src/DropdownMenu/__tests__/DropdownMenuTouchFocusRing.a11y.chromium.spec.ts, packages/core/src/DropdownMenu/__tests__/DropdownMenuTouchGrow.interaction.browser.spec.ts, packages/core/src/DropdownMenu/__tests__/MenuPress.a11y.chromium.spec.ts: clear; not run here.
  • Sandbox: apps/sandbox/src/app/(raw)/pages/menu-grow-cases/page.tsx, apps/sandbox/src/app/sandboxPages.ts, apps/sandbox/scripts/next-export-routes.json: clear.

Automated review (maintainer link)

@cixzhang

Copy link
Copy Markdown
Contributor

/approve-spec 6ff65df

@vjeux

vjeux commented Nov 18, 2026

Copy link
Copy Markdown
Contributor Author

Both items are addressed, with no code change.

@astracat-bot

astracat-bot Bot commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

In reply to @vjeux

I'll run a full review to re-check this with your note.

@cixzhang

Copy link
Copy Markdown
Contributor

/approve-spec 6ff65df

@vjeux

vjeux commented Nov 18, 2026

Copy link
Copy Markdown
Contributor Author

The description now compares 6ff65df with the earlier head 781b36e on an iPhone 14 in Safari (test). In all four cases, the menu grows out of its trigger and shrinks back the same way on both builds.

@astracat-bot

astracat-bot Bot commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

In reply to @vjeux

I'll run a full review to re-check this with your note.

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved pending CI: CI has not run on this head yet, and it runs once the pull request leaves draft. An engineering owner has approved the record text this pull request adds at this exact revision, the code needs no change, and the device evidence is complete: the Android emulator runs meet the emulator requirement, and the iPhone Safari side-by-side now compares this revision with the head the owner passed.

This pull request is reviewed on its own change as a member of its stack, and #9777 has merged.

Claims and files checked

Review mode: same-head; reason: none

  • Changed rules (0): none.
  • Release note: a finger's or a pen's open grows the menu on a Popover's path and timing, and its close shrinks it back: verified (DropdownMenu.tsx:1199-1212, :1557-1558, :1175; the touch-grow unit cases; frames taken after a tap at this revision).
  • Release note: a tap's open grows as a hold's does: verified (DropdownMenu.tsx:1611-1621; the unit case for a tap 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 (the Reduce Motion unit cases; a Reduce Motion frame at this revision shows the menu at full size, partly faded in); the fade-out frames are the browser spec's, stated, not rerun.
  • Release note: a mouse, the keyboard and the pinned popover presentation keep the layer's own entrance: verified (DropdownMenu.tsx:1463-1465, :1557-1558, :1208-1210; the touch-grow unit cases).
  • Description: under a finger the menu used to play the layer's own entrance, while a Popover grows out of its control: verified (the base record lists the grow as a gap; the base frames show the entrance).
  • Description: the menu plays Popover's own surface motion from the trigger's unscaled box: verified (usePopoverSurfaceMotion.ts:176-182; the two press-scale unit cases).
  • Description: no new prop, type or default, and the new names are internal: verified (hooks/index.ts:43-48 re-exports only the existing press-model names; no export, prop or default changes).
  • Description: the record changes it lists (the shared grow path and the entrance exceptions, the closed grow gap with the Reduce Motion fade, the Popover options, the unpressed source box, the internal press report and why no engine fits): verified against the diff.
  • Description: the latest merge brings main with #9777 and the sheet fix, changes no file edited here, and among this change's imports changes the lazy sheet module and only the comments of the focus-outline styles: verified.
  • Description: neither earlier device set carries to this revision, because its merge of main changes the lazy sheet module the menu imports: verified (DropdownMenu.tsx:109).
  • Description: the Android emulator runs at this revision, at normal speed, with the CPU slowed 4× and with animations removed, match the previous revision in every cell: stated; meets the emulator requirement.
  • Description: the iPhone Safari side-by-side at this revision matches the previous revision within one frame: stated.
  • Description: an iPhone Safari side-by-side of this revision against the head the owner passed on the device, with the same four cases, shows the same grow within two frames and the same shrink: stated; this is the side-by-side the device rule asks for, with no major difference.
  • Description: on that result the owners carry the earlier device pass to this revision: stated; consistent with the device rule, under which that side-by-side verifies a later revision unless it shows a major difference.
  • Description: the grow ships with DropdownMenu, so even the first open grows: verified (the unit case for a finger's first open on a page; the bundle test).
  • Description: taps stay held from the open to the grow's first frame on a phone or tablet, and nothing is held on a touchscreen laptop: verified (usePopoverSurfaceMotion.ts:90-103, :181-182; popoverSurfaceMotion.ts:323; the hold unit cases).
  • Description: a second finger's tap and opens from code after a refused, closing or disabled press keep the entrance: verified (DropdownMenu.tsx:1280, :1473; the touch-grow unit cases).
  • Description: a finger's open that waits for its trigger still grows, also after another press or a key press, and another press does not cancel it: verified (DropdownMenu.tsx:1491-1492; the waiting-open unit cases).
  • Description: in both engines the menu plays Popover's frames, and on a phone it opens below its trigger: the browser cases assert both; their runs are stated, not rerun here.
  • Description: the bundle test pins DropdownMenu loading the animator with the page: verified (scripts/lazy-sheet-bundle.test.mjs, passing at this revision).
  • Description: the focus-ring spec now reads the row once the grow rests: verified (DropdownMenuTouchFocusRing.a11y.chromium.spec.ts:134).
  • Description: the internal motion modules of earlier revisions are removed: verified (none exists at this revision).
  • Description: module line counts and first-load size figures: the line counts match this revision within one line; the sizes were measured at an earlier revision and not rebuilt here.
  • Description: local gates and the unit, browser and accessibility specs pass: the menu, Popover, press-model, sheet and bundle unit cases pass at this revision; the browser and accessibility specs are stated, not rerun here.
  • Menu grow source: packages/core/src/DropdownMenu/DropdownMenu.tsx, packages/core/src/hooks/useMenuPress.ts, packages/core/src/Popover/usePopoverSurfaceMotion.ts, packages/core/src/Popover/popoverSurfaceMotion.ts, packages/core/src/Layer/settledBox.ts: clear.
  • Records and release note: 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, docs/architecture/layer-runtime.md, .changeset/menu-touch-grow.md: clear, owner-approved at this revision.
  • Unit and bundle tests: packages/core/src/DropdownMenu/DropdownMenu.test.tsx, packages/core/src/DropdownMenu/DropdownMenuTouchGrow.test.tsx, packages/core/src/DropdownMenu/DropdownMenuTouchGrowPending.test.tsx, packages/core/src/Popover/popoverSurfaceMotion.test.ts, packages/core/src/Popover/usePopoverSurfaceMotion.test.tsx, packages/core/src/hooks/useMenuPress.test.tsx, scripts/lazy-sheet-bundle.test.mjs: clear, passing at this revision.
  • Browser specs: packages/core/src/DropdownMenu/__tests__/DropdownMenuEntranceHold.interaction.browser.spec.ts, packages/core/src/DropdownMenu/__tests__/DropdownMenuTouchFocusRing.a11y.chromium.spec.ts, packages/core/src/DropdownMenu/__tests__/DropdownMenuTouchGrow.interaction.browser.spec.ts, packages/core/src/DropdownMenu/__tests__/MenuPress.a11y.chromium.spec.ts: clear; not run here.
  • Sandbox: apps/sandbox/src/app/(raw)/pages/menu-grow-cases/page.tsx, apps/sandbox/src/app/sandboxPages.ts, apps/sandbox/scripts/next-export-routes.json: clear.

Automated review (maintainer link)

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

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

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

This branch was successfully deployed

1 active deployment
Preview — 5c385e81 Deployed Nov 20, 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. needs:spec-owner-review Current knowledge records await owner approval

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants