Skip to content

fix(core): an anchored layer that would run under the software keyboard ends above it - #8208

Draft
vjeux wants to merge 1959 commits into
meta:mainfrom
vjeux:uikit/c26-popover-keyboard
Draft

vjeux wants to merge 1959 commits into
meta:mainfrom
vjeux:uikit/c26-popover-keyboard

Conversation

@vjeux

@vjeux vjeux commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Review only this PR's change: vjeux/astryx@66038f6...33c21c5

Depends on #8187, which carries #8176.

An open review asks to re-measure the cap when the runtime swaps in a new layer element while it is open (FR8), and to rebase once the dependencies land; the cap's measuring changes with that.

This pull request shows a merge conflict with main in the CLI's icon-set search goldens; it comes from the keyboard module below it (#8559), which resolves it, and this branch takes that fix with its next push.

Why

On a phone, the software keyboard covered the lower part of an anchored layer (a Popover, a Selector's list, a menu), buttons included: someone typing into its search field could not reach what was under the keyboard. Safari's keyboard does not shrink the layout viewport, so the layer runtime's size cap never saw it.

What led to it

We are bringing Astryx's touch components to the behavior of native iOS controls. On iOS, a popover shrinks with its top held so that it ends 10 pt above the keyboard. The owner decided the rule for Astryx (#8208 (comment)), recorded by #8506 (spec:AST-059 FR8–FR10 and DEC-6, architecture:layer-runtime INV11).

Options and tradeoffs

  • Move the layer up above the keyboard, keeping its size: it can cover its own trigger and the field being typed into.
  • Scroll the page until the layer fits: moves the content the person is reading.
  • Cap the layer's height so it ends 10 px above the keyboard, its top held, and let its content scroll inside it (this pull request), as iOS does. Its code is touch-only and shared: the components that use layers grow by a median 4.5 KB gzip, carried once per page however many of them it uses.

Why this choice

It matches iOS and the owner's decision, and joins the runtime's existing caps, so every layered component gets it from one rule; lists and menus fold it into their own 300 px.

How to check it

  1. On an iPhone or the iOS simulator, open a Selector with a search field, or a Popover with a text field, near the bottom of the screen, and focus the field: as the keyboard comes up, the layer shrinks to end 10 px above it.
  2. Open it with the keyboard already up: it opens already capped.
  3. On a desktop browser, with no keyboard: pixel-identical before and after.
  4. The PopoverKeyboard interaction specs and the list and menu specs pass in Chromium and WebKit.

Android has not been run yet, so the changeset is scoped to iOS.

Evidence

iOS 26.2 Safari, before and after (after: the layer spans 68–339 px against the keyboard's top at 349):

Before After

Opened with the keyboard already up (before, it ran to 509):

Already up

@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 12:09am UTC

Request Review

@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, 12:34 AM UTC

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Oct 24, 2026
@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Oct 24, 2026
@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 682 -
Complexity Very High Very High (86) -
MultiSelector (@astryxdesign/core) · View in Storybook
Metric Before After Delta
Entry File (ESM) 273B 273B 0B
Lines of Code 2642 2655 -
Complexity Very High Very High (344) -
Popover (@astryxdesign/core) · View in Storybook
Metric Before After Delta
Entry File (ESM) 412B 412B 0B
Lines of Code 977 1411 -
Complexity Very High Very High (147) -

Component Size

Component Import before Import after Delta CSS before CSS after Delta
charts/Chart N/A 70.1KB N/A N/A 20B N/A
charts/ChartLegend N/A 59.5KB N/A N/A 20B N/A
charts/ChartTooltip N/A 59.4KB N/A N/A 20B N/A
core/AlertDialog 57.3KB 61.8KB +4.5KB ⚠️ 12.5KB 12.6KB +61B
core/AppShell 66.8KB 70.5KB +3.7KB ⚠️ 11.8KB 11.9KB +60B
core/Avatar 37.8KB 42.4KB +4.5KB ⚠️ 6.3KB 6.4KB +53B
core/AvatarGroup 40.2KB 44.7KB +4.5KB ⚠️ 6.4KB 6.5KB +51B
core/AvatarGroupOverflow 40.3KB 44.9KB +4.6KB ⚠️ 6.4KB 6.4KB +54B
core/Banner 48.5KB 53.1KB +4.6KB ⚠️ 10.1KB 10.2KB +63B
core/BaseTypeahead 55.0KB 59.6KB +4.6KB ⚠️ 10.1KB 10.1KB +80B
core/BottomSheet 33.9KB 49.1KB +15.2KB ⚠️ 7.9KB 7.9KB +2B
core/BottomSheetSwitcher 14.8KB 14.8KB 0B 3.3KB 3.3KB 0B
core/BreadcrumbItem 67.3KB 71.9KB +4.6KB ⚠️ 11.2KB 11.2KB +50B
core/Breadcrumbs 22.8KB 22.8KB +11B 3.3KB 3.3KB 0B
core/Button 43.7KB 48.3KB +4.6KB ⚠️ 9.3KB 9.3KB +65B
core/Calendar 55.6KB 60.2KB +4.6KB ⚠️ 10.2KB 10.2KB +61B
core/Carousel 50.9KB 56.9KB +6.0KB ⚠️ 10.3KB 10.4KB +64B
core/ChatComposer 61.3KB 66.4KB +5.1KB ⚠️ 11.0KB 11.1KB +60B
core/ChatComposerDrawer 24.3KB 24.3KB +15B 4.5KB 4.5KB 0B
core/ChatComposerInput 56.2KB 61.1KB +5.0KB ⚠️ 10.2KB 10.2KB +63B
core/ChatComposerTokenElement 56.2KB 61.1KB +5.0KB ⚠️ 10.2KB 10.2KB +63B
core/ChatDictationButton 47.2KB 51.7KB +4.6KB ⚠️ 9.6KB 9.7KB +64B
core/ChatLayout 49.5KB 66.9KB +17.4KB ⚠️ 10.1KB 10.2KB +100B
core/ChatLayoutScrollButton 47.0KB 51.7KB +4.6KB ⚠️ 9.7KB 9.8KB +67B
core/ChatMessage 23.4KB 23.4KB +14B 3.5KB 3.5KB 0B
core/ChatMessageBubble 7.0KB 7.0KB 0B 3.6KB 3.6KB 0B
core/ChatMessageList 29.3KB 29.3KB +12B 7.8KB 7.8KB +53B
core/ChatMessageMetadata 26.4KB 26.4KB +13B 4.0KB 4.0KB 0B
core/ChatSendButton 46.4KB 51.0KB +4.6KB ⚠️ 9.3KB 9.4KB +63B
core/ChatSystemMessage 6.7KB 6.7KB 0B 3.7KB 3.7KB 0B
core/ChatTokenizedText 6.9KB 6.9KB 0B 3.9KB 3.9KB 0B
core/ChatToolCalls 32.4KB 32.5KB +14B 9.1KB 9.1KB +53B
core/CheckboxInput 50.5KB 55.1KB +4.6KB ⚠️ 9.5KB 9.5KB +63B
core/CheckboxList 46.6KB 51.1KB +4.5KB ⚠️ 8.3KB 8.3KB +50B
core/CheckboxListItem 54.7KB 59.2KB +4.6KB ⚠️ 10.6KB 10.7KB +60B
core/ClickableCard 12.8KB 12.9KB +117B 6.9KB 6.9KB 0B
core/CodeBlock 61.2KB 65.8KB +4.6KB ⚠️ 10.8KB 10.9KB +61B
core/Collapsible 18.7KB 18.8KB +101B 4.4KB 4.4KB 0B
core/CommandPalette 51.5KB 51.6KB +107B 12.0KB 12.0KB +62B
core/CommandPaletteInput 32.9KB 32.9KB +15B 8.3KB 8.3KB +54B
core/CommandPaletteItem 8.4KB 8.5KB +110B 3.5KB 3.5KB 0B
core/ComplexSelector 56.5KB 61.1KB +4.6KB ⚠️ 10.8KB 10.9KB +64B
core/ContextMenu 75.3KB 81.2KB +5.9KB ⚠️ 14.8KB 14.9KB +62B
core/ContextMenuItem 53.5KB 59.6KB +6.0KB ⚠️ 9.8KB 9.8KB +64B
core/DateInput 100.2KB 115.5KB +15.2KB ⚠️ 14.9KB 15.0KB +73B
core/DateRangeInput 70.1KB 75.8KB +5.7KB ⚠️ 11.4KB 11.4KB +60B
core/DateTimeInput 110.4KB 125.5KB +15.1KB ⚠️ 15.4KB 15.5KB +70B
core/DialogHeader 49.5KB 54.1KB +4.6KB ⚠️ 10.0KB 10.0KB +62B
core/DrawerHeader 49.6KB 54.2KB +4.6KB ⚠️ 11.4KB 11.4KB +60B
core/DropdownMenu 73.4KB 79.3KB +5.9KB ⚠️ 15.0KB 15.0KB +72B
core/DropdownMenuCheckboxItem 16.4KB 16.5KB +98B 5.7KB 5.7KB 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.6KB 15.7KB +100B 5.3KB 5.3KB 0B
core/DropdownMenuRadioGroup 6.0KB 6.0KB 0B 3.2KB 3.2KB 0B
core/DropdownMenuRadioItem 16.4KB 16.5KB +102B 5.7KB 5.7KB 0B
core/DropdownMenuSubMenu 58.7KB 63.3KB +4.6KB ⚠️ 9.7KB 9.8KB +67B
core/Field 44.8KB 49.3KB +4.5KB ⚠️ 8.1KB 8.2KB +52B
core/FieldLabel 40.3KB 44.8KB +4.5KB ⚠️ 6.7KB 6.7KB +52B
core/FileInput 54.8KB 59.3KB +4.6KB ⚠️ 10.5KB 10.6KB +61B
core/Heading 9.1KB 9.1KB +1B 6.8KB 6.8KB +52B
core/HoverCard 17.2KB 21.7KB +4.5KB ⚠️ 4.9KB 5.0KB +51B
core/IconButton 43.7KB 48.3KB +4.6KB ⚠️ 9.3KB 9.3KB +65B
core/InputGroup 45.4KB 49.9KB +4.5KB ⚠️ 8.2KB 8.2KB +51B
core/Item 11.4KB 11.5KB +98B 4.7KB 4.7KB 0B
core/LayerProvider 64.0KB 68.6KB +4.5KB ⚠️ 10.3KB 10.3KB +64B
core/Lightbox 51.9KB 56.4KB +4.6KB ⚠️ 10.0KB 10.0KB +64B
core/Link 44.1KB 48.7KB +4.6KB ⚠️ 7.7KB 7.8KB +56B
core/ListItem 54.1KB 58.7KB +4.6KB ⚠️ 10.6KB 10.7KB +60B
core/Markdown 145.2KB 151.3KB +6.0KB ⚠️ 17.8KB 17.8KB +62B
core/MobileNav 51.7KB 56.2KB +4.6KB ⚠️ 10.2KB 10.3KB +61B
core/MobileNavToggle 46.9KB 51.5KB +4.6KB ⚠️ 9.6KB 9.6KB +65B
core/MoreMenu 73.7KB 79.6KB +5.8KB ⚠️ 15.0KB 15.0KB +72B
core/MultiSelector 73.6KB 79.7KB +6.1KB ⚠️ 14.8KB 14.9KB +88B
core/NumberInput 56.4KB 61.0KB +4.6KB ⚠️ 10.9KB 10.9KB +59B
core/Outline 29.0KB 29.1KB +126B 4.0KB 4.0KB 0B
core/Pagination 85.5KB 91.4KB +5.9KB ⚠️ 15.5KB 15.6KB +90B
core/Popover 50.3KB 67.3KB +17.0KB ⚠️ 12.2KB 12.3KB +62B
core/PowerSearch 166.6KB 180.4KB +13.8KB ⚠️ 20.1KB 20.2KB +92B
core/ProgressBar 7.7KB 7.7KB +1B 6.6KB 6.7KB +52B
core/RadioList 46.2KB 50.7KB +4.5KB ⚠️ 8.2KB 8.2KB +51B
core/RadioListItem 52.8KB 57.4KB +4.6KB ⚠️ 9.8KB 9.9KB +60B
core/SegmentedControl 39.1KB 43.6KB +4.5KB ⚠️ 6.3KB 6.4KB +52B
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 77.0KB 82.9KB +5.9KB ⚠️ 15.2KB 15.3KB +88B
core/SelectorOption 14.7KB 14.8KB +99B 5.2KB 5.2KB 0B
core/SideNav 64.6KB 68.3KB +3.7KB ⚠️ 10.7KB 10.8KB +62B
core/SideNavCollapseButton 47.3KB 51.9KB +4.6KB ⚠️ 9.6KB 9.7KB +63B
core/SideNavHeading 59.2KB 63.7KB +4.6KB ⚠️ 10.4KB 10.4KB +63B
core/SideNavItem 55.3KB 59.8KB +4.6KB ⚠️ 10.3KB 10.3KB +63B
core/Slider 49.1KB 53.6KB +4.5KB ⚠️ 8.7KB 8.7KB +51B
core/Spinner 26.7KB 26.7KB +14B 7.5KB 7.6KB +53B
core/StatusDot 19.0KB 23.5KB +4.5KB ⚠️ 6.2KB 6.2KB +51B
core/Step 33.0KB 33.1KB +121B 5.5KB 5.5KB 0B
core/Stepper 48.1KB 52.6KB +4.6KB ⚠️ 9.7KB 9.8KB +63B
core/Switch 49.0KB 53.6KB +4.6KB ⚠️ 9.5KB 9.6KB +63B
core/Tab 9.7KB 9.8KB +114B 4.1KB 4.1KB 0B
core/TabList 40.6KB 45.1KB +4.5KB ⚠️ 7.3KB 7.4KB +50B
core/TabMenu 55.9KB 60.5KB +4.6KB ⚠️ 10.2KB 10.3KB +64B
core/Table 84.7KB 90.4KB +5.7KB ⚠️ 15.6KB 15.6KB +60B
core/TableCell 76.5KB 82.4KB +5.9KB ⚠️ 15.3KB 15.3KB +59B
core/TableHeaderCell 76.1KB 82.0KB +5.9KB ⚠️ 15.0KB 15.1KB +60B
core/TableSelectionToolbar 52.8KB 57.4KB +4.6KB ⚠️ 11.3KB 11.3KB +61B
core/Text 8.6KB 8.6KB 0B 6.8KB 6.8KB +52B
core/TextArea 50.0KB 54.5KB +4.5KB ⚠️ 9.5KB 9.6KB +60B
core/TextInput 54.2KB 58.8KB +4.6KB ⚠️ 10.6KB 10.7KB +64B
core/Thumbnail 51.4KB 55.9KB +4.6KB ⚠️ 11.1KB 11.2KB +62B
core/TimeInput 87.5KB 103.1KB +15.6KB ⚠️ 13.9KB 14.0KB +61B
core/Timer 9.2KB 9.2KB 0B 6.8KB 6.8KB +52B
core/Timestamp 27.9KB 28.0KB +12B 9.7KB 9.8KB +64B
core/Toast 60.6KB 65.2KB +4.6KB ⚠️ 9.9KB 10.0KB +62B
core/ToggleButton 44.5KB 49.1KB +4.6KB ⚠️ 9.4KB 9.4KB +65B
core/Token 30.2KB 30.3KB +118B 4.6KB 4.6KB 0B
core/Tokenizer 69.3KB 75.5KB +6.2KB ⚠️ 16.7KB 16.8KB +101B
core/Toolbar 40.1KB 44.7KB +4.6KB ⚠️ 7.7KB 7.8KB +52B
core/Tooltip 16.8KB 21.4KB +4.5KB ⚠️ 4.9KB 5.0KB +50B
core/TopNav 52.5KB 57.1KB +4.6KB ⚠️ 10.5KB 10.6KB +61B
core/TopNavHeading 58.6KB 63.2KB +4.6KB ⚠️ 10.2KB 10.2KB +66B
core/TopNavItem 9.0KB 9.2KB +116B 3.8KB 3.8KB 0B
core/TopNavMegaMenu 55.0KB 59.6KB +4.6KB ⚠️ 11.0KB 11.1KB +62B
core/TopNavMegaMenuItem 9.1KB 9.2KB +119B 4.1KB 4.1KB 0B
core/TopNavMenu 58.3KB 62.9KB +4.6KB ⚠️ 10.3KB 10.4KB +65B
core/TreeList 40.4KB 40.5KB +108B 4.8KB 4.8KB 0B
core/Typeahead 62.2KB 66.8KB +4.6KB ⚠️ 11.4KB 11.5KB +78B
core/TypeaheadItem 6.2KB 6.2KB 0B 3.4KB 3.4KB 0B
lab/ChatEmojiPicker N/A 83.0KB N/A N/A 773B N/A
lab/ChatReactionBar N/A 83.6KB N/A N/A 1.1KB N/A
lab/CommentComposer N/A 112.1KB N/A N/A 1.9KB N/A
lab/CommentPin N/A 52.5KB N/A N/A 1.2KB N/A
lab/CommentThread N/A 234.2KB N/A N/A 2.4KB N/A
lab/Comments N/A 243.5KB N/A N/A 2.5KB N/A
lab/DiffViewer N/A 46.3KB N/A N/A 2.1KB N/A
lab/EmojiPicker N/A 68.1KB N/A N/A 722B N/A
lab/InfoTip N/A 26.4KB N/A N/A 458B N/A
lab/ListInput N/A 81.2KB N/A N/A 1.6KB N/A
lab/MobilePowerSearch N/A 162.7KB N/A N/A 1.4KB N/A
lab/MobileTokenizer N/A 108.5KB N/A N/A 809B N/A
lab/Schedule N/A 66.4KB N/A N/A 3.9KB N/A
lab/TourStep N/A 72.6KB N/A N/A 590B N/A
lab/TransferList N/A 73.1KB N/A N/A 1.7KB N/A
lab/TransferListSelector N/A 78.7KB N/A N/A 1.9KB N/A
richtext/RichTextEditor N/A 276.0KB N/A N/A 2.6KB N/A
richtext/RichTextEditorToolbar N/A 219.2KB N/A N/A 454B N/A
richtext/RichTextView N/A 256.4KB N/A N/A 2.3KB N/A

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/AlertDialog +4.5KB ⚠️ +61B
core/AppShell +3.7KB ⚠️ +60B
core/Avatar +4.5KB ⚠️ +53B
core/AvatarGroup +4.5KB ⚠️ +51B
core/AvatarGroupOverflow +4.6KB ⚠️ +54B
core/Banner +4.6KB ⚠️ +63B
core/BaseTypeahead +4.6KB ⚠️ +80B
core/BottomSheet +15.2KB ⚠️ +2B
core/BreadcrumbItem +4.6KB ⚠️ +50B
core/Button +4.6KB ⚠️ +65B
core/Calendar +4.6KB ⚠️ +61B
core/Carousel +6.0KB ⚠️ +64B
core/ChatComposer +5.1KB ⚠️ +60B
core/ChatComposerInput +5.0KB ⚠️ +63B
core/ChatComposerTokenElement +5.0KB ⚠️ +63B
core/ChatDictationButton +4.6KB ⚠️ +64B
core/ChatLayout +17.4KB ⚠️ +100B
core/ChatLayoutScrollButton +4.6KB ⚠️ +67B
core/ChatSendButton +4.6KB ⚠️ +63B
core/CheckboxInput +4.6KB ⚠️ +63B
core/CheckboxList +4.5KB ⚠️ +50B
core/CheckboxListItem +4.6KB ⚠️ +60B
core/CodeBlock +4.6KB ⚠️ +61B
core/ComplexSelector +4.6KB ⚠️ +64B
core/ContextMenu +5.9KB ⚠️ +62B
core/ContextMenuItem +6.0KB ⚠️ +64B
core/DateInput +15.2KB ⚠️ +73B
core/DateRangeInput +5.7KB ⚠️ +60B
core/DateTimeInput +15.1KB ⚠️ +70B
core/DialogHeader +4.6KB ⚠️ +62B
core/DrawerHeader +4.6KB ⚠️ +60B
core/DropdownMenu +5.9KB ⚠️ +72B
core/DropdownMenuSubMenu +4.6KB ⚠️ +67B
core/Field +4.5KB ⚠️ +52B
core/FieldLabel +4.5KB ⚠️ +52B
core/FileInput +4.6KB ⚠️ +61B
core/HoverCard +4.5KB ⚠️ +51B
core/IconButton +4.6KB ⚠️ +65B
core/InputGroup +4.5KB ⚠️ +51B
core/LayerProvider +4.5KB ⚠️ +64B
core/Lightbox +4.6KB ⚠️ +64B
core/Link +4.6KB ⚠️ +56B
core/ListItem +4.6KB ⚠️ +60B
core/Markdown +6.0KB ⚠️ +62B
core/MobileNav +4.6KB ⚠️ +61B
core/MobileNavToggle +4.6KB ⚠️ +65B
core/MoreMenu +5.8KB ⚠️ +72B
core/MultiSelector +6.1KB ⚠️ +88B
core/NumberInput +4.6KB ⚠️ +59B
core/Pagination +5.9KB ⚠️ +90B
core/Popover +17.0KB ⚠️ +62B
core/PowerSearch +13.8KB ⚠️ +92B
core/RadioList +4.5KB ⚠️ +51B
core/RadioListItem +4.6KB ⚠️ +60B
core/SegmentedControl +4.5KB ⚠️ +52B
core/Selector +5.9KB ⚠️ +88B
core/SideNav +3.7KB ⚠️ +62B
core/SideNavCollapseButton +4.6KB ⚠️ +63B
core/SideNavHeading +4.6KB ⚠️ +63B
core/SideNavItem +4.6KB ⚠️ +63B
core/Slider +4.5KB ⚠️ +51B
core/StatusDot +4.5KB ⚠️ +51B
core/Stepper +4.6KB ⚠️ +63B
core/Switch +4.6KB ⚠️ +63B
core/TabList +4.5KB ⚠️ +50B
core/TabMenu +4.6KB ⚠️ +64B
core/Table +5.7KB ⚠️ +60B
core/TableCell +5.9KB ⚠️ +59B
core/TableHeaderCell +5.9KB ⚠️ +60B
core/TableSelectionToolbar +4.6KB ⚠️ +61B
core/TextArea +4.5KB ⚠️ +60B
core/TextInput +4.6KB ⚠️ +64B
core/Thumbnail +4.6KB ⚠️ +62B
core/TimeInput +15.6KB ⚠️ +61B
core/Toast +4.6KB ⚠️ +62B
core/ToggleButton +4.6KB ⚠️ +65B
core/Tokenizer +6.2KB ⚠️ +101B
core/Toolbar +4.6KB ⚠️ +52B
core/Tooltip +4.5KB ⚠️ +50B
core/TopNav +4.6KB ⚠️ +61B
core/TopNavHeading +4.6KB ⚠️ +66B
core/TopNavMegaMenu +4.6KB ⚠️ +62B
core/TopNavMenu +4.6KB ⚠️ +65B
core/Typeahead +4.6KB ⚠️ +78B

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 35.4KB 35.5KB +102B

Accessibility Audit

Status: 2 accessibility violation(s) found — 2 serious.

ChatComposer - 1 issue(s)
  • 🟠 serious: Ensure the contrast between foreground and background colors meets WCAG 2 AA minimum contrast ratio thresholds
    • Rule: color-contrast · Affects 1/19 stories · Learn more
    • WCAG: 1.4.3 (Level AA)
ChatComposerInput - 1 issue(s)
  • 🟠 serious: Ensure the contrast between foreground and background colors meets WCAG 2 AA minimum contrast ratio thresholds
    • Rule: color-contrast · Affects 1/18 stories · Learn more
    • WCAG: 1.4.3 (Level AA)

Visual Regression

55 of 504 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 440,175
Chat Full AI Chat probe dark 438,105
AppShell With Mobile Nav probe light 217,010
AppShell With Mobile Nav probe dark 216,960
Chat Empty State probe light 122,185
Chat Empty State probe dark 120,076
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
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 decision before it can be approved: no current spec states that a Popover should shrink above the software keyboard (AST-059 FR3 allows a component's lower cap, but AST-059 DEC-1 and the layer runtime's INV11 give the viewport inset to the layer), and the pull request also adds unapproved requirements in the draft AST-094, in useMenuPress (FR9, DEC-8 and the touch open row) and in DropdownMenu FR8. An engineering owner can provide or identify the governing spec for the keyboard rule (component Popover, AST-094 or the layer runtime) and record the decision by commenting /approve-spec 3c17f4ffe30c4d670e599e52ca23eb255dd7b206 on this pull request; the author may do so as an engineering owner. Whatever the ruling, these need fixing:

  • usePopoverKeyboardAvoidance removes a caller's inline max-block-size and overflow-y from the surface on every close, so a Popover given style={{maxBlockSize: 160}} reopens uncapped.
  • With the keyboard up, tapping the scrolled-in Save button lands no click in Chromium touch, because the blur restores the full height between mousedown and mouseup.
  • A popover placed above its trigger is re-positioned rather than shortened from its top, and still ends under the keyboard.
  • The useMenuPress record lists a 500 ms long-press delay while the code defaults to 150 ms.
  • The compare holds 33,282 authored lines from the dependency stack; land those first so this pull request carries only its 702-line change.

[Automated review]

Comment on lines +109 to +112
const restore = () => {
style.removeProperty('max-block-size');
style.removeProperty('overflow-y');
};

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

restore() removes max-block-size and overflow-y from the surface whether or not this hook set them, and it runs on every close (cleanup) and before every re-measure. The surface also carries the caller's style prop, which React re-applies only when it changes, so a <Popover style={{maxBlockSize: 160, overflowY: 'auto'}}> reopens uncapped after its first close (Chromium: 160 px on the base, 381 px here). Remember what the hook wrote and remove only that, or restore the previous inline values.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in cd5c2f1: the hook records the caller's inline max-block-size and overflow-y when the popover opens and puts them back when its cap comes off, so it removes only what it wrote. Unit cases cover a style cap that needs no keyboard cap and one under it; both failed before.

Comment on lines +154 to +155
// Falling (it uncovers the full height as it goes) or at once.
avoid(transition.to);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

A tap on a button in the capped popover blurs the field, the guide publishes a predicted hide from focusout, and this restores the full height between mousedown and mouseup. In Chromium touch the tap on the scrolled-in Save note then sends mouseup to a tip and click to the content: Save gets no click. Keeping the cap until the hide's start (or until the click has dispatched) would let the tap land; worth a case in PopoverKeyboard.interaction.browser.spec.ts.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in cd5c2f1: while a pointer that went down inside the popover is pressed, a falling keyboard's height change waits for that press's click, or for 350 ms after a lift that makes no click. A new Chromium case, "with the keyboard up, a tap on the scrolled-in Save note clicks it", failed before (0 clicks) and passes now; unit cases cover both the click and the no-click paths.

Comment on lines +56 to +60
const limit = viewportHeight - inset - popover.keyboardClearancePx;
if (surface.bottom <= limit) {
return null;
}
return Math.max(0, limit - surface.top);

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 assumes the surface's top stays where it is, but the layer re-positions the shorter box from its anchored side. A popover placed above a trigger near the bottom, capped to 351 px, moved from 16–505 px to 131–482 px and still ended 105 px under a keyboard top at 377 px. Compute the cap from the edge the layer holds, or skip it when it cannot bring the bottom above the keyboard.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in cd5c2f1: after capping, the hook measures again. If the bottom did not come up, because the layer holds the bottom edge (a popover above its trigger), it takes the cap off and leaves the popover where the layer placed it. The unit case "leaves a popover whose bottom the layer holds as it is" failed before.

@@ -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 says 500 ms, while useMenuPress.ts now defaults longPressDelayMs to 150 ms (menu.holdOpenMs, plus 150 ms inside a scroller). An owner approving this record would approve a number the code does not ship; please update the row, or the code.

@vjeux vjeux Oct 24, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This record comes from the DropdownMenu press change below this one in the stack, and that change is being brought in line with the code (the 150 ms hold-open and continueGesture). Nothing to change in this pull request.

@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 decision before it can be approved: no current spec says a Popover should shrink above the software keyboard (AST-059 FR3 allows a component's lower cap, but AST-059 DEC-1 and the layer runtime's INV11 give the viewport inset to the layer), and the pull request also adds unapproved requirements in the draft AST-094, in useMenuPress (FR9, DEC-8 and the touch open row) and in DropdownMenu FR8. An engineering owner can name the record that should govern the keyboard rule (Popover, AST-094 or the layer runtime) and record the decision by commenting /approve-spec fc6757e15246a0f0b1fc6c91005eb39397aad18e on this pull request; the author may do so as an engineering owner. Whatever the ruling, these need fixing:

  • usePopoverKeyboardAvoidance removes a caller's inline max-block-size and overflow-y from the surface on every close, so a Popover given style={{maxBlockSize: 160}} reopens uncapped.
  • A tap on a button in the capped popover blurs the field, and the full height comes back between the tap's press and release, so the tap can miss the Save button the cap made reachable.
  • A popover placed above its trigger is shortened from its top and still ends under the keyboard.
  • The useMenuPress record lists a 500 ms long-press delay while the code defaults to 150 ms, and AST-094 FR13 does not state the iOS-only rule that Popover now follows and DropdownMenu does not.
  • The compare holds 33,976 authored lines from the dependency stack; land those first so this pull request carries only its 780-line change.

[Automated review]

Comment on lines +111 to +114
const restore = () => {
style.removeProperty('max-block-size');
style.removeProperty('overflow-y');
};

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

restore() removes max-block-size and overflow-y from the surface whether or not this hook set them, and it runs before every measurement and on every close (:189). A caller's style={{maxBlockSize: 160, overflowY: 'auto'}} is merged onto this same element, and React will not write it again while its value is unchanged, so the Popover reopens without it. Remember the inline values before the first write and put exactly those back.

Comment on lines +178 to +179
// Falling (it uncovers the full height as it goes) or at once.
avoid(transition.to);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

A tap on a button in the capped popover blurs the field; the guide publishes a predicted hide from focusout, and this branch restores the full height at once, between the tap's mousedown and mouseup, so the click can land elsewhere than the Save the cap made reachable. Keep the cap until the viewport shows the keyboard going down, or until the tap's click has dispatched.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in cd5c2f1, as in the thread above: the cap holds through a press inside the popover until its click, and the Chromium Save-tap case covers it.

if (surface.bottom <= limit) {
return null;
}
return Math.max(0, limit - surface.top);

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 assumes the top edge stays put, but the layer places the popover with position-area: a popover above its trigger keeps its bottom edge, so the shorter box moves its top down and still ends under the keyboard. Compute the cap from the edge the layer holds, or skip it when it cannot clear the keyboard.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in cd5c2f1, as in the thread above: when the layer holds the bottom edge, the cap comes off and the popover is left where it is.

@@ -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 says 500 ms, while useMenuPress.ts now defaults longPressDelayMs to 150 ms (menu.holdOpenMs, and 300 ms inside a scrolling region). An owner approving this record would approve a number the code does not ship.

@vjeux vjeux Oct 24, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This record comes from the DropdownMenu press change below this one in the stack, and that change is being brought in line with the code (the 150 ms hold-open and continueGesture). Nothing to change in this pull request.

@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 decision before it can be approved: no current spec says a Popover should shrink above the software keyboard (AST-059 FR3 allows a component's lower cap, while AST-059 DEC-1 and the layer runtime's INV11 give the viewport inset to the layer), and the pull request also adds unapproved requirements in the draft AST-094, in useMenuPress (FR9, DEC-8 and the touch open row) and in DropdownMenu FR8. An engineering owner can name the record that should govern the keyboard rule (Popover, AST-094 or the layer runtime) and record the decision by commenting /approve-spec 84ceb521692e1e863e2cf46f77a7608b1c9838b5 on this pull request; the author may do so as an engineering owner. Whatever the ruling, these need fixing:

  • usePopoverKeyboardAvoidance removes a caller's inline max-block-size and overflow-y from the surface on every close, so a Popover given style={{maxBlockSize: 160}} reopens uncapped.
  • A Popover whose content fits now declares touch-action: none, which blocks page pinch-zoom over it; pinch-zoom, as the menus use, keeps the page still and zoomable.
  • The 744 px compact test contradicts AST-012 FR9 (width below 768 px or height below 500 px), and the touch Reduce Motion fades run longer than the 200 ms that the reduced-motion design rule allows.
  • A tap on a button in the capped popover restores the full height between press and release, and a popover placed above its trigger is shortened from its top and still ends under the keyboard.
  • The useMenuPress record says 500 ms and "the same settle rule" where the code ships 150 ms and a 10 px handoff, and the compare holds 34,027 authored lines from the dependency stack; land those first so this pull request carries only its 780-line change.

[Automated review]

const {style} = surface;
let isDisposed = false;
const guide = getKeyboardLayoutGuide(win);
const restore = () => {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

restore() removes max-block-size and overflow-y from the surface whether or not this hook set them, and it runs before every measurement and on every close. The surface stays mounted while closed and React re-writes a caller's style only when its value changes, so a Popover given style={{maxBlockSize: 160, overflowY: 'auto'}} reopens without them. Recording the inline values before the first write and putting exactly those back would keep the caller's styles.

return;
}
// Falling (it uncovers the full height as it goes) or at once.
avoid(transition.to);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

A tap on a button in the capped popover blurs the field; the guide publishes a predicted hide from focusout, and this branch restores the full height at once, between the tap's mousedown and mouseup, so the click can land on another element than the Save it was aimed at. Keeping the cap until the viewport reports the keyboard going down (or the tap's click has dispatched) avoids that.

if (surface.bottom <= limit) {
return null;
}
return Math.max(0, limit - surface.top);

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 assumes the top edge holds, but the layer places the box with position-area against its trigger: a popover above its trigger keeps its bottom edge, so the cap moves its top down and its bottom stays under the keyboard.

Comment thread packages/core/src/Popover/Popover.tsx Outdated
// scroll: the page behind the popover stays where it is, as it does
// behind a UIKit popover. A scrolling surface keeps its own pan above.
surfaceStill: {
touchAction: 'none',

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

touch-action: none also stops page pinch-zoom for any finger that lands on the popover, on every touch screen. pinch-zoom still admits no one-finger pan and leaves the pinch to the browser, which is what DropdownMenu does for a menu whose rows fit (touchPinchZoom) and what draft AST-094 FR10 asks for.

export const TOUCH_QUERY = '(pointer: coarse)';

/** The viewport is compact: layout behaviours. */
export const COMPACT_QUERY = '(width < 744px), (height < 500px)';

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Current AST-012 FR9 defines compact as a viewport width below the effective md point (768) or a height below 500, and says the web touch presentation resolver keeps no size numbers of its own. With 744 here, a coarse-pointer screen 744–767 px wide and at least 500 px tall gets the popover where FR9 makes it compact.

prefersReducedMotion: boolean,
): SpringDescription {
if (prefersReducedMotion) {
return springs.menuReducedMotion;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Under reduced motion with a coarse pointer, the current reduced-motion design rule (DR2) asks for an opacity-only fade that finishes in 200 ms or less. menuReducedMotion is a 0.4 s critically damped spring, about 82% of the way at 200 ms.

@@ -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 says 500 ms, while useMenuPress.ts now defaults longPressDelayMs to 150 ms (menu.holdOpenMs, and 300 ms inside a scrolling region). An owner approving the record would approve a number the code does not ship.

| FR7 | While a press is tracked in a menu that scrolls, a pointer resting within the edge zone of the menu's top or bottom MUST scroll the menu toward that edge and re-read the row under the pointer as the rows move. | `useMenuPress.test.tsx` autoscroll case | verify |
| FR8 | On a mouse a DropdownMenu trigger MUST open its menu on press-down (button 0, no Control), and a drag from the trigger into the menu that releases over an enabled row MUST act on it. The opening gesture's release MUST act only if the pointer entered the menu or the press lasted the settle time; otherwise nothing acts and the menu stays open. Pressing the trigger of an open menu MUST close it and MUST NOT reopen it in the same gesture. | Proposed DEC-4; `DropdownMenu.test.tsx` press model suite, `menuPressGesture.test.ts` trigger states | proposed; pending owner review |
| FR9 | Under a finger a tap on the trigger MUST open the menu through its click. A press held on the trigger for the long-press delay MUST open the menu with the finger down, prevent the default of the finger's later `touchmove`s until the gesture ends, and continue under FR1–FR4 with the same settle rule. | Proposed DEC-4; `DropdownMenu.test.tsx` held-touch case, `useMenuPress.test.tsx` | proposed; pending owner review |
| FR9 | By default a finger's tap on the trigger MUST open the menu through its click, and a press held for the long-press delay MUST open it with the finger down and prevent the default of the finger's later `touchmove`s until the gesture ends. With touch open `press` the press-down MUST open it at once, and a cancel before the pointer enters the menu MUST close it again. Both continue under FR1–FR4 with the same settle rule. | Proposed DEC-4, DEC-8; `DropdownMenu.test.tsx` touch cases, `useMenuPress.test.tsx` | proposed; pending owner review |

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Both finger opens are said to continue "with the same settle rule", but under a finger the machine replaces the settle rule with a 10 px handoff (MENU_PRESS_HANDOFF_PX, menuPressGesture.ts:324-349, :364-369) that no record states.

@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 decision before it can be approved: no current spec says a Popover should shrink above the software keyboard (AST-059 FR3 allows a component's lower cap, while AST-059 DEC-1 and the layer runtime's INV11 give the viewport inset to the layer), and the pull request also adds unapproved requirements in the draft AST-094, in useMenuPress (FR9, DEC-8 and the touch open row) and in DropdownMenu FR8. An engineering owner can name the record that should govern the keyboard rule (Popover, AST-094 or the layer runtime) and record the decision by commenting /approve-spec cd5c2f1acdb0b4b961199b57d1626232d5ca494c on this pull request; the author may do so as an engineering owner. The inline-style, mid-tap and above-trigger fixes in this push look right in the code; whatever the ruling, these still need fixing:

  • A Popover whose content fits declares touch-action: none, which blocks page pinch-zoom over it; pinch-zoom, as the menus use, keeps the page still and zoomable.
  • The 744 px compact test contradicts AST-012 FR9 (width below 768 px or height below 500 px), and the touch Reduce Motion fades run longer than the 200 ms the reduced-motion design rule allows.
  • The useMenuPress record says 500 ms and "the same settle rule" where the code ships 150 ms and a 10 px handoff, and AST-094 FR13 keys touch behaviour on a coarse pointer where Popover keys on WebKit on iOS.
  • The compare holds 34,358 authored lines from the dependency stack; land those first so this pull request carries only its 993-line change.

[Automated review]

Comment thread packages/core/src/Popover/Popover.tsx Outdated
// scroll: the page behind the popover stays where it is, as it does
// behind a UIKit popover. A scrolling surface keeps its own pan above.
surfaceStill: {
touchAction: 'none',

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

touch-action: none also stops page pinch-zoom for any pinch that starts on a Popover whose content fits, on every touch screen. The menus keep the pinch with touch-action: pinch-zoom (current useMenuPress FR4), and this head's own draft AST-094 FR10 and FR18 say page pinch-zoom must stay the browser's. pinch-zoom still admits no one-finger pan, so the page behind stays still.

export const TOUCH_QUERY = '(pointer: coarse)';

/** The viewport is compact: layout behaviours. */
export const COMPACT_QUERY = '(width < 744px), (height < 500px)';

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Current AST-012 FR9 defines compact as a viewport width below the effective md point (768) or a height below 500, and says the web touch presentation resolver keeps no size numbers of its own. With 744 here, a coarse-pointer screen 744–767 px wide (an iPad mini in portrait) gets the anchored popover in every adaptive presentation instead of the sheet.

prefersReducedMotion: boolean,
): SpringDescription {
if (prefersReducedMotion) {
return springs.menuReducedMotion;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Under reduced motion with a coarse pointer, current design rule DR2 asks for an opacity-only fade that finishes in 200 ms or less. springs.menuReducedMotion (response 0.4 s, critically damped) is about 82% of the way at 200 ms and settles near 420 ms; the iOS Popover's springs.popoverPresent fade settles near 350 ms.

@@ -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 says 500 ms, while useMenuPress.ts defaults longPressDelayMs to 150 ms (menu.holdOpenMs), and 300 ms inside a scrolling region. An owner approving the record would approve a number the code does not ship.

| FR7 | While a press is tracked in a menu that scrolls, a pointer resting within the edge zone of the menu's top or bottom MUST scroll the menu toward that edge and re-read the row under the pointer as the rows move. | `useMenuPress.test.tsx` autoscroll case | verify |
| FR8 | On a mouse a DropdownMenu trigger MUST open its menu on press-down (button 0, no Control), and a drag from the trigger into the menu that releases over an enabled row MUST act on it. The opening gesture's release MUST act only if the pointer entered the menu or the press lasted the settle time; otherwise nothing acts and the menu stays open. Pressing the trigger of an open menu MUST close it and MUST NOT reopen it in the same gesture. | Proposed DEC-4; `DropdownMenu.test.tsx` press model suite, `menuPressGesture.test.ts` trigger states | proposed; pending owner review |
| FR9 | Under a finger a tap on the trigger MUST open the menu through its click. A press held on the trigger for the long-press delay MUST open the menu with the finger down, prevent the default of the finger's later `touchmove`s until the gesture ends, and continue under FR1–FR4 with the same settle rule. | Proposed DEC-4; `DropdownMenu.test.tsx` held-touch case, `useMenuPress.test.tsx` | proposed; pending owner review |
| FR9 | By default a finger's tap on the trigger MUST open the menu through its click, and a press held for the long-press delay MUST open it with the finger down and prevent the default of the finger's later `touchmove`s until the gesture ends. With touch open `press` the press-down MUST open it at once, and a cancel before the pointer enters the menu MUST close it again. Both continue under FR1–FR4 with the same settle rule. | Proposed DEC-4, DEC-8; `DropdownMenu.test.tsx` touch cases, `useMenuPress.test.tsx` | proposed; pending owner review |

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Both finger opens are said to continue "with the same settle rule", but under a finger the machine hands off after MENU_PRESS_HANDOFF_PX of travel instead (menuPressGesture.ts:324-368), which no record states.

vjeux added 25 commits October 29, 2026 10:08
…roller, and its claimed moves are cancelled under pointer events

Two comparisons stop at the shadow boundary, each failing a case:
- once the host's listener on a recognizer's inner node has seen the
  finger, isFingerDownIn reads it as outside a light-DOM scroller around
  that root, so a scroll under it is not the finger's (FR20);
- under inputMode 'pointer-events', a claimed pan on a shadow host
  cancels none of its finger's moves over the inner content, since the
  finger's target is the inner node and its touches reach the host
  retargeted (FR19).
…the flat tree

isFingerDownIn and the pointer-events finger match compare with
containsAlongFlatTree, as the scroll watch already does: a finger on
content inside an open shadow root is down in the scroller around that
root, and its touches, retargeted to the shadow host, match its pointer
finger, so a claimed pan cancels its moves there (spec:AST-094 FR19,
FR20).
…achments asks, and only then

The host let the last attachment decide whether an element is an action
group (useGestureRecognizer always passes the option), and never
recomputed it at a detach: a plain attachment after the group's turned
the group off, and a group's attachment released left a recognizer that
never asked taking presses under a fine pointer. Fails until the host
counts the attachments that ask.
…ents asks

The host counts the attachments that pass actionGroup: true and keeps the
element a group while one remains, recomputed at each detach. An
attachment that passes false, as useGestureRecognizer does by default,
no longer turns a group off, and a group's last asking attachment taking
its leave ends the group.
… that content

The presented hit test takes the document's elementFromPoint, which
answers a shadow host for anything inside its open root, and compares
with Node.contains, which stops at the boundary: a recognizer on a
control inside a moving sheet's shadow root gets no finger, and the tap's
click goes to the host. Fails until the hit test descends into open roots
and compares along the flat tree.
Where a moving element is drawn away from its layout box, the host
hit-tests what is drawn under the finger with the document's
elementFromPoint, which answers a shadow host for anything inside its
open root. The hit test now descends through each open root's own
elementFromPoint and compares with the movers along the flat tree, so a
recognizer on a control inside a moving sheet's shadow root gets its
finger and the tap clicks that control.
…nt lets go

The host's touch-action rules sit in an adopted sheet or a style element
per document or shadow root, and were never removed, so a page whose
last recognizer detached kept them, against spec:AST-094 FR24 (nothing
touch-related remains after the last instance unmounts). Fails until a
root's rules go with its last marked element.
…th its last marked element

The touch-action writer records which elements it marked in each
document or shadow root, and when the last one is unmarked (its last
recognizer detached) it removes that root's adopted sheet or style
element, so nothing touch-related remains after the last instance
unmounts (spec:AST-094 FR24). A later mark writes the rules again; an
element marked in another root first lets go of the old one.
… the inline style it reads

- The motion registry, the host's engine gate and the README name the
  presented hit test as an engine workaround (spec:AST-013 FR6) with its
  review condition (re-measure on each iOS release; remove it once iOS
  WebKit hit-tests a compositor-moved element where it is drawn) and its
  regression fixture.
- While a curve runs the animator holds the value it starts from inline,
  so presentation.ts and the README no longer say the inline style holds
  the end.
…core/internal/touch

Core ships the internal entry @astryxdesign/core/internal/touch, which
re-exports the gesture primitives for Astryx's own packages, and the
Lab-import guard fails a Lab import of core outside core's exports
(architecture:react-component-runtime INV13). The README and the barrel's
header named internal workspace imports and said nothing here is
exported; they now name that entry.
…ill needs the element, and the listeners that cancel

The release note, the stream's header, the host's comment and the README
said the stream is one passive listener per event type and that a
document-capture stopPropagation no longer starves the recognizers. Such a
stop never hid a listener on the same node, and some subscriptions cancel.
They now say what changed: an app's window-capture stopPropagation, or a
document-capture stopImmediatePropagation registered before core, no
longer hides a touch; a recognizer that must claim still needs the touch to
reach its element; the gesture host's touchend, click and contextmenu
cancel while a claimer is attached and the page hold's touchmove while it
holds; and the stream stays ahead of an app's window-capture listener only
until a type's listener is re-added. The README's list of blocking
touchmove listeners gains the claimed touch's target and the document
while a claiming element moves.
…default it moves

The {stylexOptions} form of astryxStylex now passes StyleX
treeshakeCompensation: true unless the caller sets it. spec:AST-017 FR3
asks the release note to name the old and new default and the option
that restores the old one; it now does.
…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.
…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.
BottomSheet.test.tsx's imports from both sides are kept; the search goldens
are regenerated after the remaining merges.
meta#8360 carries the gesture foundation this branch took from meta#8076. The only
conflict was the shared motion tables list in tableImports.test.ts, where
this branch adds the keyboard table and meta#8360 the long-press table; both
entries are kept, meta#8360's text unchanged.
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.
… guide

The keyboard layout guide (this pull request) reads where focus moves to tell
a keyboard that comes up from one that stays: meta#8559 removed the store's focus
reports because nothing there read them, so they return here with their first
reader. One pair of capture listeners on the document, attached while
anything subscribes, reports each focusin and focusout with the current
height; BottomSheet's reveal still acts on viewport reports only.
Conflicts were in this stack's own keyboard files: the browser-support
sentence keeps ChatLayout's composer and takes meta#8559's page wording,
BottomSheet's test imports follow the sheetKeyboard split, and the keyboard
notes keep both the sheet's and ChatLayout's Chrome 124 findings. The search
goldens are regenerated after the merge.
…op-level page

The composer's tap route, its scroll-free focus and Done's park attach only
where the keyboard is measurable, which excludes a page inside an iframe
(spec:AST-099 FR7); there the browser's own focus applies. The docs and
changeset now say so.
…e Popover touch presentation

AST-057 takes the dependencies' text, which is main's (meta#8646): the tuning bullet this branch once restored is superseded, and the Popover touch presentation does not touch row actions.
…he keyboard avoidance

The CLI's icon-set search goldens are the isolation test's regenerated output, which equals meta#8187's.
… ChatLayout

BottomSheet's useSheetKeyboard moved to keyboard/sheetKeyboard.ts, and it
subscribes to the keyboard layout guide and rides Gboard with rideKeyboard
as ChatLayout does, but the two modules' headers named only ChatLayout, and
BottomSheetPanel's related-files list and the keyboard notes still pointed
at keyboardHeight.ts. They now name the hook and its file.
@vjeux
vjeux marked this pull request as draft October 29, 2026 22:33

@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 decision about spec text this pull request carries from its dependencies: architecture:layer-runtime INV13 and its Exit copy section (from #8186), and two new spec:AST-057 sentences that put the row swipe's slide and spring on theme motion roles, neither of which is on main or approved for this revision. An engineering owner records that decision by commenting /approve-spec 33c21c5efa2c42ed166a9fa00e17eb3d2540c415 on this pull request, and the author may do so as an engineering owner; otherwise INV13 should land through #8186 and the AST-057 sentences go back to main's text. The keyboard cap itself follows current spec:AST-059 FR8–FR10, and two changes are needed whatever that decision is:

  • Land or rebase the dependency stack so this pull request holds only the 2,368-line keyboard cap; today 41,264 of its 43,632 authored lines come from fourteen open dependency pull requests.
  • Bring architecture:layer-runtime INV11, INV12 and its owning code along with the cap, as the current-state impact in spec:AST-059 describes, or get an engineering owner's agreement that the record may follow.

[Automated review]

Comment on lines +134 to +138
- **Gesture tuning.** Axis-lock distance, commit ratio, fling velocity,
resistance past the panel: behavior constants in source, not public API and
not design tokens (the same ruling the touch press model received for its
clocks). The row's slide and spring motion plays on theme motion roles
(`spec:AST-094` FR4).

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

These sentences arrived with the #8186 merge and are not on main: current spec:AST-057 keeps "slide and spring durations" among the swipe's behavior constants ("not public API and not design tokens"), and no row-swipe code is in this pull request. Restore main's text here and under the API table (lines 223-226), unless an engineering owner approves the change for this head.

correct, and the runtime polls nothing: an anchor that a scrolled
container hides is followed again when an intersection observer reports it
back in view.
- **INV13 — One exit copy per closing layer.** A layer's close plays on at most

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

INV13 and the Exit copy section come from #8186 and are not on main; the text matches what was approved on earlier revisions, but this revision has no engineering-owner approval for it. It needs an /approve-spec for this head, or it should land only through #8186.

This branch was successfully deployed

1 active deployment
Preview — 33c21c5e 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