Skip to content

DropdownMenu: on a phone a sub-menu opens in place as UIMenu's does - #8220

Draft
vjeux wants to merge 1878 commits into
meta:mainfrom
vjeux:uikit/c19-menu-submenu
Draft

vjeux wants to merge 1878 commits into
meta:mainfrom
vjeux:uikit/c19-menu-submenu

Conversation

@vjeux

@vjeux vjeux commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Depends on #8089. Review only this PR's change: vjeux/astryx@e01c0d1...837b8e2

User need

On a phone, a DropdownMenu sub-menu swaps the menu's rows for a Back row and its own rows in one frame, so the person loses their place. iOS opens it in place: a card grows out of its row over the parent's dimmed rows, and its header takes them back.

What led to it: comparing our menus with UIKit's on the iOS 26.2 simulator, frame by frame (spec:AST-094 FR34).

Problem and solution fit

Under a finger on a phone, tapping a sub-menu row grows a card from it on UIKit's spring (0.4 s); the parent's rows recede (half opacity, 97% scale) and stop taking input. The header shows the row's label; tapping it plays the card back. Reduce Motion cross-fades. A mouse keeps today's drill-in; flyouts are unchanged.

Current specification

spec:AST-094 FR34 (current), on the springs FR4 defines (#8076); component:DropdownMenu FR11 and FR20 keep its focus.

Public delta and caller burden

No API change. The header is named "Move to, Back to Actions" for assistive technology. Cost per DropdownMenu or MoreMenu import: 3.4 KB JS and 0.7 KB CSS, gzipped.

Elements rendered by the Submenu story in Chromium (architecture:component-style-authoring INV7):

at rest open sub-menu open
finger, before 154 142 159
finger, this PR 154 142 164
mouse 154 154 154

The 5 extra elements are the header's icon and its title's style boundary; a finger already exceeded the mouse before (159 vs 154), so this needs the owner's decision.

Design and alternatives

  • Animate a copy of the parent or of the leaving card: a second presentation of the same rows, which INV7 rules out.
  • Scale the box: its rounded corners would stretch.
  • Cross-fade the title between its two weights: its text would be drawn twice.
  • Grow the box on its own pseudo-elements and reveal the card's rows as a window, the parent's rows live but inert (chosen): no element for the motion, transforms and opacity only.

Evidence

iOS 26.2 simulator, Safari, tap "Move to", then its header:

main this PR
main this PR

Android Chromium 158 emulator:

Android

Scope

  • 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

On the DropdownMenu "Submenu" story, phone-sized, with touch emulation:

  1. Open the menu and tap "Move to": a card grows from that row over the dimmed rows, with "Move to" as its header.
  2. Tap the header: the card shrinks back into its row and the rows return.
  3. With a mouse: "Move to" replaces the rows behind a Back row, as before.

Automated: the drill-in motion unit tests, DropdownMenuSubmenuDrillIn (Chromium, WebKit) and the sub-menu accessibility specs. The in-place sub-menu registers only its two springs, as the grow does; a bundle test of it failed before (it carried every spring row). Main's touch-support-bundle test fails here until #8671 makes it per component; #8671's check passes on this head.

The local gates are the evidence; no CI run is expected for this push.

Stack (merge in this order): #8360, #8298 and #8627 (any order) → #8671 → #8078 and #8186 (any order) → #8080 → #8089 → this PR. #7839 was withdrawn: one commit reverts its code from this branch, and nothing here depends on it.

@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 Oct 30, 2026 2:53am UTC

Request Review

@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 commented Oct 24, 2026 •

Copy link
Copy Markdown

AI review status for this pull request.

Review status Updated
❓ Needs maintainer input (for maintainers only) Oct 30, 2026, 3:19 AM UTC

@github-actions

github-actions Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

📚 Storybook Preview

View Storybook for this PR

🧪 Sandbox Preview

View Sandbox for this PR

Modified Components

ContextMenu (@astryxdesign/core) · View in Storybook
Metric Before After Delta
Entry File (ESM) 1.1KB 1.1KB 0B
Lines of Code 678 678 -
Complexity Very High Very High (86) -
MoreMenu (@astryxdesign/core) · View in Storybook
Metric Before After Delta
Entry File (ESM) 219B 219B 0B
Lines of Code 87 87 -
Complexity Low Low (4) -

Component Size

Component Import before Import after Delta CSS before CSS after Delta
core/AlertDialog 56.9KB 57.0KB +131B 12.4KB 12.4KB 0B
core/AppShell 57.9KB 58.0KB +103B 11.6KB 11.6KB 0B
core/AvatarGroupOverflow 39.9KB 40.0KB +139B 6.4KB 6.4KB 0B
core/Banner 47.8KB 47.9KB +137B 9.9KB 9.9KB 0B
core/BaseTypeahead 54.3KB 54.4KB +119B 9.9KB 9.9KB 0B
core/BreadcrumbItem 66.4KB 66.7KB +326B 11.0KB 11.1KB +30B
core/Button 43.3KB 43.4KB +114B 9.2KB 9.2KB 0B
core/Calendar 54.9KB 55.0KB +125B 10.0KB 10.0KB 0B
core/Carousel 50.2KB 50.3KB +97B 10.2KB 10.2KB 0B
core/ChatComposer 60.6KB 60.7KB +113B 10.8KB 10.8KB 0B
core/ChatComposerInput 55.7KB 55.9KB +111B 10.1KB 10.1KB 0B
core/ChatComposerTokenElement 55.7KB 55.9KB +113B 10.1KB 10.1KB 0B
core/ChatDictationButton 46.5KB 46.6KB +120B 9.5KB 9.5KB 0B
core/ChatLayout 48.8KB 49.0KB +115B 9.9KB 9.9KB 0B
core/ChatLayoutScrollButton 46.4KB 46.5KB +97B 9.6KB 9.6KB 0B
core/ChatSendButton 45.8KB 45.9KB +109B 9.2KB 9.2KB 0B
core/CheckboxInput 49.9KB 50.0KB +118B 9.3KB 9.3KB 0B
core/CheckboxListItem 54.0KB 54.1KB +106B 10.5KB 10.5KB 0B
core/ClickableCard 12.8KB 12.9KB +117B 6.9KB 6.9KB 0B
core/CodeBlock 60.5KB 60.6KB +119B 10.7KB 10.7KB 0B
core/Collapsible 11.7KB 11.8KB +113B 4.2KB 4.2KB 0B
core/CommandPalette 50.9KB 51.0KB +119B 11.8KB 11.8KB 0B
core/CommandPaletteItem 8.4KB 8.5KB +110B 3.5KB 3.5KB 0B
core/ComplexSelector 55.8KB 55.9KB +147B 10.6KB 10.6KB 0B
core/ContextMenu 77.7KB 79.1KB +1.4KB 14.6KB 14.8KB +145B
core/ContextMenuItem 16.6KB 16.7KB +117B 5.2KB 5.2KB 0B
core/DateInput 99.9KB 100.0KB +100B 14.8KB 14.8KB 0B
core/DateRangeInput 69.4KB 69.5KB +117B 11.2KB 11.2KB 0B
core/DateTimeInput 110.1KB 110.2KB +92B 15.2KB 15.2KB 0B
core/DialogHeader 48.8KB 48.9KB +115B 9.8KB 9.8KB 0B
core/DrawerHeader 48.9KB 49.0KB +111B 11.2KB 11.2KB 0B
core/DropdownMenu 72.7KB 92.0KB +19.3KB ⚠️ 14.7KB 15.4KB +727B
core/DropdownMenuCheckboxItem 16.1KB 16.2KB +106B 5.6KB 5.6KB 0B
core/DropdownMenuDivider 6.6KB 6.6KB 0B 3.6KB 3.6KB 0B
core/DropdownMenuGroup 6.1KB 6.1KB 0B 3.3KB 3.3KB 0B
core/DropdownMenuItem 15.4KB 15.5KB +101B 5.2KB 5.2KB 0B
core/DropdownMenuRadioGroup 6.0KB 6.0KB 0B 3.2KB 3.2KB 0B
core/DropdownMenuRadioItem 16.2KB 16.3KB +110B 5.6KB 5.6KB 0B
core/DropdownMenuSubMenu 58.1KB 58.3KB +183B 9.5KB 9.6KB +32B
core/FileInput 54.1KB 54.2KB +116B 10.3KB 10.3KB 0B
core/IconButton 43.3KB 43.4KB +125B 9.2KB 9.2KB 0B
core/Item 11.4KB 11.5KB +98B 4.7KB 4.7KB 0B
core/LayerProvider 63.3KB 63.4KB +134B 10.1KB 10.1KB 0B
core/Lightbox 51.2KB 51.3KB +108B 9.8KB 9.8KB 0B
core/Link 43.5KB 43.6KB +126B 7.6KB 7.6KB 0B
core/ListItem 53.5KB 53.6KB +117B 10.5KB 10.5KB 0B
core/Markdown 144.5KB 145.9KB +1.4KB 17.4KB 17.5KB +119B
core/MobileNav 51.0KB 51.1KB +108B 10.1KB 10.1KB 0B
core/MobileNavToggle 46.2KB 46.3KB +119B 9.4KB 9.4KB 0B
core/MoreMenu 72.9KB 92.3KB +19.4KB ⚠️ 14.7KB 15.4KB +727B
core/MultiSelector 76.2KB 76.3KB +124B 14.6KB 14.6KB 0B
core/NumberInput 55.7KB 55.8KB +121B 10.7KB 10.7KB 0B
core/Outline 28.6KB 28.7KB +127B 4.0KB 4.0KB 0B
core/Pagination 87.7KB 87.8KB +61B 15.3KB 15.3KB 0B
core/Popover 49.8KB 49.9KB +97B 12.1KB 12.1KB 0B
core/PowerSearch 155.1KB 155.1KB +40B 18.6KB 18.6KB 0B
core/RadioListItem 52.1KB 52.3KB +125B 9.7KB 9.7KB 0B
core/SegmentedControlItem 8.6KB 8.7KB +116B 3.9KB 3.9KB 0B
core/SelectableCard 12.8KB 12.9KB +114B 7.1KB 7.1KB 0B
core/Selector 79.1KB 79.1KB +21B 15.0KB 15.0KB 0B
core/SelectorOption 14.5KB 14.6KB +97B 5.1KB 5.1KB 0B
core/SideNav 58.0KB 58.1KB +112B 10.6KB 10.6KB 0B
core/SideNavCollapseButton 46.6KB 46.7KB +104B 9.5KB 9.5KB 0B
core/SideNavHeading 54.7KB 54.8KB +109B 10.1KB 10.1KB 0B
core/SideNavItem 54.5KB 54.6KB +110B 10.1KB 10.1KB 0B
core/Step 32.4KB 32.6KB +132B 5.3KB 5.3KB 0B
core/Stepper 47.4KB 47.5KB +119B 9.6KB 9.6KB 0B
core/Switch 48.4KB 48.5KB +124B 9.3KB 9.3KB 0B
core/Tab 9.7KB 9.8KB +119B 4.1KB 4.1KB 0B
core/TabMenu 51.6KB 51.7KB +99B 10.0KB 10.0KB 0B
core/Table 84.0KB 85.4KB +1.4KB 15.1KB 15.3KB +135B
core/TableCell 78.8KB 80.2KB +1.4KB 14.8KB 15.0KB +147B
core/TableHeaderCell 78.6KB 80.0KB +1.4KB 14.8KB 15.0KB +160B
core/TableSelectionToolbar 52.4KB 52.5KB +113B 11.2KB 11.2KB 0B
core/TextInput 53.5KB 53.6KB +113B 10.5KB 10.5KB 0B
core/Thumbnail 50.7KB 50.8KB +116B 11.0KB 11.0KB 0B
core/TimeInput 86.8KB 86.9KB +96B 13.8KB 13.8KB 0B
core/Timestamp 27.5KB 27.5KB +14B 9.5KB 9.5KB 0B
core/Toast 59.8KB 60.0KB +117B 9.7KB 9.7KB 0B
core/ToggleButton 44.1KB 44.2KB +105B 9.3KB 9.3KB 0B
core/Token 29.6KB 29.7KB +125B 4.5KB 4.5KB 0B
core/Tokenizer 64.8KB 64.9KB +129B 11.7KB 11.7KB 0B
core/TopNav 51.9KB 52.0KB +118B 10.4KB 10.4KB 0B
core/TopNavHeading 54.2KB 54.3KB +114B 9.9KB 9.9KB 0B
core/TopNavItem 9.0KB 9.2KB +116B 3.8KB 3.8KB 0B
core/TopNavMegaMenu 54.2KB 54.3KB +134B 10.8KB 10.8KB 0B
core/TopNavMegaMenuItem 9.1KB 9.2KB +119B 4.1KB 4.1KB 0B
core/TopNavMenu 53.6KB 53.7KB +110B 10.1KB 10.1KB 0B
core/TreeList 32.5KB 32.7KB +125B 4.7KB 4.7KB 0B
core/Typeahead 61.5KB 61.6KB +115B 11.3KB 11.3KB 0B

Sizes are gzip. Import counts the JavaScript the import loads eagerly; CSS counts the package stylesheet rules referenced by the modules it can load from its own package, lazily loaded ones included.

⚠️ Touch-only size budget

These components grew past the touch-only budget (2 KB gzip JavaScript or 1 KB gzip CSS per component). If the growth runs only on a coarse pointer, load its JavaScript lazily so the import does not carry it, or justify the cost in the pull request description; CSS stays in the package stylesheet, so justify it.

Component JavaScript CSS
core/DropdownMenu +19.3KB ⚠️ +727B
core/MoreMenu +19.4KB ⚠️ +727B

Bundle Size Summary

Gzip figures measure each package's entry file, not the code an import pulls in.

Package Entry (ESM) Entry gzip before Entry gzip after Delta
@astryxdesign/core 4.9KB 1.2KB 1.2KB 0B
Package stylesheet Gzip before Gzip after Delta
@astryxdesign/core 34.6KB 35.1KB +557B

Accessibility Audit

Status: No accessibility violations detected.

Visual Regression

55 of 502 shot(s) changed.

A change here is a question, not a failure: check whether the after is the
picture you intended. Record that review on the PR. Baseline maintenance is an
explicit dispatch of CI; this report never rewrites the baseline or adds a release gate.

component story theme mode pixels
Selector Indicator Space Bottom Sheet Narrow End RTL neutral light 753,933
Selector Indicator Space Bottom Sheet Wide Start neutral light 740,072
RichTextEditor Markdown parity: side by side probe dark 558,840
RichTextEditor Markdown parity: side by side probe light 540,756
Chat Full AI Chat probe light 230,823
Chat Full AI Chat probe dark 229,805
AppShell With Mobile Nav probe light 217,010
AppShell With Mobile Nav probe dark 216,960
Collapsible Dividers probe dark 66,445
Collapsible Dividers probe light 66,445
AppShell Playground neutral dark 65,198
AppShell Playground neutral light 63,788
Chat Default neutral dark 36,304
Chat Default neutral light 35,767
Chat Empty State probe light 23,531
Chat Empty State probe dark 22,622
ChatAutoScroll Scroll Behavior Comparison neutral dark 15,378
ChatAutoScroll Scroll Behavior Comparison neutral light 14,107
Chat With Attachments probe light 13,406
Chat With Attachments probe dark 11,232

and 35 more.


Generated by PR Enrichment workflow | Storybook | Sandbox | View full report

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown

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 spec decision before it can be approved. The in-place sub-menu drill-in has no approved spec, and the new draft AST-094 touch-presentation spec and the proposed DropdownMenu (FR8, FR20, FR23) and useMenuPress (FR9, DEC-8) edits are not yet approved; AST-094 also changes current theme-token, user-state and scroll-chaining rules. An engineering owner can record that decision by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner. Whatever that decision is, these need changes:

  • The pull request compares 31,481 authored lines against main because it carries its open dependencies; once they land or it is rebased onto them, it should contain only its own 1,402-line commit.
  • The drilled-in header shows the row's label but is named Back to <parent>, which fails WCAG 2.5.3 (Label in Name), so its name should start with the visible text.
  • .changeset/dropdownmenu-submenu-in-place.md needs a [feat] tag and a patch bump, since CI's lint job fails on it.
  • After drilling two levels and going back one, the first sub-menu loses its parent copy (menuDrillInMotion.ts:381).
  • useMenuPress.spec.md still says 500 ms while the code ships 150 ms.

[Automated review]

xstyle={rtlStyles.mirror}
/>
label={stringLabel ?? backLabel}
aria-label={backLabel}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The header shows label ("Move to") but aria-label names it "Back to Actions", so its name does not contain the visible text (WCAG 2.2 SC 2.5.3, Label in Name). A speech-input user who says "Move to" does not reach it. Start the name with the visible label (for example "Move to, back to Actions"), or keep the visible "Back to" text.

@@ -0,0 +1,7 @@
---
'@astryxdesign/core': minor

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

pnpm check:changesets fails on this file because the body needs a [category] tag. While packages are on 0.x a compatible feature is also a patch bump, so use '@astryxdesign/core': patch and start the body with [feat].

}
if (kind === 'push') {
// The parent card behind: the popover as it stands now.
removeParent();

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Every push removes the existing parent copy here, and every pop removes the only one (lines 431 and 506). After Root → Move to → Archive → back, "Move to" shows with nothing behind it, unlike the first time it opened. Keep one copy per pushed level, and on pop remove only the top one.

@vjeux
vjeux force-pushed the uikit/c19-menu-submenu branch from 1c3307b to df81a27 Compare October 24, 2026 15:49
@vjeux
vjeux force-pushed the uikit/c19-menu-submenu branch from df81a27 to 01a6f26 Compare October 24, 2026 16:15
vjeux added a commit to vjeux/astryx that referenced this pull request Oct 24, 2026
… Mobile Safari) and its Chromium storyboard

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown

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 spec decision before it can be approved: the in-place sub-menu drill-in has no approved spec, and the new draft AST-094 touch-presentation spec and the proposed DropdownMenu (FR8, FR20, FR23) and useMenuPress (FR9, DEC-8) edits are not yet approved. 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 decision, these still need changes:

  • The compare carries 31,889 authored lines from its open dependencies; once they land, or after a rebase onto them, it should contain only the 1,810-line drill-in commit.
  • The drilled-in header shows the row's label but is named "Back to ", which fails WCAG 2.5.3 (Label in Name), so its name should start with the visible text.
  • .changeset/dropdownmenu-submenu-in-place.md needs a [feat] tag and a patch bump, since CI's lint job fails on it.
  • After drilling two levels and going back one, the first sub-menu has no parent card behind it (menuDrillInMotion.ts:518 and :650).
  • useMenuPress.spec.md still lists a 500 ms long-press delay while the code ships 150 ms, and AST-094 amends spec:AST-090, which exists only in #8003.

[Automated review]

@@ -140,6 +140,7 @@ Consumer migration instructions belong in consumer docs and release notes.
| stray-click window | 400 ms, or the next `pointerdown` | how long after a tracked release the browser's click is still swallowed | `MENU_PRESS_STRAY_CLICK_MS` | `module:DropdownMenu/useMenuPress` | stable |
| settle time | 300 ms | proposed: how long an opening press must last before its release may act | `MENU_PRESS_SETTLE_MS` | `module:DropdownMenu/useMenuPress` | proposed |
| long-press delay | 500 ms | proposed: how long a finger rests on the trigger before the menu opens under it | `longPressDelayMs` | `module:DropdownMenu/useMenuPress` | proposed |

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This row still gives the long-press delay as 500 ms, while useMenuPress.ts now defaults longPressDelayMs to 150 ms (300 ms inside a scroller), and this pull request edits FR9 and adds DEC-8 in the same record. State the shipped value here, or keep the code at 500 ms, so an owner approving the record approves what ships.

follows.
- **FR7 — Exits animate as UIKit's do.** A touch presentation MUST play the
exit its UIKit counterpart plays. **Proposed; pending owner review:** this
departs from the draft `spec:AST-090` FR1 (exits off by default) and FR10

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

spec:AST-090 is not in the repository at this head or on main; it exists only in the open #8003, which the stack list does not name. List that pull request as a dependency, or drop the FR1/FR10 amendment until AST-090 lands, so an owner can read what FR7 departs from.

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown

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 spec decision before it can be approved: the in-place sub-menu drill-in has no approved spec, the new draft AST-094 touch-presentation spec and the proposed DropdownMenu (FR8, FR20, FR23) and useMenuPress (FR9, DEC-8) edits are not yet approved, and AST-094 would change current scroll-chaining, theme-token, user-state and button-press rules that an owner would have to update. 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 decision, these still need changes:

  • The compare carries 31,889 authored lines from its open dependencies; once they land, or after a rebase onto them, it should contain only the 1,810-line drill-in commit.
  • The drilled-in header shows the row's label but is named "Back to ", which fails WCAG 2.5.3 (Label in Name), so its name should contain the visible text.
  • After drilling two levels and going back one, the first sub-menu has no parent card behind it (menuDrillInMotion.ts:518 and :650).
  • useMenuPress.spec.md still lists a 500 ms long-press delay while the code ships 150 ms, and AST-094 amends spec:AST-090, which exists only in #8003.

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

  • Writing direction: the drill-in reads the direction through isRtlElement.
  • Reduced motion: the local handling and reducedMotion: 'keep' go; the animator resolves it (design:reduced-motion).

vjeux added 18 commits October 29, 2026 10:18
…er and for the two stops the input stream fixes

- A still finger with sub-pixel jitter over a scroll view keeps its tap
  and scrolls nothing (spec:AST-094 FR18–FR22).
- A tap is still recognized under an app's window-capture
  stopPropagation, and under a document-capture
  stopImmediatePropagation registered before core's: the recognizers hear
  touches on the window's capture phase.
Chromium and WebKit pass.
…s once

Where nothing that claims is attached, the host's touchend listener is
passive and cannot cancel the engine's own click after a retargeted tap
clicks what is drawn. The shared click guard swallows that late click
whatever is attached; this case pins it, as asked on meta#8293.
This pull request sat on meta#8076 and carried its old copies of the harness
meta#8045 and meta#8046 landed on main. meta#8360 carries meta#8076 with main's harness,
so after the merge this pull request's own diff is the presentation
resolver's commits. The one conflict, the gestures README, keeps both
sides: this pull request's paragraph on the presentation prop ends the
touch presentation section, and meta#8360's migration section follows it.
…esture host's subscriptions

The gesture host subscribes no click: the one cancelling click subscriber
is the click guard's, added at a window's first arm and kept. The release
note, the stream's header and the gestures README listed click with the
host's touchend and contextmenu; they now name the guard's own.
meta#8078's dependencies in one commit, so its compare link shows only its own change: meta#8627 503bc5b, meta#8360 045f666 (which carries meta#8076, meta#8073 and meta#8446) and meta#8298 8cb7c3a.
Folds this pull request onto the canonical gesture foundation, meta#8360's
head, which carries meta#8076, and onto main, in place of the old meta#8076 and
harness copies it carried. No conflicts.
… as a dependency

meta#8627 is now one commit on main; meta#8360 carries meta#8076, meta#8073 and meta#8446.

useMenuPress.ts: the trigger half lives in menuTriggerPress.ts, so it
takes meta#8360's trigger changes there. The trigger's holds run on the
long-press detector and pass FR29's 13 px drift allowance as each press
starts, under every primary pointer (FR43). The hold duration comes from
motion/uikit/longPress.ts. MENU_PRESS_TRIGGER_DRIFT_PX is re-exported
beside MENU_PRESS_LONG_PRESS_MS. The stray-click window is the shared
click guard's, from meta#8360.
meta#8186 carries meta#8360 045f666 and main 90da4a7. AST-057 takes
meta#8186's text: this side never changed it.
meta#8080 now takes meta#8078 dcda3d0 (with meta#8627 503bc5b, meta#8360 045f666
and meta#8298 8cb7c3a) and meta#8186 c614025. The usage text keeps meta#8080's
wording and this PR's sentence on the popover beside its trigger.
The DropdownMenu spec's tables keep each side's rows: meta#8080's FR5 and the
sub-menu rows (FR15, FR20, FR23), re-padded by Prettier.
meta#8220's dependencies in one commit: meta#8089 e01c0d1 and meta#7839 53e8deb. The spec
keeps FR21 before FR23, as meta#7839 orders them.
meta#8089 now takes meta#8080, which takes meta#8078 (with meta#8627, meta#8360 and meta#8298)
and meta#8186. DropdownMenuTouch.ts registers UIKit's two menu springs for
the grow, from meta#8080, and keeps the springs table for the in-place
sub-menu; its header says so. The usage text takes meta#8080's wording,
meta#8089's popover sentence and this PR's in-place sub-menu sentence.
…rings and no other (red)

architecture:component-style-authoring INV6: a touch layer ships the
springs it plays. The grow and collapse already carry UIKit's two menu
springs and no other row. The in-place sub-menu reads the whole springs
table and registers all of it, so its bundle carries every row: the
keyboard's spring among them. This case bundles createMenuDrillInMotion
alone and fails here.
…prings and no other

The in-place sub-menu plays springs.subMenuOpen and springs.subMenuBack.
It now imports those two springs instead of the whole table, and
registers them alone through registerSubMenuSprings, as the grow does
with registerMenuSprings. Its bundle carries those two springs and no
other row (architecture:component-style-authoring INV6).

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Approval waits on an engineering owner's spec decision: on a phone this pull request opens a sub-menu in place over the parent's rows, which current spec:AST-094 FR34 rules out and OQ10 leaves to an owner, and its header springs and its 10 extra open-menu elements need AST-094 FR4 and an INV7 / AST-017 FR60 exception settled as well. An engineering owner records that decision, with FR4, FR34 and OQ10 amended to match, by commenting /approve-spec <full head SHA> on this pull request; the author may do so as an engineering owner. Independently of that decision, these need changes:

  • A back tapped while the card is still growing restarts from the end of the push instead of from where the box is drawn (menuDrillInMotion.ts, capture; AST-094 FR6).
  • scripts/touch-support-bundle.test.mjs fails for the root and hooks entries, which now carry gestures/nativeScroll.ts through hooks/menuTriggerPress.ts.
  • The compare is 37,267 authored lines because it carries the unmerged dependency pull requests; this pull request's own change is 2,221 lines and should land on top of them, decomposed or justified.

[Automated review]

vjeux added 2 commits October 29, 2026 18:34
…andoned

meta#7839 entered this branch's dependencies in six merges, the last of
meta#7839 53e8deb. Its whole diff against the main it was built on
(d5cd551), 14 files, comes off in this one commit, so the branch ships
none of its code. The history stays.

This PR's own change needs none of it: no file here imports
menuSheetPath.ts or opensSubMenu.ts, and the core typecheck and the
DropdownMenu, ContextMenu and MoreMenu suites pass without it. The
DropdownMenu spec loses meta#7839's rows (FR23, its FR20 and FR15 text, the
sub-menu regions row), so the FR21-before-FR23 order that merge kept no
longer applies.
…sub-menu springs [skip ci]

createMenuDrillInMotion's comment still said it registers the springs
table; since the sub-menu ships only its two springs, it registers those
(registerSubMenuSprings), as createMenuSurfaceMotion's comment says of
the menu springs.
vjeux added a commit to vjeux/astryx that referenced this pull request Oct 30, 2026
vjeux added a commit to vjeux/astryx that referenced this pull request Oct 30, 2026
vjeux added a commit to vjeux/astryx that referenced this pull request Oct 30, 2026
… into 19ee3fa

menuTriggerPress.ts takes the new side: meta#8078's port of meta#8360's trigger
changes replaces the older port this base carried.
vjeux added a commit to vjeux/astryx that referenced this pull request Oct 30, 2026
… as a dependency [skip ci]

meta#8220 no longer carries the withdrawn meta#7839. This PR's action-sheet
card used two things only meta#7839 provided: its opensSubMenu helper, and
header and footer on a data row. isPlainAction now checks for a nested
level itself, by main's rule (a non-empty items), and drops the per-row
header and footer checks, since rows have neither. The level's own
header and footer still keep the sheet (hasRegions).

The DropdownMenu bottom sheet takes main's regions again, inside this
PR's card-or-sheet branch. DropdownMenuTouch.ts names both register
functions it calls, and says the card plays the alert's two springs
through useAlertMotion (meta#8373). The presentation description keeps this
PR's card sentence and meta#8080's wording.

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Approval waits on an engineering owner's spec decision: on a phone this pull request opens a sub-menu in place over the parent's rows, which current spec:AST-094 FR34 rules out (its rows and a Back to <parent> row replace the menu's) and OQ10 leaves to an owner, and the same decision has to cover the header's springs (FR4), ten more elements under a finger than under a mouse (architecture:component-style-authoring INV7, spec:AST-017 FR60), and the new architecture:layer-runtime exit-copy text and spec:AST-057 motion-role sentence. 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 decision, these still need fixing:

  • A back tapped while the card is still growing jumps to the end of the push before it shrinks (menuDrillInMotion.ts:398, AST-094 FR6).
  • main's touch-support-bundle test fails at this head because the public useMenuPress now reaches gestures/nativeScroll.ts (hooks/menuTriggerPress.ts:24).
  • The compare is 36,206 authored lines; land or retarget onto the dependencies so it carries only this change, and split or justify what remains over 2,000.

[Automated review]

const capture: MenuDrillInMotion['capture'] = (kind, row, atRoot) => {
const {surface, list} = getElements();
captured = null;
endTransition();

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This disposes every animator of the transition in flight before boxOf(paint) below reads the layout, so a back tapped while the card is still growing first jumps the box to the pushed size and then shrinks from rest. spec:AST-094 FR6 asks for the catch at the value on screen, from the curve, keeping the velocity. Read the running box, card and parent animators' get and getVelocity before ending them, as menuSurfaceMotion.ts does when the menu is reopened during its close.


import {useCallback, useMemo, type RefObject} from 'react';
import {currentGesture} from '../Layer/gestureCounter';
import {createNativeScrollProbe} from '../gestures/nativeScroll';

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The public useMenuPress reaches this module through useDropdownMenuPress, so the hooks and root entries now carry gestures/nativeScroll.ts, and scripts/touch-support-bundle.test.mjs ("is absent from the root entry", "is absent from the hooks entry") fails at this head, as the description says. Either keep the probe out of what the public hook reaches or carry #8671's test change under an INV13 reading an owner accepts.

This branch was successfully deployed

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

Labels

CLA Signed This label is managed by the Meta Open Source bot. needs:design-review Affects visuals — Design should review 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