Skip to content

feat(lab): TabBar — a finger lifts, drags and drops the lens - #8141

Draft
vjeux wants to merge 1769 commits into
meta:mainfrom
vjeux:uikit/c15-tabbar-press
Draft

vjeux wants to merge 1769 commits into
meta:mainfrom
vjeux:uikit/c15-tabbar-press

Conversation

@vjeux

@vjeux vjeux commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Depends on #8129.

Review only this PR's change: vjeux/astryx@94bba42...ff6c905

User need

Part of matching Astryx's touch components to iOS 26, so apps built with it feel native on phones. On iOS a finger drags the tab bar's lens: it lifts, follows the finger and drops on another tab as the bar flexes. #8129 answers only a finished tap; a drag from the bar scrolls the page. This adds it, measured on iOS 26.2.

Problem and solution fit

  • Landing: the lens heads for the finger, lifts into glass and magnifies its item; the bar flexes.
  • Dragging (past 10 pt): the lens chases the finger, resisting past the ends.
  • Lifting: the nearest tab wins as the lens settles.
  • Under a mouse a click stays a click.

Current specification

spec:AST-094 FR17 (pans begin at 10 pt), FR13, FR25, FR8; spec:AST-017 FR21, DEC-27; architecture:interaction-modality INV10; architecture:react-component-runtime INV2 (the lift reports the choice).

Public delta and caller burden

No API change; uikit.tabBar gains the press values and internal/touch gains lockSelection and useGestureRecognizer.

Size, gzip against #8129's head: TabBar's import 40.3 → 59.4 KB JavaScript, 1,524 → 1,648 B CSS.

Design and alternatives

  • Chosen: each finger move retargets the lens's compositor springs, so it keeps its speed when the finger turns and through a busy main thread.
  • Rejected: following the finger 1:1 (UIKit's lens lags it); a clip-path mask (not composited in WebKit); reporting once the settle shows (a slow render would freeze it).
  • Owner decision (INV7): under a finger the travelling copy adds 22 elements until the lens rests; none at rest or under a mouse. Question posted here.

Evidence

iOS 26.2 simulator (a drag; Reduce Motion), then Android 15 Chrome.

iOS: drag
iOS: Reduce Motion
Android

Scope

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

Stack: #8360 → #8129 → this PR.

Testing

Try it: pnpm storybook, Lab › TabBar › Default, on a phone or Chrome's device mode.

  • Press Home, drag to Profile: the lens lifts and follows while the bar flexes; lift, and Profile is chosen.
  • Drag past the end: the lens resists, then settles.
  • Hold a tab: no text selection starts.
  • With Reduce Motion, nothing scales and the release cross-fades.
  • If the app drops a tab while a finger holds the bar, the press ends and chooses nothing.

Browser tests: the motion follows UIKit's springs; a drag from the bar never scrolls the page; the lift reports the tab as the settle starts.

Known limit: a main-thread block as the finger lands holds the press until it ends.

Passing: pnpm test:interaction TabBar, pnpm vitest run packages/lab/src/TabBar, pnpm typecheck, lint.

@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:12am 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, 2:32 AM UTC

@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 can't be approved yet. Several of its additions have no current spec authority, and two of its changes contradict current records. An engineering owner needs to decide on: the draft spec:AST-094 requirements; the TabBar's 10 pt drag slop; the new @astryxdesign/core/motion/experimental and @astryxdesign/core/gestures/experimental subpaths; the new presentation="adaptive" threshold, which contradicts component:Selector DEC-1; and delivering onChange three frames after the lift, which contradicts architecture:react-component-runtime INV2. 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; the two contradicted records need an amendment on main, or the change reverted. Whatever the owners decide, these fixes are needed:

  • Land the stacked predecessors, or retarget onto #8129, so this diff is its own 1,342-line commit instead of 28,746 authored lines.
  • Either ship the adaptive threshold as [breaking] in a declared minor or keep the documented 768px rule for adaptive, because it changes documented interaction behavior.
  • Add a Changeset naming @astryxdesign/cli for the new discover entries; the lint job's Changeset coverage check fails without it.
  • Cancel the deferred lift report when the TabBar unmounts.
  • Run the interaction proofs inside an existing CI lane instead of the separately routed pr-interaction job.

[Automated review]

}
};
pendingReportRef.current = report;
afterHandOff(report);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Nothing cancels this deferred report. afterHandOff keeps no frame or timeout handle, and no cleanup clears pendingReportRef, so a lift within about 50 ms of the bar unmounting still calls onChange/onReselect (architecture:react-component-runtime INV5). Keep the ids, cancel them in an effect cleanup, and add a test that unmounts inside that window. The three-frame delay itself contradicts INV2 and is waiting on an owner decision.

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.

This changes documented interaction behavior of the released presentation="adaptive": the docs promised the sheet at 768px and below with a coarse pointer, and an iPad mini in portrait now gets a popover while a landscape phone gets a sheet. spec:AST-017 FR3 and FR25 classify that as breaking outside a declared minor. Ship it as [breaking] in a declared minor, saying how to keep the old rule, or keep 768px for adaptive.

},
{
"kind": "component",
"name": "TabBar"

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 changes what astryx discover lists, but no Changeset names @astryxdesign/cli, so the lint job's "Check Changeset coverage" step fails on this file. A [feat] Changeset for @astryxdesign/cli fixes it.

Comment thread .github/workflows/ci.yml Outdated
# them, so a change to an instrument is proven by its negative controls
# before a component spec relies on it. Chromium only on these runners;
# see the harness README for running WebKit.
pr-interaction:

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

pr-interaction routes itself through its own scope check, but the specs it runs live inside the Core and Lab surfaces. spec:AST-030 FR11 says new coverage inside an existing surface joins that surface's owner lane and must not create a separately routed lane, and FR10 says a new test type is not a new surface. Run these specs from the lane that already owns the Storybook build they read, or admit this lane through an owner-approved FR10 amendment.

@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

Component Size

Component Import before Import after Delta CSS before CSS after Delta
core/AlertDialog 56.9KB 57.2KB +309B 12.4KB 12.4KB 0B
core/AppShell 57.9KB 58.1KB +256B 11.6KB 11.6KB 0B
core/AvatarGroupOverflow 39.9KB 40.2KB +319B 6.4KB 6.4KB 0B
core/Banner 47.8KB 48.1KB +303B 9.9KB 9.9KB 0B
core/BaseTypeahead 54.3KB 54.6KB +257B 9.9KB 9.9KB 0B
core/BreadcrumbItem 66.4KB 66.7KB +313B 11.0KB 11.0KB 0B
core/Button 43.3KB 43.6KB +287B 9.2KB 9.2KB 0B
core/Calendar 54.9KB 55.2KB +306B 10.0KB 10.0KB 0B
core/Carousel 50.2KB 50.5KB +331B 10.2KB 10.2KB 0B
core/ChatComposer 60.6KB 60.9KB +284B 10.8KB 10.8KB 0B
core/ChatComposerInput 55.7KB 56.0KB +279B 10.1KB 10.1KB 0B
core/ChatComposerTokenElement 55.7KB 56.0KB +279B 10.1KB 10.1KB 0B
core/ChatDictationButton 46.5KB 46.8KB +278B 9.5KB 9.5KB 0B
core/ChatLayout 48.8KB 49.1KB +288B 9.9KB 9.9KB 0B
core/ChatLayoutScrollButton 46.4KB 46.7KB +269B 9.6KB 9.6KB 0B
core/ChatSendButton 45.8KB 46.1KB +279B 9.2KB 9.2KB 0B
core/CheckboxInput 49.9KB 50.2KB +287B 9.3KB 9.3KB 0B
core/CheckboxListItem 54.0KB 54.3KB +259B 10.5KB 10.5KB 0B
core/ClickableCard 12.8KB 13.1KB +289B 6.9KB 6.9KB 0B
core/CodeBlock 60.5KB 60.8KB +292B 10.7KB 10.7KB 0B
core/Collapsible 11.7KB 12.0KB +291B 4.2KB 4.2KB 0B
core/CommandPalette 50.9KB 51.2KB +296B 11.8KB 11.8KB 0B
core/CommandPaletteItem 8.4KB 8.7KB +280B 3.5KB 3.5KB 0B
core/ComplexSelector 55.8KB 56.1KB +333B 10.6KB 10.6KB 0B
core/ContextMenu 77.7KB 78.0KB +290B 14.6KB 14.6KB 0B
core/ContextMenuItem 16.6KB 16.8KB +280B 5.2KB 5.2KB 0B
core/DateInput 99.9KB 100.1KB +257B 14.8KB 14.8KB 0B
core/DateRangeInput 69.4KB 69.6KB +280B 11.2KB 11.2KB 0B
core/DateTimeInput 110.1KB 110.3KB +263B 15.2KB 15.2KB 0B
core/DialogHeader 48.8KB 49.1KB +294B 9.8KB 9.8KB 0B
core/DrawerHeader 48.9KB 49.2KB +263B 11.2KB 11.2KB 0B
core/DropdownMenu 72.7KB 73.0KB +292B 14.7KB 14.7KB 0B
core/DropdownMenuCheckboxItem 16.1KB 16.4KB +284B 5.6KB 5.6KB 0B
core/DropdownMenuItem 15.4KB 15.7KB +287B 5.2KB 5.2KB 0B
core/DropdownMenuRadioItem 16.2KB 16.5KB +275B 5.6KB 5.6KB 0B
core/DropdownMenuSubMenu 58.1KB 58.4KB +284B 9.5KB 9.5KB 0B
core/FileInput 54.1KB 54.4KB +276B 10.3KB 10.3KB 0B
core/IconButton 43.3KB 43.6KB +286B 9.2KB 9.2KB 0B
core/Item 11.4KB 11.6KB +273B 4.7KB 4.7KB 0B
core/LayerProvider 63.3KB 63.6KB +301B 10.1KB 10.1KB 0B
core/Lightbox 51.2KB 51.4KB +263B 9.8KB 9.8KB 0B
core/Link 43.5KB 43.8KB +302B 7.6KB 7.6KB 0B
core/ListItem 53.5KB 53.7KB +281B 10.5KB 10.5KB 0B
core/Markdown 144.5KB 144.7KB +260B 17.4KB 17.4KB 0B
core/MobileNav 51.0KB 51.3KB +277B 10.1KB 10.1KB 0B
core/MobileNavToggle 46.2KB 46.5KB +273B 9.4KB 9.4KB 0B
core/MoreMenu 72.9KB 73.2KB +292B 14.7KB 14.7KB 0B
core/MultiSelector 76.2KB 76.5KB +286B 14.6KB 14.6KB 0B
core/NumberInput 55.7KB 56.0KB +293B 10.7KB 10.7KB 0B
core/Outline 28.6KB 28.9KB +305B 4.0KB 4.0KB 0B
core/Pagination 87.7KB 88.0KB +280B 15.3KB 15.3KB 0B
core/Popover 49.8KB 50.1KB +252B 12.1KB 12.1KB 0B
core/PowerSearch 155.1KB 155.3KB +282B 18.6KB 18.6KB 0B
core/RadioListItem 52.1KB 52.4KB +301B 9.7KB 9.7KB 0B
core/SegmentedControlItem 8.6KB 8.9KB +285B 3.9KB 3.9KB 0B
core/SelectableCard 12.8KB 13.1KB +294B 7.1KB 7.1KB 0B
core/Selector 79.1KB 79.4KB +284B 15.0KB 15.0KB 0B
core/SelectorOption 14.5KB 14.8KB +251B 5.1KB 5.1KB 0B
core/SideNav 58.0KB 58.3KB +285B 10.6KB 10.6KB 0B
core/SideNavCollapseButton 46.6KB 46.9KB +257B 9.5KB 9.5KB 0B
core/SideNavHeading 54.7KB 55.0KB +263B 10.1KB 10.1KB 0B
core/SideNavItem 54.5KB 54.8KB +282B 10.1KB 10.1KB 0B
core/Step 32.4KB 32.7KB +294B 5.3KB 5.3KB 0B
core/Stepper 47.4KB 47.7KB +280B 9.6KB 9.6KB 0B
core/Switch 48.4KB 48.7KB +298B 9.3KB 9.3KB 0B
core/Tab 9.7KB 10.0KB +294B 4.1KB 4.1KB 0B
core/TabMenu 51.6KB 51.9KB +282B 10.0KB 10.0KB 0B
core/Table 84.0KB 84.2KB +267B 15.1KB 15.1KB 0B
core/TableCell 78.8KB 79.1KB +283B 14.8KB 14.8KB 0B
core/TableHeaderCell 78.6KB 78.9KB +289B 14.8KB 14.8KB 0B
core/TableSelectionToolbar 52.4KB 52.6KB +291B 11.2KB 11.2KB 0B
core/TextInput 53.5KB 53.8KB +296B 10.5KB 10.5KB 0B
core/Thumbnail 50.7KB 50.9KB +288B 11.0KB 11.0KB 0B
core/TimeInput 86.8KB 87.1KB +284B 13.8KB 13.8KB 0B
core/Timestamp 27.5KB 27.5KB +14B 9.5KB 9.5KB 0B
core/Toast 59.8KB 60.1KB +271B 9.7KB 9.7KB 0B
core/ToggleButton 44.1KB 44.4KB +257B 9.3KB 9.3KB 0B
core/Token 29.6KB 29.9KB +304B 4.5KB 4.5KB 0B
core/Tokenizer 64.8KB 65.1KB +321B 11.7KB 11.7KB 0B
core/TopNav 51.9KB 52.1KB +290B 10.4KB 10.4KB 0B
core/TopNavHeading 54.2KB 54.4KB +246B 9.9KB 9.9KB 0B
core/TopNavItem 9.0KB 9.3KB +283B 3.8KB 3.8KB 0B
core/TopNavMegaMenu 54.2KB 54.5KB +283B 10.8KB 10.8KB 0B
core/TopNavMegaMenuItem 9.1KB 9.4KB +281B 4.1KB 4.1KB 0B
core/TopNavMenu 53.6KB 53.9KB +272B 10.1KB 10.1KB 0B
core/TreeList 32.5KB 32.8KB +290B 4.7KB 4.7KB 0B
core/Typeahead 61.5KB 61.7KB +283B 11.3KB 11.3KB 0B
lab/TabBar N/A 56.8KB N/A N/A 1.6KB N/A
lab/TabBarItem N/A 3.8KB N/A N/A 1.6KB 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.8KB 1.9KB 2.0KB +108B
Package stylesheet Gzip before Gzip after Delta
@astryxdesign/core 34.6KB 34.6KB 0B
@astryxdesign/lab 11.1KB 11.6KB +547B

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 can't be approved yet: several of its additions have no current spec authority, and two of its changes contradict current records. An engineering owner needs to decide on the draft spec:AST-094 requirements, the TabBar's 10 pt drag slop, the new @astryxdesign/core/motion/experimental and @astryxdesign/core/gestures/experimental subpaths, the new presentation="adaptive" threshold (which contradicts component:Selector DEC-1) and delivering onChange three frames after the lift (which contradicts architecture:react-component-runtime INV2); approval is recorded by commenting /approve-spec <full head SHA> on this pull request, which the author may do as an engineering owner, and the two contradicted records need an amendment on main or the change reverted. Whatever the owners decide, these fixes are needed:

  • Land the stacked predecessors, or retarget onto #8129, so this diff is its own 1,342-line commit instead of 28,753 authored lines.
  • Either ship the adaptive threshold as [breaking] in a declared minor or keep the documented 768px rule for adaptive and sub-menu drill-in.
  • Let a finger choose a tab when none is selected: the press now claims the touch and swallows the click, but begin and end return early when nothing is selected.
  • Cancel the deferred lift report when the TabBar unmounts, and capture the chosen tab at the lift.
  • Run the interaction proofs inside an existing CI lane instead of the separately routed pr-interaction job.

[Automated review]

const element = capsuleRef.current;
const selected = selectedRef.current;
const root = element?.parentElement;
if (element == null || root == null || selected < 0) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

With no tab selected (selectedIndex < 0, which TabBar.tsx handles by giving the first tab the tab stop and rendering no lens), this returns before pressRef is set, and end returns too, so onLift never runs. The zero-delay long press has still begun and claimed the touch, and with cancelsTouchesInView defaulting to true the gesture host swallows the tap's click, so a finger can no longer choose any tab in that state, where it reached onClick before. Commit the nearest tab on the lift without the lens motion (or leave the touch to the click), and add an interaction test for a tap with no selection.

@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 can't be approved yet: several of its additions have no current spec authority, and two of its changes contradict current records. An engineering owner needs to decide on the draft spec:AST-094 requirements, the TabBar's 10 pt drag slop, the new @astryxdesign/core/motion/experimental and @astryxdesign/core/gestures/experimental subpaths, the new presentation="adaptive" threshold (which contradicts component:Selector DEC-1) and delivering onChange three frames after the lift (which contradicts architecture:react-component-runtime INV2); an engineering owner records approval by commenting /approve-spec <full head SHA> on this pull request, which the author may do as an engineering owner, and the two contradicted records need an amendment on main or the change reverted. Whatever the owners decide, these fixes are needed:

  • Land the stacked predecessors, or retarget onto #8129, so this diff is its own 1,349-line commit instead of 29,149 authored lines, and restack onto current main, whose workflow now runs a test this branch predates (the pr-a11y failure).
  • Either ship the adaptive threshold as [breaking] in a declared minor or keep the documented 768px rule for adaptive and sub-menu drill-in.
  • Let a finger choose a tab when none is selected: the press now claims the touch and swallows the click, but begin and end return early when nothing is selected.
  • Cancel the deferred lift report when the TabBar unmounts, and capture the chosen tab at the lift.
  • Run the interaction proofs inside an existing CI lane instead of the separately routed pr-interaction job.

[Automated review]

vjeux added a commit to vjeux/astryx that referenced this pull request Oct 24, 2026
@cixzhang

Copy link
Copy Markdown
Contributor

Posted by Cindy's agent on her behalf.

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

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

@vjeux

vjeux commented Oct 24, 2026

Copy link
Copy Markdown
Contributor Author

Agreed: one implementation.

  • Writing direction → the shared helper: isRtlElement, exported from @astryxdesign/core/hooks.
  • Selection tracking → the shared 1-D tracker once it lands in core; until then the lens's press tracking stays inside TabBar's touch module, TabBarTouch.ts, on core's long-press recognizer.

vjeux added a commit to vjeux/astryx that referenced this pull request Oct 25, 2026
@vjeux
vjeux force-pushed the uikit/c15-tabbar-press branch from 5ac0476 to a750d0f Compare October 25, 2026 03:45
@github-actions github-actions Bot added the needs:design-review Affects visuals — Design should review label Oct 25, 2026
vjeux added 22 commits October 29, 2026 10:15
…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.
meta#8360 now carries the gesture foundation this stack built on (meta#8320 and the
PRs below it).
The merge of the heads meta#8129 builds on: meta#8360 @ 045f666 (the gesture
foundation), meta#8340 @ 339a352 (the animator) and meta#8562 @ cd3ad72
(Core's internal entries). With it as an ancestor, GitHub's compare from it
shows exactly meta#8129's own files.
…changed)

bbc0a4a is the merge of the heads this pull request builds on. With it
as an ancestor, GitHub's compare from it shows exactly this pull request's
own files.
…ps reach it

Red first: with no label the tab list has no name, and aria-label or
aria-labelledby passed to TabBar land on its root, where they name nothing.
As TabList does, the tab list is named by aria-labelledby, else aria-label,
else label, else the translated `@astryx.tabList.label` ("Tabs"), and the
aria naming props go to the tab list instead of the root.
spec:AST-094 FR4 names none of the tab bar's values, and Core's roles test
pins the registered roles to exactly FR4's list, so registerTabBarTable()
lists no motion role and each spring plays as measured, as the scroll and
navigation tables do. The comments and the changeset no longer call them
motion roles.
The comments it rewrote say, at this layer's wording too, that the tab bar's
springs play as measured; the lens's selection Effect says what it
synchronizes.
…nges under it

Red first: four tabs shrinking to three under a finger held on the last one
throw at the lift ("Cannot read properties of undefined (reading 'value')"),
since the lift resolves its index against the new list.
…ges under it

A press measured the tab centres of the list it began on. When the list
changes under a held finger, the press now ends there as a cancel and the
lens settles back to rest, so no move chases the old centres and the lift
never hands onLift an index into the new list.
The merge of meta#8129's fixes ran Prettier over every file it staged, which
reformatted 17 files this stack does not change (docs, scripts and a test
from main and the gesture foundation). They are back to the foundation's
text.
The tap and the second finger's landing went out 20 ms apart on the test's
wall clock, which a loaded box stretched until the lens had reached Profile
before the finger landed. They now go back to back, and the hold is a wait
after the landing.

@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 decision about TabBar's lens copy: drawing every tab a second time inside the lens while a finger is down needs an architecture:component-style-authoring INV7 / spec:AST-017 FR60 exception recorded with its counts (176 to 198 elements on the Default story), or dropping the half-tint. An engineering owner records that decision by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner. Whatever the decision, these still need changes:

  • family:action-groups now counts a tab bar as a member, so TabBar's press should run on Core's actionGroupTracker (architecture:interaction-modality INV13) for every pointer (FR5, spec:AST-094 FR43), and a lift off the bar should act on nothing (FR3).
  • The gesture host attaches nothing under a fine pointer and tells authors to keep gestures touch-only, which FR19 as amended and FR43 rule out, and perEventPointer rests on an FR19 exception that was never added.
  • Most of the 31,986 changed lines are the stack beneath #8129; landing it separately would leave this pull request its own TabBar layer.

[Automated review]

}
},
{
isEnabled: isTouch,

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 a fine pointer this turns the press off, so a mouse, a trackpad, or a pen or finger on a fine-pointer device gets only the click, and a press slid from one tab to another chooses nothing. family:action-groups names a tab bar among the components that join by its rule, and its FR5 and spec:AST-094 FR43 keep press, slide and lift on for every pointer; architecture:interaction-modality INV13 gives that tracking to Core's actionGroupTracker, whose resolveTarget and onMove already describe a row of segments and a lens that chases the finger.

await expect(tab(page, 'Library')).toHaveAttribute('aria-selected', 'true');
});

test('a drag that leaves the bar upward still commits where it lifts', async ({

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 pins a lift above the bar committing a tab, while family:action-groups FR3 says a press that lifts outside the group acts on nothing; this case and motion/uikit/tabBar.ts:26-28 ("leaving the bar does not cancel") would change with the move to the shared tracker.

ref={lens.clip}
data-tab-bar-lens-clip=""
{...stylex.props(styles.lensClip)}>
{lens.isCopyShown ? (

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

While isCopyShown is true every tab is drawn a second time inside the lens (176 to 198 elements on the Default story by your count). architecture:component-style-authoring INV7 and spec:AST-017 FR60 allow that only through an owner exception recorded with those counts; the open question asks an engineering owner to record it or to drop the half-tint.

}

/** Something attached where the primary pointer is fine: say so once. */
private warnFinePointer(): void {

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 now reads "Recognizers attach for every pointer, with FR43's exceptions", and DEC-21 rejects keeping gestures and press tracking touch-only, so this warning, the gate at :12-22 and :911-912, and the coarse-only selection lock point authors the other way. Attaching for every pointer, with FR43's exceptions, would match the record.

* browser, which still pans, and no mouse or pen press. Everything else
* stays inactive there. @default false
*/
perEventPointer?: boolean;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The FR19 press-feedback exception this cites was never added: FR19 was amended to attach recognizers for every pointer instead. No component passes this option, and its press tracker takes no mouse or pen press, the touch-only press tracking DEC-21 rejects; removing it is the smallest fix.

}
}, [isTouch]);

// The tab list changed under a held finger: the press ends here, as a

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

architecture:react-component-runtime INV3 asks a new Effect to name the external system it synchronizes; naming the recognizer's press and the lens's animations here, as the selection Effect below does, would cover it.

@vjeux

vjeux commented Oct 29, 2026

Copy link
Copy Markdown
Contributor Author

Thanks, fixed in this push:

  • A press now ends as a cancel when the tab list changes under a held finger, and the lens settles back. The lift no longer resolves its index against the new list. A test shrinks four tabs to three under a finger on the last one.
  • Both comments now say the springs play as measured.

The copy of the items and the INV7 count are an owner decision. perEventPointer and actionGroup come from the gesture foundation this stack builds on (#8360), not from this layer.

The Effect that ends a press when the recognizer turns off, and the one
that ends it when the tab list changes under a finger, now say what they
synchronize, as the selection Effect does.
@vjeux

vjeux commented Oct 30, 2026

Copy link
Copy Markdown
Contributor Author

Thanks. Fixed in this push: both press Effects now say what they synchronize, as the selection Effect does.

The lens copy is an owner decision. The press under a mouse comes with #8703, and whether TabBar follows the action-groups family is asked on #8129. GestureHost.ts and perEventPointer belong to the gesture foundation (#8360).

@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 can't be approved yet: two departures from current spec wait on an engineering-owner decision, which any engineering owner, the author included, records by commenting /approve-spec <full head SHA> on this pull request. The owners need to settle whether the lens may draw every tab a second time while a finger is down (an architecture:component-style-authoring INV7 / spec:AST-017 FR60 exception with its counts, 176 to 198 elements on the Default story) or should drop the half-tint, and whether TabBar may keep its own press tracker and commit a lift above the bar (an exception to family:action-groups FR2 and FR3 and architecture:interaction-modality INV13) or should follow the family. Whatever they decide, these still need changes:

  • The press is touch-only, while spec:AST-094 FR43 and DEC-21 keep gestures on for every pointer; bring the mouse and pen press into this pull request or land it together with #8703.
  • The gesture host's coarse-only gate and its development warning follow spec:AST-094 FR19 as it read before its amendment, and perEventPointer cites an FR19 exception that was never added.
  • The diff carries 31,988 authored lines, 30,484 of them the stacked predecessors; land those first or retarget onto #8129's branch, and split the astryxStylex change.

[Automated review]

This branch was successfully deployed

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