Skip to content

feat(lab): SearchField's bottom placement, iOS 26's toolbar field above the keyboard - #8216

Draft
vjeux wants to merge 1865 commits into
meta:mainfrom
vjeux:uikit/c09-search-bottom
Draft

vjeux wants to merge 1865 commits into
meta:mainfrom
vjeux:uikit/c09-search-bottom

Conversation

@vjeux

@vjeux vjeux commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Depends on #8181 and predecessors. Review only this PR's change: vjeux/astryx@ee835dc...fc37107

User need

iOS 26 puts a phone's search field in the bottom toolbar. Built naively, Safari pans the page up when it focuses, and the field must follow the keyboard, centred 36 pt above it.

Problem and solution fit

What led to it: the UIKit-parity program puts #8181's field in a bottom bar (placement="bottom"):

  • A 38 px field in the bottom bar; while active, its centre stays 36 px above the keyboard, placed at each keyboard report (spec:AST-099 FR2, FR8).
  • No page pan (FR4): under Safari a tap on the text is claimed (focus without scrolling, caret at the finger), as is focus by the next button or Tab; the tap's late mouse events are swallowed until their click, or the host's click guard (fix(core): one click guard for the menu press model and the gesture host #8360) takes it.
  • Under a finger, activation swells and narrows the field and grows a glass close button; cancel springs back. A mouse gets end states.

Current specification

spec:AST-094 FR1, FR2, FR13 and spec:AST-099 FR2, FR4, FR8. Pending owner review: the placement prop, and replaying measured frames.

Public delta and caller burden

New placement prop; internal search.bottom entries; one added element, bottom only (INV7), carrying the magnifier and query.

Size (gzip, base → head): SearchField JS 41.70 → 61.20 KB, CSS 1.47 → 1.54 KB.

Design and alternatives

  • One fitted spring for the swell: simpler, but 3.8 pt off the measured motion.
  • Lift the field just clear of the keyboard: iOS pins the centre instead.
  • Chosen: replay the measured frames and place the bar at each report; frames as data to maintain is in the owner review.

Not here: automatic placement, the minimized button, adaptive widths.

Evidence

iOS: activate above the keyboard, cancel Before the claim: the page pans Android: activate, cancel

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

What I ran and what it showed (the "Bottom" story):

  1. iOS 26.2 simulator, real taps: the bar's centre sits 36 pt above the keyboard once Safari reports it; the page never scrolls; cancel returns the bar to rest.
  2. With a text field above, the next button moves focus into the field without a pan.
  3. Android emulator, Chrome: the keyboard overlays the page, the field's centre 36 px above it.
  4. Chromium and WebKit: parts within half a pixel of the measured frames; no pan from a tap, Tab, or Done then a tap; reduced motion only fades.

Local runs are the evidence; no CI run is expected.

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

Request Review

@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

New Components

SearchField (@astryxdesign/lab) · View in Storybook
Metric Value
Entry File (ESM) 253B
Lines of Code 1376
Source Files 4
Complexity Very High (42)
Exports SearchField, type, type
Props Count N/A
Has Tests Yes
Has Stories Yes

Component Size

Component Import before Import after Delta CSS before CSS after Delta
core/AlertDialog 56.9KB 57.0KB +132B 12.4KB 12.4KB 0B
core/AppShell 57.9KB 58.0KB +106B 11.6KB 11.6KB 0B
core/AvatarGroupOverflow 39.9KB 40.0KB +141B 6.4KB 6.4KB 0B
core/Banner 47.8KB 47.9KB +138B 9.9KB 9.9KB 0B
core/BaseTypeahead 54.3KB 54.4KB +120B 9.9KB 9.9KB 0B
core/BreadcrumbItem 66.4KB 66.5KB +123B 11.0KB 11.0KB 0B
core/Button 43.3KB 43.4KB +115B 9.2KB 9.2KB 0B
core/Calendar 54.9KB 55.0KB +130B 10.0KB 10.0KB 0B
core/Carousel 50.2KB 50.3KB +97B 10.2KB 10.2KB 0B
core/ChatComposer 60.6KB 60.7KB +116B 10.8KB 10.8KB 0B
core/ChatComposerInput 55.7KB 55.9KB +113B 10.1KB 10.1KB 0B
core/ChatComposerTokenElement 55.7KB 55.9KB +115B 10.1KB 10.1KB 0B
core/ChatDictationButton 46.5KB 46.6KB +122B 9.5KB 9.5KB 0B
core/ChatLayout 48.8KB 49.0KB +115B 9.9KB 9.9KB 0B
core/ChatLayoutScrollButton 46.4KB 46.5KB +100B 9.6KB 9.6KB 0B
core/ChatSendButton 45.8KB 45.9KB +110B 9.2KB 9.2KB 0B
core/CheckboxInput 49.9KB 50.0KB +119B 9.3KB 9.3KB 0B
core/CheckboxListItem 54.0KB 54.1KB +108B 10.5KB 10.5KB 0B
core/ClickableCard 12.8KB 12.9KB +117B 6.9KB 6.9KB 0B
core/CodeBlock 60.5KB 60.6KB +120B 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 77.8KB +101B 14.6KB 14.6KB 0B
core/ContextMenuItem 16.6KB 16.7KB +117B 5.2KB 5.2KB 0B
core/DateInput 99.9KB 100.0KB +102B 14.8KB 14.8KB 0B
core/DateRangeInput 69.4KB 69.5KB +120B 11.2KB 11.2KB 0B
core/DateTimeInput 110.1KB 110.2KB +93B 15.2KB 15.2KB 0B
core/DialogHeader 48.8KB 48.9KB +115B 9.8KB 9.8KB 0B
core/DrawerHeader 48.9KB 49.0KB +113B 11.2KB 11.2KB 0B
core/DropdownMenu 72.7KB 72.8KB +124B 14.7KB 14.7KB 0B
core/DropdownMenuCheckboxItem 16.1KB 16.2KB +106B 5.6KB 5.6KB 0B
core/DropdownMenuItem 15.4KB 15.5KB +101B 5.2KB 5.2KB 0B
core/DropdownMenuRadioItem 16.2KB 16.3KB +110B 5.6KB 5.6KB 0B
core/DropdownMenuSubMenu 58.1KB 58.2KB +113B 9.5KB 9.5KB 0B
core/FileInput 54.1KB 54.2KB +117B 10.3KB 10.3KB 0B
core/IconButton 43.3KB 43.4KB +127B 9.2KB 9.2KB 0B
core/Item 11.4KB 11.5KB +98B 4.7KB 4.7KB 0B
core/LayerProvider 63.3KB 63.4KB +136B 10.1KB 10.1KB 0B
core/Lightbox 51.2KB 51.3KB +111B 9.8KB 9.8KB 0B
core/Link 43.5KB 43.6KB +124B 7.6KB 7.6KB 0B
core/ListItem 53.5KB 53.6KB +119B 10.5KB 10.5KB 0B
core/Markdown 144.5KB 144.5KB +94B 17.4KB 17.4KB 0B
core/MobileNav 51.0KB 51.1KB +113B 10.1KB 10.1KB 0B
core/MobileNavToggle 46.2KB 46.3KB +120B 9.4KB 9.4KB 0B
core/MoreMenu 72.9KB 73.0KB +121B 14.7KB 14.7KB 0B
core/MultiSelector 76.2KB 76.3KB +125B 14.6KB 14.6KB 0B
core/NumberInput 55.7KB 55.8KB +123B 10.7KB 10.7KB 0B
core/Outline 28.6KB 28.7KB +129B 4.0KB 4.0KB 0B
core/Pagination 87.7KB 87.8KB +120B 15.3KB 15.3KB 0B
core/Popover 49.8KB 49.9KB +99B 12.1KB 12.1KB 0B
core/PowerSearch 155.1KB 155.2KB +103B 18.6KB 18.6KB 0B
core/RadioListItem 52.1KB 52.3KB +126B 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.2KB +95B 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 +105B 9.5KB 9.5KB 0B
core/SideNavHeading 54.7KB 54.8KB +111B 10.1KB 10.1KB 0B
core/SideNavItem 54.5KB 54.6KB +112B 10.1KB 10.1KB 0B
core/Step 32.4KB 32.6KB +133B 5.3KB 5.3KB 0B
core/Stepper 47.4KB 47.5KB +120B 9.6KB 9.6KB 0B
core/Switch 48.4KB 48.5KB +126B 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 84.1KB +85B 15.1KB 15.1KB 0B
core/TableCell 78.8KB 78.9KB +103B 14.8KB 14.8KB 0B
core/TableHeaderCell 78.6KB 78.7KB +105B 14.8KB 14.8KB 0B
core/TableSelectionToolbar 52.4KB 52.5KB +112B 11.2KB 11.2KB 0B
core/TextInput 53.5KB 53.6KB +113B 10.5KB 10.5KB 0B
core/Thumbnail 50.7KB 50.8KB +117B 11.0KB 11.0KB 0B
core/TimeInput 86.8KB 86.9KB +98B 13.8KB 13.8KB 0B
core/Timestamp 27.5KB 27.5KB +16B 9.5KB 9.5KB 0B
core/Toast 59.8KB 60.0KB +120B 9.7KB 9.7KB 0B
core/ToggleButton 44.1KB 44.2KB +104B 9.3KB 9.3KB 0B
core/Token 29.6KB 29.7KB +127B 4.5KB 4.5KB 0B
core/Tokenizer 64.8KB 64.9KB +130B 11.7KB 11.7KB 0B
core/TopNav 51.9KB 52.0KB +119B 10.4KB 10.4KB 0B
core/TopNavHeading 54.2KB 54.3KB +116B 9.9KB 9.9KB 0B
core/TopNavItem 9.0KB 9.2KB +116B 3.8KB 3.8KB 0B
core/TopNavMegaMenu 54.2KB 54.3KB +136B 10.8KB 10.8KB 0B
core/TopNavMegaMenuItem 9.1KB 9.2KB +119B 4.1KB 4.1KB 0B
core/TopNavMenu 53.6KB 53.7KB +112B 10.1KB 10.1KB 0B
core/TreeList 32.5KB 32.7KB +128B 4.7KB 4.7KB 0B
core/Typeahead 61.5KB 61.6KB +116B 11.3KB 11.3KB 0B
lab/SearchField N/A 56.3KB N/A N/A 1.5KB 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.

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
@astryxdesign/lab 4.9KB 1.9KB 2.0KB +114B
Package stylesheet Gzip before Gzip after Delta
@astryxdesign/core 34.6KB 34.6KB 0B
@astryxdesign/lab 11.1KB 11.9KB +827B

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 pull request needs an engineering owner's decision before it can be approved: the new draft spec:AST-094 (FR1-FR23, DEC-1, DEC-2) and the placement="bottom" contract it is cited for, including the prop's name next to Core's existing placement ('above' | 'below' | 'start' | 'end'), have no current spec authority yet. An engineering owner records approval by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner; otherwise say what to amend. Whatever that decision, these changes are needed:

  • Land the nine stacked pull requests and rebase, so this pull request carries only its own commit (about 1,600 lines) instead of 32,002 authored lines.
  • A change of mind restarts the bottom field's frame tables at their first row, so the field snaps (43 px at the trailing edge for a cancel 153 ms into the activation, up to 60 px when the field is tapped again early in a cancel); start an interrupted move from the presented pose and add a proof for it.
  • Resolve the default Cancel and Clear text names through the translator, and add the record's ## Writing rubric results to the description.

[Automated review]

settledRef.current = target;
// iOS changes the field's frame each frame with no animation object:
// play the measured frames, every part on one clock.
const motion = bottomMotion(target, width);

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 change of mind lands here mid-move: bottomMotion(target, width) always starts the other frame table at its first row, so a cancel 153 ms into the activation moves the trailing edge from 352 px to 309 px in one frame on a 402 px screen. The stacked path starts from presented() with remainingFraction (lines 505-508) and has a mid-activation proof; entering the new table from the presented edges and height, with the same proof for the bottom placement, would remove the snap.

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 e4f2ea4: a change of mind no longer starts the other frame table at its first row. It adds an eased turn from the pose the field shows (read off its parts) to the curves on screen, on the activation's whole clock, as UIKit's animations add (the animator's additive). The interaction spec's "a cancel mid-activation turns around from where the field is, without a snap" and "focusing the field early in a cancel re-activates from where the field is" fail on the old head and pass here in Chromium and WebKit (continuous velocity, one turn, no step faster than the measured gel itself).

Comment on lines +384 to +385
cancelLabel = 'Cancel',
clearLabel = 'Clear text',

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 defaults become the close and clear buttons' accessible names, so screen-reader users of a localized app hear English unless both props are passed. Resolving the defaults through the translator, as lab's Comments components do, and keeping the props as overrides would follow the catalog rule for Astryx-owned strings.

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 below this PR: #8181 resolves both defaults through the translator (@astryx.searchField.cancel and @astryx.searchField.clear), with cancelLabel and clearLabel as overrides; this head (e4f2ea4) builds on it.

Comment thread .changeset/touch-presentation.md Outdated
'@astryxdesign/core': patch
---

[feat] `presentation="adaptive"` on DropdownMenu, ContextMenu, MoreMenu, Selector and MultiSelector chooses the bottom sheet on a compact touch screen: a coarse primary pointer and a viewport narrower than 744px or shorter than 500px (it was 768px wide and below). An iPad mini in portrait keeps the anchored popover; a phone in landscape now gets the sheet.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

At 744 px wide the old (max-width: 768px) and (pointer: coarse) query gave an iPad mini in portrait the bottom sheet, so it does not keep the anchored popover: it switches to it. Naming the 744 to 768 px change and the presentation value that keeps the sheet would tell upgraders what moves.

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 changeset is #8076's (the foundation under this stack). At this head it describes the theme's md point (768px by default): a coarse-pointer viewport narrower than it still gets the sheet, so an iPad mini in portrait (744px) keeps the bottom sheet, and only a screen exactly 768px wide switches to the popover. The wording is #8076's to settle.

@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 pull request needs an engineering owner's decision before it can be approved: the new draft spec:AST-094 and the placement="bottom" contract it is cited for have no current spec authority yet, including the prop's name next to Core's existing placement ('above' | 'below' | 'start' | 'end') and whether FR8's Reduce Motion cross-fade applies to a field that keeps its travel. An engineering owner records approval by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner; otherwise say what to amend. Whatever that decision, these changes are needed:

  • Land the ten stacked pull requests and rebase, so this pull request carries only its own commits (about 1,650 lines) instead of 32,128 authored lines.
  • A change of mind restarts the bottom field's frame tables at their first row, so the field snaps (43 px at the trailing edge for a cancel 153 ms into the activation, up to 60 px when the field is tapped again early in a cancel); start an interrupted move from the presented pose and add a proof for it.
  • Resolve the default Cancel and Clear text names through the translator, add the record's ## Writing rubric results to the description, and correct the adaptive-presentation Changeset's iPad mini statement.

[Automated review]

@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 pull request needs an engineering owner's decision before it can be approved: the new draft spec:AST-094 and the placement="bottom" contract it is cited for have no current spec authority yet, including the prop's name next to Core's existing placement ('above' | 'below' | 'start' | 'end'), whether FR8's Reduce Motion cross-fade applies to a field that keeps its travel, and whether FR4's rule that touch physics are not themable stands beside the theme motion roles this diff ships. An engineering owner records approval by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner; otherwise say what to amend. Whatever that decision, these changes are needed:

  • Land the thirteen stacked pull requests and rebase, so this pull request carries only its own commits (about 1,950 lines) instead of 36,900 authored lines.
  • A change of mind restarts the bottom field's frame tables at their first row, so the field snaps (43 px at the trailing edge for a cancel 153 ms into the activation, up to 60 px when the field is tapped again early in a cancel); start an interrupted move from the presented pose and add a proof for it.
  • Regenerate the docs-topics.json CLI golden so test-node (1/4) passes, resolve the default Cancel and Clear text names through the translator, add the record's ## Writing rubric results to the description, and correct the adaptive-presentation Changeset's iPad mini statement.

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

@vjeux
vjeux force-pushed the uikit/c09-search-bottom branch from 434f33d to e4f2ea4 Compare October 25, 2026 05:11
@vjeux vjeux changed the title feat(lab): SearchField's bottom placement rides the keyboard as iOS 26's toolbar field feat(lab): SearchField's bottom placement, iOS 26's toolbar field above the keyboard Oct 25, 2026
@github-actions github-actions Bot added the needs:design-review Affects visuals — Design should review label Oct 25, 2026
vjeux added 29 commits October 29, 2026 10:09
…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.
Takes meta#8360's head, which removes a document's or shadow root's
touch-action rules with its last marked element and names the build
changeset's treeshakeCompensation default, in place of 1e1431f.
…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.
…task ended at once, however late the first read

WebKit under load from other tasks: the call's task ends at once, another
task holds the main thread, and the browser commits the animation after
it, dated at the call. Nothing in the call's task delayed it, but the
first read still moved its start to the read, about 95 ms late on a
loaded box, so whatever chains on its end (the second half of a Reduce
Motion cross-fade, a cancel fading on the previous fade's end) ran that
much late and the cross-fade missed design:reduced-motion DR2's 200 ms.
Fails now: the start moves to 1100.
e7b0676 moved a call's start from rest to its first read whenever
WebKit had dated it more than two frames before that read. Under load
from other tasks the first read comes late with nothing in the call's
task delaying it, so the start moved about 95 ms on a loaded box, and
whatever chained on the call's end ran that late: the second half of a
Reduce Motion cross-fade, so SearchField's cancel missed DR2's 200 ms.
The call's task now records when it ended, at its first microtask (or a
read in those microtasks is that time), and only a call whose own task
ran past the call by more than two frames, the block e7b0676 fixed,
moves its start; a read other tasks delay keeps the browser's start.
…s its start past the block

Core Animation dates an animation at the commit, when the calling task
ends, however short the block before it. A 20 ms block in the call's task,
with WebKit's start dated at the call, left the start at the call: the
two-frame bound skipped it. Fails now.
… task, with no threshold

Core Animation dates an animation at the commit, when the calling task
ends, whatever the block's length. The call's task already records when
it ended, at its first microtask, so a start the browser dated before that
(WebKit's last frame time before the task) now moves to it: a task that
ended at once leaves the start at the call, a blocked one moves it past
the block, however short, and a read other tasks delay changes nothing.
The two-frame bound, which told a read's own frame from a block before the
task's end was known, goes, and the start no longer moves to the read.
…'s click guard has taken the click

The claimed tap swallows its own late mouse events until their click. With
meta#8360, the gesture host arms its click guard at the claimed lift, and the
guard takes that click first, on the window's capture phase, so the
swallow never saw it and stayed armed: the next press's mousedown, mouseup
and click never reached the page. The swallow now notes the guard while
it is armed and lets go once the guard has (its click, the next press, or
its window); with no guard it ends at the click, as before.
`internal/touch` re-exports `isClickGuardArmed` by name.

Red-first: "a claimed tap swallows its own late mouse events, until the
next touch" fails on the previous head (the second press's events are
swallowed) and passes in Chromium and WebKit with this change.
…few ms, and one task's calls start together

Browser start times are frame times, while a task's end is a live clock,
so on every call they differ by up to a frame plus the task's own length.
Moving every start from rest to its task's end shifted each one by that
length, about 5 ms in a component's effect after a tap, and the shift
added up along a chained sequence: SearchField's Reduce Motion cancel
measured 204-207 ms against design:reduced-motion DR2's 200. The first
case fails now (the start moves to 1010). The second keeps one motion's
parts together when they are separate calls in one task: a block
measured per call would split them by a frame.
…n on more than two frames, and all the task's calls move together

fc42d64 moved every start from rest to the end of the call's task.
Browser start times are frame times while that end is a live clock, so on
every call they differ by up to a frame plus the task's own length: each
start slid by that length, and a chained sequence added it up, about
5 ms per link in SearchField. The rule from e6876ca is back, with its
bound now named for that quantization: only a task that ran on more than
LATE_START_MS (two frames) past its first call blocked anything, and its
calls' starts move to their first read. The block is now measured per
task, not per call, and every call of a blocked task takes the same read,
so one motion's parts that are separate calls in one task (a component's
effect) start together instead of splitting by a frame. The 20 ms case
keeps the browser's start, as no clock here tells it from quantization.
…art moves only past a real block) into meta#8181 [skip ci]

@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: Lab SearchField's new placement prop and bottom layout have no governing spec, and the bottom placement's replayed iOS frames on a fixed 383.3 ms clock conflict with spec:AST-094 FR4, which requires named motion roles. 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; the owner can also say what to rename, amend or reject. Independently of that decision, these need changes:

  • Take the keyboard height from spec:AST-099 FR2's visual-viewport measurement in Chrome too, and stop setting overlaysContent (useKeyboardHeight.ts).
  • Let the gesture host's recognizers take input under every pointer, as spec:AST-094 FR19 and FR43 require (GestureHost.ts).
  • Gate the tap claim and its document blur listener on a coarse pointer, as spec:AST-094 FR24 requires (SearchFieldTouch.ts).
  • Land or split the predecessor work so this pull request carries only the bottom placement, and add the FR2 pan and pinch-zoom and FR7 iframe tests.

[Automated review]

const hold = () => {
if (appOverlay == null) {
appOverlay = keyboard.overlaysContent;
keyboard.overlaysContent = true;

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-099 FR6, FR8 and DEC-4 take the keyboard height from FR2's visual-viewport measurement in Chrome too, and FR8 says Astryx never overrides the app's own viewport setting. This branch sets overlaysContent and commits boundingRect.height instead; please measure by FR2 in every browser and leave overlaysContent alone.

const [claimsTap, setClaimsTap] = useState(false);
useLayoutEffect(() => {
const win = rootAnimator.animator.element?.ownerDocument.defaultView;
setClaimsTap(!isStacked && win != null && keyboardCoversPage(win));

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 gate has no pointer condition, so desktop Safari and Firefox (a visual viewport, no navigator.virtualKeyboard) also get the per-field document blur listener at lines 592-605 under a mouse, against spec:AST-094 FR24. Gating it like isLifted (!isStacked && isTouch && keyboardCoversPage(win)) keeps the claim to a finger.

* coarse, or with `perEventPointer` (FR19; `spec:AST-057`).
*/
private isActive(recognizer: GestureRecognizer): boolean {
return this.isCoarse || this.perEventRecognizers.has(recognizer);

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-094 FR19 and FR43 (DEC-21) now attach recognizers for every pointer, and INV13 says the host attaches with no touch-only query; this gate keeps every recognizer off under a fine pointer unless it opts into perEventPointer.

Comment on lines +512 to +514
useLayoutEffect(() => {
focusOptionsRef.current = focusOptions;
});

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 layout effect names no external system (architecture:react-component-runtime INV3). The options derive from placement alone, so the handle and the clear button can compute them from the prop, with placement in the handle's dependencies.

This branch was successfully deployed

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants