Skip to content

feat(lab): TabBar — disabled tabs, and the collapsed bar as one element - #8210

Draft
vjeux wants to merge 1904 commits into
meta:mainfrom
vjeux:uikit/c15-tabbar-hardening
Draft

vjeux wants to merge 1904 commits into
meta:mainfrom
vjeux:uikit/c15-tabbar-hardening

Conversation

@vjeux

@vjeux vjeux commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Depends on #8192.

Review only this PR's change: vjeux/astryx@bc3f58b...9efd4fd

User need

Part of matching Astryx's touch components to iOS 26, so apps built with it feel native on phones. Apps sometimes need a tab that can't be used yet; it must look disabled and stay inert under every input, even a finger dragging the lens across it. This adds isDisabled.

Problem and solution fit

  • Disabled tab: isDisabled dims it; a tap does nothing; the arrow keys skip it; a lift over it chooses nothing.
  • No drag affordance on it (spec:AST-085 FR6): while a finger drags over it, the lens waits on the nearest enabled tab and the disabled tab keeps its disabled look.
  • Collapsed bar: with no tab selected the circle takes the bar's name; minimized beside a search tab, the search circle stays reachable.

Current specification

spec:AST-085 FR6; spec:AST-012 FR9 and DEC-6; architecture:public-component-api INV17. An engineering owner decides (no record governs it): a lift never commits a disabled tab, and the tab reports aria-disabled.

Public delta and caller burden

New isDisabled?: boolean on TabBarItem; nothing changes for other callers.

Size, gzip against #8192's head: TabBar's import 63.5 → 63.7 KB JavaScript, 1,955 → 1,968 B CSS.

Design and alternatives

  • Chosen: one check where a tab is chosen covers a tap, the keys and the lens (whose chase reads it too), so every input agrees.
  • Rejected: the lens following the finger over a disabled tab (a drag affordance on a disabled control); committing it on lift as UIKit's drag does (reads as a bug).

Evidence

iOS 26.2 simulator, before (#8192: a tap selects Browse) and after (Browse ignores it; a drag holds the lens on Library); then Android 15 Chrome.

iOS before
iOS after
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: #8076 → … → #8320 → #8129 → … → #8192 → this PR.

Testing

Try it: pnpm storybook, Lab › TabBar › Disabled Tab (Browse is disabled), on a phone or Chrome's device mode.

  • Tap Browse: nothing happens.
  • Drag from Home across Browse: the lens waits on Library and Browse stays dimmed; lift over Browse and the lens settles back on Home.
  • With the keyboard, the arrow keys skip Browse.

Browser tests: a tap or lift on a disabled tab chooses nothing, by finger or mouse; a drag over it holds the lens on the nearest enabled tab; the minimized search circle stays tappable and announced.

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

@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 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 63.7KB N/A N/A 1.9KB N/A
lab/TabBarItem N/A 5.3KB N/A N/A 1.9KB N/A
lab/TabBarSearchTab N/A 5.3KB N/A N/A 1.9KB 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 +113B
Package stylesheet Gzip before Gzip after Delta
@astryxdesign/core 34.6KB 34.6KB 0B
@astryxdesign/lab 11.1KB 11.9KB +811B

Accessibility Audit

Status: No accessibility violations detected.

Visual Regression

55 of 502 shot(s) changed.

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

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

and 35 more.


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

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This needs an engineering owner's decision before it can be approved, and it also needs a few changes. An engineering owner approves or rejects the draft spec AST-094 by commenting /approve-spec <full head SHA> on this pull request (the author may do so as an engineering owner), names the record that governs the TabBar's own presentation (the arrow keys skipping a disabled tab, and the collapsed bar exposed as one button), and decides the new adaptive-presentation threshold for DropdownMenu, ContextMenu, MoreMenu, Selector and MultiSelector. The two points marked "pending owner review" are already required by the current focusable-disabled spec (AST-085 FR1, FR2 and FR5), so they need no separate decision.

  • Land the stacked predecessors, or retarget onto #8192, so this pull request's diff is its own 358-line commit instead of about 31,900 authored lines.
  • A finger landing on a disabled tab still lifts the lens onto it and draws it selected (useTabBarLens.ts), which AST-085 FR6 rules out for a disabled control.
  • Collapsed, the empty "Sections" tab list stays in the accessibility tree beside the circle button, so the bar is not yet one element; making the capsule itself inert while collapsed would fix it.
  • The minimizeBehavior JSDoc in TabBar.tsx still says focusing a tab expands the bar.

[Automated review]

{spring: tabBar.lensTravel},
{at, ...MOTION},
);
lift(true, at, size);

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 finger that lands on a disabled tab still gets this travel and lift, and the copy under the lens draws the tab in the selected look before choose() refuses it three frames after the lift. AST-085 FR6 says hover, pressed and drag affordances must not appear on a disabled control; passing the disabled indices into this hook and skipping the travel and lift for them would conform.

) : null}
<div
ref={mergedCapsuleRef}
role="tablist"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Collapsed, every tab here is inert, but this role="tablist" keeps its aria-label, so Chromium still exposes an empty "Sections" tab list beside the circle button. Making the capsule itself inert while collapsed (when there is no search tab) would give assistive technology the one element the docs describe.

Comment thread packages/lab/src/TabBar/TabBar.tsx Outdated
/**
* Whether scrolling the page down collapses the bar into a circle holding
* the selected tab's icon (UIKit's `tabBarMinimizeBehavior`): reaching the
* top of the page, a tap on the circle or focus on a tab expands it. Under

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Collapsed tabs are now inert, so focus can no longer reach a tab to expand the bar. TabBar.doc.mjs already says "reaching the top of the page or activating the circle expands it"; this JSDoc and the expand comment in useTabBarMinimize.ts could say the same.

// and large touch displays stay anchored, phones in either orientation get
// the sheet. The query is the shared touch presentation's
// (utils/touchPresentation.ts).
export const COMPACT_TOUCH_PRESENTATION_QUERY = COMPACT_TOUCH_QUERY;

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 moves presentation="adaptive" for DropdownMenu, ContextMenu, MoreMenu, Selector and MultiSelector from (max-width: 768px) and (pointer: coarse) to a viewport narrower than 744px or shorter than 500px. No current record names either threshold, so it needs an engineering owner's decision, and the updated tests import this constant rather than pinning a value.

@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, and it also needs a few changes. An engineering owner approves or rejects the draft spec AST-094 by commenting /approve-spec <full head SHA> on this pull request (the author may do so as an engineering owner), names the record that governs the TabBar's own presentation (the arrow keys skipping a disabled tab, and the collapsed bar exposed as one button), and decides the new adaptive-presentation threshold for DropdownMenu, ContextMenu, MoreMenu, Selector and MultiSelector. The two points marked "pending owner review" are already required by the current focusable-disabled spec (AST-085 FR1, FR2 and FR5), so they need no separate decision.

  • Land the stacked predecessors, or retarget onto #8192, so this pull request's diff is its own 325-line commit instead of about 32,300 authored lines.
  • A finger landing on a disabled tab still lifts the lens onto it and draws it selected (useTabBarLens.ts), which AST-085 FR6 rules out for a disabled control.
  • Collapsed or searching, an empty "Sections" tab list stays in the accessibility tree beside the circle button; making the capsule inert whenever no tab in it is reachable would fix it.
  • The minimizeBehavior JSDoc in TabBar.tsx still says focusing a tab expands the bar, and with no tab selected the collapsed circle has no accessible name.

[Automated review]

Comment thread packages/lab/src/TabBar/TabBar.tsx Outdated
// Collapsed, the circle is the bar's one element for assistive
// technology, as on iOS: the selected tab, collapsed (while
// searching, the tab it returns to). Expanded, it is hidden.
aria-label={isMinimized ? selectedItem?.label : undefined}

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 (value matching no tab, a state the bar handles at :1061 and :1143), selectedItem is null, so the collapsed circle is a focusable button with aria-expanded="false" and no name. chooseCircle then skips the focus move, leaving focus on the circle as it turns aria-hidden. Naming it (the bar's label, say) and focusing the tab that holds the tab stop after expanding would fix both.

vjeux added a commit to vjeux/astryx that referenced this pull request Oct 25, 2026
vjeux added a commit to vjeux/astryx that referenced this pull request Oct 25, 2026
…-touch-model restack; the before clip is meta#8192's build)
vjeux added a commit to vjeux/astryx that referenced this pull request Oct 25, 2026
…-touch-model restack); the before clip is meta#8192's build
@vjeux
vjeux force-pushed the uikit/c15-tabbar-hardening branch from e8fd056 to 1bf4927 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 a commit to vjeux/astryx that referenced this pull request Oct 25, 2026
@vjeux
vjeux force-pushed the uikit/c15-tabbar-hardening branch from 1bf4927 to 93b1eb3 Compare October 25, 2026 06:02

@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 engineering-owner decisions before it can be approved, and it also needs changes. An engineering owner approves or rejects the draft spec AST-094 by commenting /approve-spec <full head SHA> on this pull request (the author may do so as an engineering owner), names the record that governs the TabBar's own presentation (the arrow keys skipping a disabled tab and the collapsed bar as one button), and decides on the theme motion roles that AST-094 FR4 rules out, the isRtlElement and reducedMotion.stylex exports, useFingerScroll, and the selection lock on stable press surfaces.

  • Land the stacked predecessors, or retarget onto #8192, so this pull request's diff is its own 492-line commit instead of about 42,000 authored lines.
  • Minimized with a search tab, the search circle stays visible but inert, so a tap on it reaches the page behind the bar (TabBar.tsx).
  • A drag still lifts the lens onto a disabled tab and draws it selected, which AST-085 FR6 rules out (useTabBarLens.ts).
  • The press-surface selection lock changes stable components, including the iOS callout on Link, so it needs a stable Changeset rather than [experimental] (AST-017 FR22).
  • pr-a11y fails on the NoSelection story's empty heading, the theme template documents a platform adaptation axis that does not exist, and two release notes misdescribe their surface.

[Automated review]

Comment thread packages/lab/src/TabBar/TabBar.tsx Outdated
aria-orientation="horizontal"
// Collapsed (minimized, or while searching), none of its tabs is
// reachable: the circle stands for the bar.
inert={isMinimized}

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 search tab (:1154-1201) is a child of this tablist, so while the bar is minimized with a search tab, the search circle stays visible (the browser test at __tests__/TabBar.interaction.browser.spec.ts:2484 expects both circles) but is inert: since the bar's root and wrapper take no pointer input, a tap on it falls through to the page behind the bar, and screen readers no longer find it until the bar expands. On the previous commit the same tap chose search. Making the tablist inert only when none of its tabs is reachable (no search tab, or while searching) and leaving the item tabs individually inert would keep the circle operable; a test that taps the minimized search circle would hold it.

Comment on lines +386 to +405
if (press.isIgnored) {
if (!press.isDragging) {
return;
}
// A drag from a disabled tab: the press counts from here (the lens,
// when there is one, lifts and chases).
press.isIgnored = false;
if (press.hasLens && selected >= 0) {
lift(true, at, press.size);
}
}
if (!press.hasLens || selected < 0) {
return;
}
body.animator.animate(
{x: lensTarget(x, press.centers) - press.centers[selected]},
{spring: press.isDragging ? tabBar.lensTrack : tabBar.lensTravel},
{at},
);
playCopy(at);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Once a press drags, the lens lifts and chases the finger onto any item, including a disabled one, and the copy under the lens draws that item in the accent, semibold selected look (TabBar.tsx:719-722, :1232-1248) until the lift settles back. AST-085 FR6 says disabled paint applies and drag affordances must not appear on a disabled control. Holding the lens on the nearest enabled position while the finger is over a disabled tab, and giving a disabled item's copy its disabled paint, would conform.

@@ -283,6 +301,9 @@ function onPointerDown(event: PointerEvent): void {
gesture: idlePressGesture(),
pointerId: event.pointerId,
timer: null,
// A held finger never starts text selection on the surface (UIKit's
// controls and cells never do), on any coarse pointer.
unlock: lockSelection([element], event.target),

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 lock runs for every usePressFeedback surface on a touch or pen press, so it changes stable components such as Link, Button, Item, Selector and CheckboxInput; on a Link it also removes iOS's link callout. AST-017 FR22 keeps stable runtime changes out of the [experimental] category used by .changeset/touch-selection-lock.md. A stable category with a release note naming the affected components, and keeping the callout on elements with href, would address it.

Comment thread packages/cli/assets/theme.template.ts Outdated
* `from` includes its point; `below` excludes it. The other supported axes
* are primary-pointer precision, contrast preference, and motion preference.
* are primary-pointer precision, contrast preference, motion preference, and
* platform (`ios` for the browsers of iPhone and iPad, `other` for the rest).

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 theme code at this head has no platform condition, and AST-012 FR2 limits a when object to width, height, pointer, contrast and motion, so a rule written as this line describes would be rejected. Dropping the platform sentence would fix it.

function Screen({title, reselects}: {title: string; reselects: number}) {
return (
<div style={{padding: '16px 16px 104px'}}>
<h1 style={{margin: '8px 0 16px', fontSize: 28}}>{title}</h1>

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 (the NoSelection story) the title is empty, and pr-a11y fails on this head with axe's empty-heading for lab-tabbar--no-selection. A heading text for that state, or no heading, would clear it.

'@astryxdesign/core': patch
---

[experimental] Two experimental subpaths for building touch presentations, outside the stable compatibility promise (they may change or be removed in a patch release). `@astryxdesign/core/motion/experimental` exports the compositor animator (`createAnimator`, `useAnimator`), UIKit's spring, rubber-band and cubic-bézier math, `resolveMotion` (a motion role's value under the element's theme), and the UIKit constants table as the read-only `uikit` namespace. `@astryxdesign/core/gestures/experimental` exports UIKit-style gesture recognizers (tap, long press, pan, screen-edge pan, swipe, pinch, rotation, hover), `useGestureRecognizer`, `usePressTracker`, `useTouchPresentation`, `readTouchPresentation`, `playHaptic` and `attachTapHaptic`, with the `GestureArena` and `VelocityStrategy` types their options reach. Nothing is added to the package root or to any other subpath.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

packages/core/src/gestures/experimental.ts no longer exports VelocityStrategy, and it does export ScrollViewPanGestureRecognizer, which this note leaves out. AST-017 FR22 asks the release note to name the affected surface.

export const COMPACT_QUERY = DEFAULT_COMPACT_DEFINITION.query;

/** Both: presentations such as a sheet in place of a popover. */
export const COMPACT_TOUCH_QUERY =

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 reads the default compact definition, so under a theme that overrides md the five adaptive components still switch at 768px, while .changeset/touch-presentation.md promises "the theme's md point" and AST-012 FR9 uses the effective md point. Either the note and docs say 768px, or the query comes from the active theme's breakpoints.

Comment on lines +169 to +172
useEffect(() => {
if (!isEnabled) {
setIsMinimized(false);
return;

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 Effect resets isMinimized when minimizing turns off, which react-component-runtime INV1 asks to do during render rather than as a follow-up Effect, and the write names no external system (INV3). Adjusting the state during render when isEnabled turns false, as TabBar.tsx:885-890 does for the tab search returns to, would leave this Effect to the scroll watcher alone.

@vjeux
vjeux force-pushed the uikit/c15-tabbar-hardening branch from 93b1eb3 to d360ff4 Compare October 25, 2026 11:12
vjeux added 11 commits October 29, 2026 14:03
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.
… spring from rest

The turn used to come after the page settled, when the accessory had almost
stopped, so a carried and a dropped velocity looked alike. The drag now ends
at rest and the circle is tapped at once, and the first frame back is
compared with the expand spring from rest.
Holding every animation made the earliest one the sampling origin; when the
bar's other layers started a frame before the field, the samples ran ahead
of the spring by about half a pixel in WebKit.
@vjeux
vjeux marked this pull request as draft October 29, 2026 22:33
vjeux added 3 commits October 29, 2026 15:35
…rt times

The expand's first frame is checked against the expand spring started from
the offset the accessory turns from, with the speed the collapse had at the
turn. The turn's moment is the two animations' start times apart, so a late
tap (a loaded box) moves the prediction with it instead of failing the case.
vjeux added 2 commits October 29, 2026 16:36
…arch field covers it

Under a finger the active field spans the bar's row over the leading circle,
which kept its tab stop and its name. It is inert while the field is active
there, with a browser test (red first: the covered circle took focus).

@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, and it also needs changes. No current spec states the lab TabBar's own presentation (the arrow keys skipping a disabled tab, the collapsed bar as one circle button, and the motion roles its springs would need), so an engineering owner provides or identifies that spec and records the decision by commenting /approve-spec <full head SHA> on this pull request; the author may do so as an engineering owner. The disabled tab itself follows AST-085 on every selection path.

  • The gesture host attaches recognizers only under a coarse pointer, but AST-094 FR19 and FR43 now require gestures for every pointer.
  • A tab bar is a family:action-groups member, so its lens should come from the shared action-group tracker, light nothing over a disabled tab, act on nothing when a finger lifts off the bar, and work with every pointer.
  • AST-099 FR1 and FR3 require tab bar search to position from the on-screen keyboard height, and nothing in the TabBar reads it.
  • Land or retarget onto the stacked predecessors so this diff is its own 460-line layer instead of about 36,700 changed lines, move the astryxStylex fix, the unused press-paint exports and the host's unused actionGroup option to their own pull requests, and add an accessibility-tree check for the disabled tab (AST-085 FR5).

[Automated review]

*
* ONLY WHERE THE PRIMARY POINTER IS COARSE
*
* - Recognizers attach, and the host registers listeners, only while the

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 follows spec:AST-094 FR19's earlier wording. Current FR19 says "Recognizers attach for every pointer, with FR43's exceptions", and FR43 and DEC-21 keep gestures on for a mouse, a trackpad and a pen. Attach for every pointer with FR43's named exceptions, keep FR24's fine-pointer budget, and update the gestures README to match.

* past the ends, but held on the nearest enabled tab while the finger is
* over a disabled one, which shows no drag affordance (AST-085 FR6).
*/
const chaseTarget = (x: number, centers: number[]) => {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

family:action-groups brings a tab bar in by its membership rule, and its FR2 says nothing is highlighted over a disabled action. Parking the lens on the nearest enabled tab lights that tab even though a lift here chooses nothing; one option is to drop the lens back, unlifted, to the selected tab while the finger is over a disabled one.

// The app's answer to this lift, as rendered now: the tab the finger
// chose is the one under it at the lift, whatever renders after.
const deliver = onLiftRef.current;
const nearest = nearestIndex(press.lastX, press.centers);

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 lift reads only the finger's x, and the recognizer's movement is unlimited once it begins, so a finger that slides off the bar still commits a tab. family:action-groups FR3 says a press that lifts outside the group acts on nothing; the browser test "a drag that leaves the bar upward still commits where it lifts" pins the opposite.

* tab can, in the same commit, activate the field and focus it, which is
* what raises the keyboard on iOS. Active, its glass widens to span the
* screen but for the field's cancel button, in the bar's row, where a
* phone's keyboard can cover it.

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 FR1 and FR3 require tab bar search to position from the shared on-screen keyboard height. Nothing in the TabBar reads it, and TabBarSearchContext is provided but has no consumer.

vjeux added 7 commits October 29, 2026 18:01
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.
While the bar is collapsed its tabs are inert, so focus never lands on a
tab: keyboard focus reaches the circle, whose activation expands the bar.
The prop doc, the component doc and the hook said focus on a tab expands it.
…tree (AST-085 FR5)

Reads Chromium's accessibility tree: the disabled tab keeps its name and is
announced disabled on the tab itself; no other tab is.

@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, and it also needs changes. No current spec states the lab TabBar's own presentation (the arrow keys skipping a disabled tab, the collapsed bar as one circle button, and the motion roles its springs would need), so an engineering owner provides or identifies that spec and records the decision by commenting /approve-spec <full head SHA> on this pull request; the author may do so as an engineering owner. The disabled tab itself follows AST-085 on every selection path, and the covered search circle leaving the tab order is a sound fix.

  • The gesture host attaches recognizers only under a coarse pointer, but AST-094 FR19 and FR43 require gestures for every pointer.
  • A tab bar is a family:action-groups member, so its lens should come from the shared action-group tracker, light nothing over a disabled tab, act on nothing when a finger lifts off the bar, and work with every pointer.
  • AST-099 FR1 and FR3 require tab bar search to position from the on-screen keyboard height, and nothing in the TabBar reads it.
  • Land or retarget onto the stacked predecessors so this diff is its own 460-line layer instead of about 36,700 changed lines, move the astryxStylex fix, the unused press-paint exports and the host's unused actionGroup option to their own pull requests, and add an accessibility-tree check for the disabled tab (AST-085 FR5).

[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 needs an engineering owner's decision before it can be approved, and it also needs changes. No current spec states the lab TabBar's own presentation (the arrow keys skipping a disabled tab, the collapsed bar as one circle button, and the motion roles its springs would need), so an engineering owner provides or identifies that spec and records the decision by commenting /approve-spec <full head SHA> on this pull request; the author may do so as an engineering owner. The disabled tab follows AST-085 on every selection path, and the new accessibility-tree test closes the earlier FR5 evidence gap.

  • The gesture host attaches recognizers only under a coarse pointer, but AST-094 FR19 and FR43 require gestures for every pointer.
  • A tab bar is a family:action-groups member, so its lens should come from the shared action-group tracker, light nothing over a disabled tab, act on nothing when a finger lifts off the bar, and work with every pointer.
  • AST-099 FR1 and FR3 require tab bar search to position from the on-screen keyboard height, and nothing in the TabBar reads it.
  • Land or retarget onto the stacked predecessors so this diff is its own 478-line layer instead of about 36,700 changed lines, and move the astryxStylex fix, the unused press-paint exports and the host's unused actionGroup option to their own pull requests.

[Automated review]

This branch was successfully deployed

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