Skip to content

feat(lab): TabBar — a bottom accessory - #8172

Draft
vjeux wants to merge 1834 commits into
meta:mainfrom
vjeux:uikit/c15-tabbar-accessory
Draft

vjeux wants to merge 1834 commits into
meta:mainfrom
vjeux:uikit/c15-tabbar-accessory

Conversation

@vjeux

@vjeux vjeux commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Depends on #8154.

Review only this PR's change: vjeux/astryx@0056d05...646c150

User need

Part of matching Astryx's touch components to iOS 26, so apps built with it feel native on phones. iOS apps keep one app-wide control, like Music's now-playing bar, in a capsule above the tab bar that moves down beside the minimized bar. Astryx apps have nowhere to put it. This adds bottomAccessory.

Problem and solution fit

  • Above the bar: a 48 px capsule in the bar's glass, 8 px above it.
  • Inline: as the bar minimizes under a finger it moves beside the circle on UIKit's spring, and back on expand.
  • A function child learns its placement ('expanded' | 'inline'), so content can drop controls inline.
  • Its content takes taps in both places and never chooses a tab.

Current specification

Needs an engineering owner's decision (no record governs it): this API, and the accessory spanning the bar with two or three tabs. spec:AST-094 FR13, FR8.

Public delta and caller burden

New bottomAccessory?: ReactNode | ((placement) => ReactNode) and TabBarAccessoryPlacement. Leave 56 px more room below the content; uikit.tabBar gains the accessory values.

Size, gzip against #8154's head: TabBar's import 63.9 → 64.7 KB JavaScript, 1,923 → 1,946 B CSS.

Design and alternatives

  • Chosen: its box changes in CSS and starts from where it was (FLIP): text never stretches, the move stays on the compositor, and its glass resizes by transforms only.
  • Rejected: scaling the content (stretches text); animating its width (not composited, so it stalls on a busy page).
  • Fewer glass elements (spec(architecture): components are built from minimal DOM (INV7) #8300) is a follow-up. With an accessory the bar adds 7 elements (its box, the glass's container and three pieces, the content's window and its wrapper); without one, none.

Evidence

iOS 26.2 simulator (minimize and expand; a 600 ms block; Reduce Motion), then Android 15 Chrome.

iOS: accessory
iOS: blocked
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 → #8141 → #8154 → this PR.

Testing

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

  • Scroll down: the bar minimizes and the player moves beside the circle; scroll to the top: it returns.
  • Tap its buttons in both places: they work and never change the tab.
  • With Reduce Motion, it cross-fades between the two places.
  • As the bar expands, the accessory's content stays inside its growing glass; turned around mid-move, it keeps its speed.

Browser tests: the move follows UIKit's springs, keeps going through a 600 ms block, and page content clears both bars. The busy-page tests now block as the motion starts, so a slow machine can't make them flaky.

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:18am 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
@vjeux
vjeux force-pushed the uikit/c15-tabbar-accessory branch from 33cc736 to ecd4287 Compare October 24, 2026 09:27
@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 61.7KB N/A N/A 1.9KB N/A
lab/TabBarItem N/A 4.0KB 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 +108B
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.

Approval of the bottomAccessory addition to the lab TabBar waits on an engineering owner: no current spec covers the new prop, its placement and width (including two- and three-tab bars), or the draft AST-094 requirements this diff carries, so an engineering owner needs to provide or identify the governing spec and record the decision by commenting /approve-spec <full head SHA> on this pull request (the author may do so if they are an engineering owner). Independently of that decision, three changes are needed:

  • Rebase onto the landed stack so this diff carries only the accessory commit; against main it is about 30,000 authored lines.
  • Render the accessory only when its content is something React renders: bottomAccessory={false} or '' currently draws an empty capsule that blocks taps (TabBar.tsx:711).
  • Move the adaptive menu and selector breakpoint change into its own pull request and name the migration its Changeset needs under AST-017 FR3.

[Automated review]

Comment thread packages/lab/src/TabBar/TabBar.tsx Outdated
styles.bar,
styles.barSize(px(tabBar.barHeight), px(naturalWidth(count))),
)}>
{bottomAccessory != null ? (

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

bottomAccessory != null lets false and '' through, so bottomAccessory={nowPlaying && <MiniPlayer />} draws an empty 360 × 48 capsule that takes taps while nothing plays; a function that returns null does the same. Resolve the content first and render only when it is something React renders:

const accessoryContent =
  typeof bottomAccessory === 'function' ? bottomAccessory(placement) : bottomAccessory;
const hasAccessory =
  accessoryContent != null && typeof accessoryContent !== 'boolean' && accessoryContent !== '';

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 presentation="adaptive" behavior on five released components: coarse-pointer viewports 744-768 px wide lose the bottom sheet, and wider ones under 500 px tall gain it. AST-017 FR3 asks the Changeset to name the prop or option that restores the old default, and none exists here. It belongs in its own pull request with that migration, or classified under FR1 for a declared minor.

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Approval waits on an engineering owner's decision: no current spec covers Lab TabBar's new bottomAccessory prop and TabBarAccessoryPlacement type or their placement, and the draft AST-094 record adds requirements (FR1–FR23, DEC-1/DEC-2) that are not yet approved. An engineering owner can record that decision by commenting /approve-spec 46b331b965a2307730ee86667b04d5078b616e2d on this pull request, or by adding or identifying the record that states this direction; the author may do so if they are an engineering owner. Whatever that decision, these changes are still needed:

  • Retarget or split the branch so this pull request carries only the accessory commit; it currently brings about 30,700 authored lines from the stack beneath it.
  • Render nothing when bottomAccessory is false, '' or a function returning null (today an empty glass capsule appears, TabBar.tsx:711), and add a regression test.
  • Move the presentation="adaptive" breakpoint change to its own pull request with the migration AST-017 FR3 asks the changeset to name, and run the interaction specs inside the existing test lane rather than a new pr-interaction job (AST-030 FR11).

[Automated review]

Comment thread packages/lab/src/TabBar/TabBar.tsx Outdated
styles.bar,
styles.barSize(px(tabBar.barHeight), px(naturalWidth(count))),
)}>
{bottomAccessory != null ? (

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

bottomAccessory != null lets false, '' and a function returning null through, so bottomAccessory={isPlaying && <Player />} with nothing playing draws an empty 48 px glass capsule above the bar (and inline when minimized) that takes taps. Resolving the content for the current placement first and rendering the accessory only when it is renderable fixes it; a test for false keeps it fixed.

// 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" from bottom sheet to popover on coarse-pointer viewports 744–768 px wide, and from popover to bottom sheet on landscape phones wider than 768 px, for DropdownMenu, ContextMenu, MoreMenu, Selector and MultiSelector. AST-017 FR3 asks the changeset of a functional default change to name the prop or option that restores the old default; .changeset/touch-presentation.md names none.

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 on its own needs and if. AST-030 FR11: "New coverage inside an existing surface MUST join those owners and MUST NOT create a separately routed lane or required context." Running these specs inside the existing test owner would meet it.

vjeux added a commit to vjeux/astryx that referenced this pull request Oct 24, 2026
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
@vjeux
vjeux force-pushed the uikit/c15-tabbar-accessory branch from 46b331b to 2281a36 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-accessory branch from 2281a36 to aa16e7a Compare October 25, 2026 06:01

@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: no current spec covers Lab TabBar's new bottomAccessory prop and TabBarAccessoryPlacement type or their placement, the draft AST-094 adds requirements (FR1–FR23, DEC-1/DEC-2) that are not yet approved, including an FR4 that the theme motion roles in this branch contradict, and the isRtlElement and motion/reducedMotion.stylex exports are marked pending review. An engineering owner can record that decision by commenting /approve-spec aa16e7a3adadce9e3edd5fe867401a3f4fcbe9d6 on this pull request, or by adding or identifying the record that states this direction; the author may do so if they are an engineering owner. Whatever that decision, these changes are still needed:

  • Retarget or split the branch so this pull request carries only the accessory commit; it currently brings about 40,000 authored lines from the stack beneath it.
  • Keep the press controller's new selection lock out of this change, or classify it as a stable behavior change with pen evidence: it applies to every usePressFeedback component and removes the iOS long-press callout from Link (AST-017 FR22, FR59).
  • Tell accessory callers to declare the capsule on LayerProvider (blockEnd: 139), not only the bar's 83 px (AST-059 FR6), and bring AST-094 FR8's Reduce Motion fades within the 200 ms the current reduced-motion record allows.
  • Run the interaction specs inside the existing test lane rather than a new pr-interaction job (AST-030 FR11).
  • Deliver a finger lift's onChange from its handler rather than after the compositor hand-off or from an Effect, or record that exception (react-component-runtime INV2).

[Automated review]

Comment thread packages/lab/src/TabBar/TabBar.doc.mjs Outdated
name: 'bottomAccessory',
type: "ReactNode | ((placement: 'expanded' | 'inline') => ReactNode)",
description:
"A bottom accessory, such as a music player's now-playing bar: a 48 px capsule as wide as the bar, 8 px above it. When the bar minimizes it moves down inline beside the circle and gets narrower; pass a function to adapt its content to where it is (placement is 'inline' there). Leave 56 px more room at the bottom of the scrolling content.",

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 an accessory the floating stack is 139 px tall (83 + 56), but this only asks for more scroll room, and line 30 has callers declare inset={{blockEnd: 83}}. Under AST-059 FR6 the app declares the persistent bar's extent on LayerProvider, so menus, popovers and a bottom toast viewport would clear the bar and still land on the capsule. Suggest telling accessory callers to declare blockEnd: 139, and doing so in the BottomAccessory story.

@@ -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 reaches every usePressFeedback surface on a touch or pen press, not only rows: Button, Item, Tab, Switch and Link, whose <a href> would lose the iOS long-press callout (preview, Open in New Tab, Copy Link) to -webkit-touch-callout: none. AST-017 FR22 keeps stable runtime behavior out of an [experimental] Changeset, and FR59 asks for pen before-and-after evidence. Keeping links out of the callout lock and classifying the rest as a stable behavior change, in its own pull request, would settle both.

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 on its own needs and if. AST-030 FR11: "New coverage inside an existing surface MUST join those owners and MUST NOT create a separately routed lane or required context." Running these specs inside the existing test owner would meet it.

on: a transition that travels becomes a cross-fade carrying the same change
of state. An entrance lands in place and fades in, an exit fades out in
place, and any other move fades through. A navigation push or pop
cross-fades over 0.5 s on the ease-in-out curve; a sheet, a full-screen

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 0.5 s push cross-fade and a sheet fading on its presentation spring exceed the current reduced-motion record's DR2 ("MUST change opacity only and MUST finish in 200 ms or less"), which this record neither cites nor proposes to amend; the animator in this branch already uses 200 ms. Conforming FR8 to DR2, or naming the DR2 amendment for its owners, would close the gap.

// input took over): its choice still reaches the app, at once.
useEffect(() => {
if (!isTouch || isMinimized) {
pendingReportRef.current?.();

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 delivers a waiting lift's choice, and with it the app's onChange, in reaction to isTouch or isMinimized changing; normally the choice arrives three frames and a timeout after the lift (afterHandOff). react-component-runtime INV2 has the callback fire "from the handler that caused the change, never from an Effect reacting to the resulting state" and says deferral "MUST NOT delay" the action. Delivering from the lift handler, or recording the Mobile Safari hand-off as an exception with that record's owners, would settle it.

vjeux added 18 commits October 29, 2026 12:43
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.
Its tab-list naming props sit beside this layer's minimizeBehavior, and the
comments it rewrote say, at this layer's wording too, that the tab bar's
springs play as measured.
Red first: expanded by a tap, the bar minimizes again on the next pixel
down; where the browser sends no scrollend, a script's scroll after the
person's counts; collapsed, the tab list stays in the accessibility tree
and the circle is no button; and the circle and the split glass mount
even with minimizing off.
… restarts on expand

- Expanding starts the downward scroll run over, so an expanded bar takes
  another minimizeDistance down before it minimizes again (before, the
  next pixel down minimized it).
- Where the browser sends no scrollend, the scroll watch ends when the
  gesture host's reader says the person's scroll ended (its own fallback),
  so a script's scroll after it no longer counts.
- Collapsed, the circle is the bar's one element for assistive technology,
  as on iOS: a button beside the tab list, named after the selected tab and
  collapsed (aria-expanded), with the tabs inert until it expands; from the
  keys, focus lands on the selected tab. The capsule sits in the bar's box,
  which places the circle.
- The circle and the glass's three pieces mount only when minimizing is on;
  otherwise the glass is one piece.
Its collapsed circle (a button beside the tab list, in the bar's box this
layer added for the accessory), its tab-list naming props beside this
layer's bottomAccessory, and its comments saying the tab bar's springs play
as measured.
…urn keeps its speed

Red first: expanding, "Next" shows past the glass's trailing cap while the
glass grows; turned around mid-move, the accessory starts back from rest.
…rn keeps its speed

- Expanding, the accessory's content is laid out at once for its new box
  while the glass grows into it. The content now shows through a window
  whose trailing edge rides the glass's trailing cap (a translate, with the
  content counter-moved so it stays put), so "Next" no longer shows past
  the glass for its first ~140 ms. A shrinking glass already holds the
  narrower content, so no window moves then.
- Turned around mid-move, each of the accessory's springs starts from the
  velocity it had (spec:AST-094 FR6) instead of from rest.
…object too

On the global object the onscrollend handler is an own property, so the
browser without scrollend the test models still detected one.
The no-scrollend case removes the handler from the global object too.
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.
… 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.
@vjeux
vjeux marked this pull request as draft October 29, 2026 22:32
…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.

@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: no current spec covers Lab TabBar's new bottomAccessory prop and TabBarAccessoryPlacement type, including the slot's place in the bar's anatomy, its width at every tab count (118 px inline with two tabs), and its two springs, which are not motion roles and on expand settle about 80 ms ahead of the bar. An engineering owner can record that decision by commenting /approve-spec 646c1500c2153a7164bc0413a39b16df54f5ef7f on this pull request, or by adding or identifying the record that states this direction; the author may do so if they are an engineering owner. Whatever that decision, two changes are still needed:

  • Reduce this pull request to the accessory layer, since against main it carries about 34,500 authored lines from the stack beneath it.
  • Record before-and-after element counts for the seven elements the accessory adds, as component-style-authoring INV7 asks, or draw the glass caps on pseudo-elements.

[Automated review]

styles.bar,
styles.barSize(px(tabBar.barHeight), px(naturalWidth(count))),
)}>
{hasAccessory ? (

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 an accessory the bar renders seven more elements here: the wrapper, an aria-hidden glass box holding three glass pieces, the content's window and the content box. component-style-authoring INV7 asks that "any added element is justified against this invariant with measured element counts before and after" and puts decoration with no semantic role on a pseudo-element. Please record the BottomAccessory story's counts at rest and minimized under a fine and a coarse pointer, or draw the glass caps on pseudo-elements, which this branch's animator can drive.

vjeux added 4 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.
@vjeux

vjeux commented Oct 30, 2026

Copy link
Copy Markdown
Contributor Author

Thanks, fixed in this push:

  • Expanding, the accessory's content now shows through a window whose trailing edge rides the glass's trailing cap. "Next" no longer shows past the glass; before, it did for about 140 ms.
  • Turned around mid-move, each of the accessory's springs starts from the velocity it had (FR6).
  • The comments and the changeset call the tab-bar springs internal measured values.

Element counts for INV7: a bar with an accessory adds 7 elements, and a bar without one adds none. The stack below lands first; the review link shows only this layer.

@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: no current spec covers Lab TabBar's new bottomAccessory prop and TabBarAccessoryPlacement type, including the slot's place in the bar's anatomy, its width at every tab count (118 px inline with two tabs), and its two springs, which are not motion roles and on expand settle about 80 ms ahead of the bar. An engineering owner can record that decision by commenting /approve-spec 675212270577981fd572123796e480cc0d086a93 on this pull request, or by adding or identifying the record that states this direction; the author may do so if they are an engineering owner. Whatever that decision, two changes are still needed:

  • Reduce this pull request to the accessory layer, since against main it carries about 34,500 authored lines from the stack beneath it.
  • Thanks for the element counts; the four decorative glass elements (TabBar.tsx:842-863) still need to move to pseudo-elements, or each needs a reason under component-style-authoring INV7 why it must be an element.

[Automated review]

Comment on lines +842 to +863
<div aria-hidden {...stylex.props(styles.accessoryGlass)}>
<div
{...stylex.props(
styles.glass,
styles.platterStart(HALF_ACCESSORY),
)}
/>
<div
ref={minimize.accessoryMiddle}
{...stylex.props(
styles.glass,
styles.platterMiddle(HALF_ACCESSORY),
)}
/>
<div
ref={minimize.accessoryEnd}
{...stylex.props(
styles.glass,
styles.platterEnd(HALF_ACCESSORY),
)}
/>
</div>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Thanks for recording the counts: with an accessory the bar adds seven elements and without one none, which the stories bear out. Four of the seven are this glass box and its three pieces, decoration with no role, which component-style-authoring INV7 puts on pseudo-elements ("A pseudo-element carries decoration that has no semantic role"). Drawing the caps on this box's ::before and ::after, which this branch's animator can drive as the lens's lifted look does, or giving each remaining element its INV5 reason, would settle it.

@vjeux

vjeux commented Oct 30, 2026

Copy link
Copy Markdown
Contributor Author

Thanks: the description now records the BottomAccessory story's element counts at rest and minimized, under a mouse and under a finger. The stack below lands first; the review link shows only this layer.

This branch was successfully deployed

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