Skip to content

feat(lab): TabBar — the active search field rides above the keyboard - #8243

Draft
vjeux wants to merge 2106 commits into
meta:mainfrom
vjeux:uikit/c15-tabbar-search-motion
Draft

vjeux wants to merge 2106 commits into
meta:mainfrom
vjeux:uikit/c15-tabbar-search-motion

Conversation

@vjeux

@vjeux vjeux commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Depends on #8222 and #8224.

Review only this PR's change: vjeux/astryx@6793453...c79ed7f

User need

Part of matching Astryx's touch components to iOS 26, so apps built with it feel native on phones. On iOS, activating the search tab lifts its field above the keyboard, with Cancel beside it; in #8222 it stays under the keyboard, hiding what people type. This adds both.

Problem and solution fit

  • Place: while active under a finger, until the keyboard is down, its bottom sits 8 px above the keyboard, set once per keyboard report.
  • No page jump: every focus the bar takes passes {preventScroll: true}.
  • Cancel: the search circle becomes a Cancel button beside the field, outside the tab list.

Current specification

spec:AST-099 FR2–FR5 and FR8; spec:AST-094 FR13, FR24. An engineering owner decides (no record governs it): Cancel as its own button over the search circle, named by @astryx.tabBar.cancelSearch.

Public delta and caller burden

fieldRef may carry cancel() and its focus takes options; core gains the keyboard gap, the cancel delay, @astryx.tabBar.cancelSearch, and #8224's search in internal/motion.

Size, gzip against #8222's head: TabBar's import 66.7 → 67.9 KB JavaScript, 1,968 → 1,980 B CSS.

Design and alternatives

  • Chosen: the field is set from the keyboard's own reports, once each (exact, with no frame loop); Cancel is its own button, so the tab list holds only tabs.
  • Rejected: riding the keyboard's animation (a Lab surface can't follow it reliably, INV11); the search circle itself as Cancel (a tab switching roles inside the tab list).

Evidence

iOS 26.2 simulator before (#8222) and after; Android 15 Chrome with Gboard; Firefox for Android.

iOS before
iOS after
Android, Chrome
Firefox for 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 → … → #8222 → this PR, with #8224 merged in.

Testing

Try it: pnpm storybook, Lab › TabBar › Search Tab, on a phone.

  • Tap the search circle: the keyboard comes up with the field just above it and Cancel beside it; the page stays put.
  • Tap Cancel: the keyboard goes down and the bar returns to your tab.
  • With a mouse, the search tab selects in place.

Browser tests, with a simulated keyboard: the field lands 8 px above it and Cancel beside the circle, unanimated; nothing listens to the keyboard outside search; Cancel hands focus to the bar. On Firefox for Android the field rises over the real keyboard without panning the page.

Passing: pnpm test:interaction TabBar, pnpm vitest run packages/lab/src/TabBar packages/lab/src/SearchField, 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:13am UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Oct 24, 2026
@astracat-bot

astracat-bot Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

AI review status for this pull request.

Review status Updated
❓ Needs maintainer input (for maintainers only) Oct 30, 2026, 2:33 AM UTC

@github-actions

github-actions Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

📚 Storybook Preview

View Storybook for this PR

🧪 Sandbox Preview

View Sandbox for this PR

New Components

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

Component Size

Component Import before Import after Delta CSS before CSS after Delta
core/AlertDialog 56.9KB 57.2KB +342B 12.4KB 12.4KB 0B
core/AppShell 57.9KB 58.2KB +289B 11.6KB 11.6KB 0B
core/AvatarGroupOverflow 39.9KB 40.3KB +353B 6.4KB 6.4KB 0B
core/Banner 47.8KB 48.1KB +336B 9.9KB 9.9KB 0B
core/BaseTypeahead 54.3KB 54.6KB +289B 9.9KB 9.9KB 0B
core/BreadcrumbItem 66.4KB 66.7KB +351B 11.0KB 11.0KB 0B
core/Button 43.3KB 43.6KB +322B 9.2KB 9.2KB 0B
core/Calendar 54.9KB 55.2KB +341B 10.0KB 10.0KB 0B
core/Carousel 50.2KB 50.6KB +363B 10.2KB 10.2KB 0B
core/ChatComposer 60.6KB 60.9KB +319B 10.8KB 10.8KB 0B
core/ChatComposerInput 55.7KB 56.1KB +315B 10.1KB 10.1KB 0B
core/ChatComposerTokenElement 55.7KB 56.1KB +315B 10.1KB 10.1KB 0B
core/ChatDictationButton 46.5KB 46.8KB +314B 9.5KB 9.5KB 0B
core/ChatLayout 48.8KB 49.1KB +319B 9.9KB 9.9KB 0B
core/ChatLayoutScrollButton 46.4KB 46.7KB +301B 9.6KB 9.6KB 0B
core/ChatSendButton 45.8KB 46.1KB +312B 9.2KB 9.2KB 0B
core/CheckboxInput 49.9KB 50.2KB +319B 9.3KB 9.3KB 0B
core/CheckboxListItem 54.0KB 54.3KB +294B 10.5KB 10.5KB 0B
core/ClickableCard 12.8KB 13.1KB +289B 6.9KB 6.9KB 0B
core/CodeBlock 60.5KB 60.8KB +326B 10.7KB 10.7KB 0B
core/Collapsible 11.7KB 12.0KB +291B 4.2KB 4.2KB 0B
core/CommandPalette 50.9KB 51.2KB +330B 11.8KB 11.8KB 0B
core/CommandPaletteItem 8.4KB 8.7KB +280B 3.5KB 3.5KB 0B
core/ComplexSelector 55.8KB 56.2KB +369B 10.6KB 10.6KB 0B
core/ContextMenu 77.7KB 78.1KB +325B 14.6KB 14.6KB 0B
core/ContextMenuItem 16.6KB 16.8KB +280B 5.2KB 5.2KB 0B
core/DateInput 99.9KB 100.2KB +292B 14.8KB 14.8KB 0B
core/DateRangeInput 69.4KB 69.7KB +315B 11.2KB 11.2KB 0B
core/DateTimeInput 110.1KB 110.4KB +299B 15.2KB 15.2KB 0B
core/DialogHeader 48.8KB 49.1KB +325B 9.8KB 9.8KB 0B
core/DrawerHeader 48.9KB 49.2KB +296B 11.2KB 11.2KB 0B
core/DropdownMenu 72.7KB 73.0KB +325B 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 +317B 9.5KB 9.5KB 0B
core/FileInput 54.1KB 54.4KB +309B 10.3KB 10.3KB 0B
core/IconButton 43.3KB 43.6KB +320B 9.2KB 9.2KB 0B
core/Item 11.4KB 11.6KB +273B 4.7KB 4.7KB 0B
core/LayerProvider 63.3KB 63.6KB +335B 10.1KB 10.1KB 0B
core/Lightbox 51.2KB 51.5KB +295B 9.8KB 9.8KB 0B
core/Link 43.5KB 43.8KB +335B 7.6KB 7.6KB 0B
core/ListItem 53.5KB 53.8KB +318B 10.5KB 10.5KB 0B
core/Markdown 144.5KB 144.7KB +293B 17.4KB 17.4KB 0B
core/MobileNav 51.0KB 51.3KB +309B 10.1KB 10.1KB 0B
core/MobileNavToggle 46.2KB 46.5KB +308B 9.4KB 9.4KB 0B
core/MoreMenu 72.9KB 73.2KB +324B 14.7KB 14.7KB 0B
core/MultiSelector 76.2KB 76.5KB +319B 14.6KB 14.6KB 0B
core/NumberInput 55.7KB 56.0KB +325B 10.7KB 10.7KB 0B
core/Outline 28.6KB 29.0KB +335B 4.0KB 4.0KB 0B
core/Pagination 87.7KB 88.0KB +309B 15.3KB 15.3KB 0B
core/Popover 49.8KB 50.1KB +282B 12.1KB 12.1KB 0B
core/PowerSearch 155.1KB 155.4KB +314B 18.6KB 18.6KB 0B
core/RadioListItem 52.1KB 52.5KB +334B 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 +317B 15.0KB 15.0KB 0B
core/SelectorOption 14.5KB 14.8KB +251B 5.1KB 5.1KB 0B
core/SideNav 58.0KB 58.3KB +318B 10.6KB 10.6KB 0B
core/SideNavCollapseButton 46.6KB 46.9KB +286B 9.5KB 9.5KB 0B
core/SideNavHeading 54.7KB 55.0KB +297B 10.1KB 10.1KB 0B
core/SideNavItem 54.5KB 54.8KB +317B 10.1KB 10.1KB 0B
core/Step 32.4KB 32.7KB +326B 5.3KB 5.3KB 0B
core/Stepper 47.4KB 47.7KB +311B 9.6KB 9.6KB 0B
core/Switch 48.4KB 48.7KB +330B 9.3KB 9.3KB 0B
core/Tab 9.7KB 10.0KB +294B 4.1KB 4.1KB 0B
core/TabMenu 51.6KB 51.9KB +316B 10.0KB 10.0KB 0B
core/Table 84.0KB 84.3KB +302B 15.1KB 15.1KB 0B
core/TableCell 78.8KB 79.1KB +315B 14.8KB 14.8KB 0B
core/TableHeaderCell 78.6KB 78.9KB +323B 14.8KB 14.8KB 0B
core/TableSelectionToolbar 52.4KB 52.7KB +324B 11.2KB 11.2KB 0B
core/TextInput 53.5KB 53.8KB +331B 10.5KB 10.5KB 0B
core/Thumbnail 50.7KB 51.0KB +320B 11.0KB 11.0KB 0B
core/TimeInput 86.8KB 87.2KB +320B 13.8KB 13.8KB 0B
core/Timestamp 27.5KB 27.6KB +49B 9.5KB 9.5KB 0B
core/Toast 59.8KB 60.1KB +305B 9.7KB 9.7KB 0B
core/ToggleButton 44.1KB 44.4KB +291B 9.3KB 9.3KB 0B
core/Token 29.6KB 29.9KB +337B 4.5KB 4.5KB 0B
core/Tokenizer 64.8KB 65.2KB +358B 11.7KB 11.7KB 0B
core/TopNav 51.9KB 52.2KB +322B 10.4KB 10.4KB 0B
core/TopNavHeading 54.2KB 54.4KB +277B 9.9KB 9.9KB 0B
core/TopNavItem 9.0KB 9.3KB +283B 3.8KB 3.8KB 0B
core/TopNavMegaMenu 54.2KB 54.5KB +316B 10.8KB 10.8KB 0B
core/TopNavMegaMenuItem 9.1KB 9.4KB +281B 4.1KB 4.1KB 0B
core/TopNavMenu 53.6KB 53.9KB +306B 10.1KB 10.1KB 0B
core/TreeList 32.5KB 32.9KB +325B 4.7KB 4.7KB 0B
core/Typeahead 61.5KB 61.8KB +314B 11.3KB 11.3KB 0B
lab/SearchField N/A 58.4KB N/A N/A 1.2KB N/A
lab/TabBar N/A 67.9KB N/A N/A 1.9KB N/A
lab/TabBarItem N/A 5.3KB N/A N/A 1.9KB N/A
lab/TabBarMoreList N/A 55.5KB N/A N/A 2.0KB 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 5.1KB 1.9KB 2.1KB +209B
Package stylesheet Gzip before Gzip after Delta
@astryxdesign/core 34.6KB 34.6KB 0B
@astryxdesign/lab 11.1KB 12.3KB +1.2KB

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. Nothing on main governs the TabBar's active search behavior (the field riding above the keyboard and the search circle becoming a Cancel button), and the draft touch-presentations spec this PR adds is not yet approved. An engineering owner can provide or identify the governing spec for that behavior 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. These changes are needed whatever that decision is:

  • Land the stacked predecessors first, so this PR carries only its own commit instead of about 39,000 changed lines.
  • Run the new interaction proofs under an existing CI owner, or amend the CI routing spec, instead of adding a separately routed pr-interaction job.
  • Give SearchField's default clear and close button names catalog messages instead of English literals.
  • Move the active Cancel button out of the tab list, which otherwise has no available tab while search is active.

[Automated review]

Comment thread packages/lab/src/TabBar/TabBar.tsx Outdated
<button
type="button"
// Active, the circle is the field's cancel button, not a tab.
role={isSearchActive ? undefined : 'tab'}

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 search is active, this button stays inside the role="tablist" capsule but drops role="tab", and every item tab is inert while searching. The tab list then exposes no tab and a stray "Cancel" button. Rendering the active Cancel button outside the tablist, beside the minimized circle, would avoid that.

Comment thread packages/lab/src/TabBar/TabBar.tsx Outdated
}
tabIndex={isSearchSelected ? 0 : -1}
ref={searchMotion.circle}
inert={isSearchSelected && !isSearchActive}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

When onActiveChange(false) leaves the search tab selected (for example onActiveChange={setIsActive}, as in the component's test), this focused button turns inert in the same commit, and keyboard or VoiceOver focus falls to the document. Moving focus to the inline field or the collapsed circle first would keep it.

Comment on lines +403 to +404
cancelLabel = 'Cancel',
clearLabel = 'Clear text',

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

These English defaults become the clear and close buttons' accessible names. Astryx-owned assistive strings should come from the message catalog through t(), as TabBar's Cancel does; the props can stay as overrides.

Comment thread .github/workflows/ci.yml Outdated
if git fetch --quiet --no-tags --depth=1 origin "$BASE_SHA" \
&& git show "$BASE_SHA:.github/scripts/pr-scope-touches.sh" > "$helper"; then
scope=0
bash "$helper" "$BASE_SHA" '^(internal/interaction-harness/|playwright\.interaction\.config\.ts$|packages/[^/]+/src/|apps/storybook/)' || scope=$?

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 job routes itself with its own path regex and adds a separate pr-interaction check. The CI routing spec (AST-030 FR11) asks new coverage inside an existing surface to join that surface's existing owners instead, or to amend the spec to admit a new owner.

const range = doc.caretRangeFromPoint?.(x, y);
if (
range != null &&
editable.isContentEditable &&

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Only a contenteditable target gets the caret placed under the finger. For a claimed textarea or input, the browser's own tap is cancelled, so the first tap focuses without moving the caret.

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.

An iPad mini in portrait (744 px wide) got the sheet under the old (max-width: 768px) query, so it flips to the popover here rather than keeping it; 768 px tablets flip the same way.

@cixzhang

Copy link
Copy Markdown
Contributor

Posted by Cindy's agent on her behalf.

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

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

@vjeux

vjeux commented Oct 24, 2026

Copy link
Copy Markdown
Contributor Author

Agreed: one implementation.

vjeux added a commit to vjeux/astryx that referenced this pull request Oct 25, 2026
@vjeux
vjeux force-pushed the uikit/c15-tabbar-search-motion branch from 9207607 to c589f05 Compare October 25, 2026 11:12
@github-actions github-actions Bot added the needs:design-review Affects visuals — Design should review label Oct 25, 2026

@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. Nothing on main governs the TabBar's active-search Cancel button (the search circle becoming a button named "Cancel", and the collapsed bar no longer being a tab list while it shows), while the field's rest above the keyboard already follows spec:AST-099. An engineering owner needs to provide or identify the governing spec for that behavior 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. These changes are needed whatever that decision is:

  • Land the stacked predecessors first, so this PR carries only its own commit instead of about 49,500 authored lines.
  • Run the interaction proofs inside an existing CI owner, or amend spec:AST-030, instead of adding the separately routed pr-interaction job.
  • Keep focus when Cancel ends search but the search tab stays selected; today the circle turns inert and focus falls to the page.
  • Blur the field when Cancel falls back to onActiveChange(false), as spec:AST-099 FR5 requires, and add the Firefox for Android evidence that AST-099 makes a merge gate.

[Automated review]

Comment thread packages/lab/src/TabBar/TabBar.tsx Outdated
tabIndex={isSearchSelected ? 0 : -1}
// Under a finger, while the field waits inline, it is faded
// out; under a mouse it stays, selected, in place.
inert={isSearchSelected && isTouch && !isSearchCancel}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

When Cancel ends search but the caller keeps the search tab selected (as lab-tabbar--more-tab-with-search does with onActiveChange={setIsSearchActive}), this circle turns inert in the same commit while it holds focus, and focus falls to <body>. Activating Cancel from the keyboard in that story leaves document.activeElement on the body (WCAG 2.2 SC 2.4.3). Moving focus to the leading circle, or to the field's search landmark as SearchField's own keyboard cancel does, before the circle goes inert would keep it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in df384bf: Cancel is now its own button over the circle, outside the tab list. Activated from the keys, it hands focus to the collapsed bar's circle (or to the selected tab once the bar expands) before it goes. A test focuses Cancel, activates it, and checks focus lands on the circle.

Comment thread packages/lab/src/TabBar/TabBar.tsx Outdated
Comment on lines +985 to +987
} else {
search.onActiveChange?.(false);
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Without a cancel() on the handle (the doc's "An input element works" case), nothing blurs the field here. The glass plays its deactivation back while the input keeps focus and the keyboard stays up, and the field stays lifted because keyboardHeight > 0. spec:AST-099 FR5 asks that a moving surface blur its focused control, and architecture:react-component-runtime INV11 applies that to Lab. Calling field?.blur() before onActiveChange(false) would do it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in df384bf: without a cancel() on the handle, Cancel blurs the field before onActiveChange(false), so the keyboard goes as the field moves. A test checks the field loses focus.

Comment thread .github/workflows/ci.yml Outdated
if git fetch --quiet --no-tags --depth=1 origin "$BASE_SHA" \
&& git show "$BASE_SHA:.github/scripts/pr-scope-touches.sh" > "$helper"; then
scope=0
bash "$helper" "$BASE_SHA" '^(internal/interaction-harness/|playwright\.interaction\.config\.ts$|packages/[^/]+/src/|apps/storybook/)' || scope=$?

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 job routes itself with its own path regex and adds a separate pr-interaction check. spec:AST-030 FR11 says new coverage inside an existing surface "MUST join those owners and MUST NOT create a separately routed lane or required context", and FR10 says a new test type is not a new surface. Running these proofs as steps of an existing routed owner that already consumes the Storybook artifact, or amending AST-030 under FR10, would resolve it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The pr-interaction lane is the interaction harness's (#8043/#8045).

@cixzhang

Copy link
Copy Markdown
Contributor

Posted by Cindy's agent on her behalf.

The open spec question on this PR is the contract is settled by spec:AST-099. vjeux's own hold on this PR stands.

Still needed: i18n for the literals, Cancel inside the tablist, the spec:AST-030 FR11 test lane, and AST-099 conformance.

@vjeux
vjeux force-pushed the uikit/c15-tabbar-search-motion branch from c589f05 to df384bf Compare October 26, 2026 02:30
@vjeux

vjeux commented Oct 26, 2026

Copy link
Copy Markdown
Contributor Author

The four items from the last review are in df384bf.

  • i18n for the literals. There are none left in TabBar: Cancel is @astryx.tabBar.cancelSearch, the badge name is @astryx.tabBar.badgedItem, More is @astryx.tabBar.more. The remaining English strings are the stories' own app copy.
  • Cancel inside the tablist. It is no longer: Cancel is its own button over the search circle, outside the tab list, whose tabs (the search tab included) stay inert while searching. Activated from the keys it hands focus on to the collapsed bar's circle, or to the selected tab once the bar expands, so focus never falls to the page.
  • AST-099 conformance. Without a cancel() on the handle, Cancel now blurs the field before onActiveChange(false), so the keyboard goes as the field moves (FR5). The Firefox-for-Android evidence the spec makes a merge gate is in the body: the field rests 8 px above the keyboard, the page never pans, and Cancel takes the keyboard down and hands focus to the bar. That take also caught a real defect — focus moves inside the bar were panning the page — now fixed with {preventScroll: true} on every focus the bar takes.
  • The spec:AST-030 FR11 test lane. That job belongs to the interaction harness (test(interaction): real touch input for browser interaction proofs #8043/test(interaction): frame evidence #8045), where its routing is being settled; this PR adds none of its own.

On the hold: there is no hold from vjeux on this PR — no draft state, no label, no line in the body or the threads. The body's old "Proposed; pending owner review" line was the only thing that read like one, and it now says plainly what it is: the Cancel button's role is the owner decision this PR asks for.

vjeux added 5 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 a commit to vjeux/astryx that referenced this pull request Oct 29, 2026
At this layer's text too: the tab list's name, the circle and the split
glass mounted only when the bar can collapse, leaving search from a disabled
tab, the field held above the keyboard after Cancel, and the comments saying
the tab bar's springs play as measured.
vjeux added a commit to vjeux/astryx that referenced this pull request Oct 29, 2026
The no-scrollend case removes the handler from the global object too.
vjeux added a commit to vjeux/astryx that referenced this pull request Oct 29, 2026
vjeux added a commit to vjeux/astryx that referenced this pull request Oct 29, 2026
vjeux added a commit to vjeux/astryx that referenced this pull request Oct 29, 2026

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This needs an engineering owner's decision before it can be approved: no spec on main governs the TabBar's active-search Cancel button (its own button over the search circle, outside the tab list, that ends the search), so an engineering owner needs to provide or identify the governing spec for it 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. The field's hold above the keyboard after Cancel now follows spec:AST-099 FR5, including a Cancel that returns to the previous tab. Whatever that decision, these changes are needed:

  • Take the keyboard height from the visual viewport in Chrome on Android too, and stop setting overlaysContent, in useKeyboardHeight.ts, as spec:AST-099 FR6, FR8 and DEC-4 require.
  • Land the stacked predecessors so this pull request carries only its own layer instead of about 44,600 authored lines.

[Automated review]

Comment thread packages/lab/src/TabBar/TabBar.doc.mjs Outdated
name: 'TabBarSearchTab',
displayName: 'Tab Bar Search Tab',
description:
'The search tab, as on iOS 26: a circle as tall as the bar at its trailing end, apart from the other tabs, which share a narrower capsule. Choosing it selects it like any tab, collapses the bar to a circle holding the tab it was chosen from (a tap on that circle returns there) and shows its field in the bar; by default the same tap activates the field and focuses it, which raises the keyboard on a phone. Active, the field spans the screen but for the search circle, which becomes its cancel button; on a phone both sit above the keyboard. Under a mouse it selects in place: the bar stays expanded and the field shows at once above it, focused, where the bottom accessory sits; Escape returns to the tab it was chosen from. TabBar reads its props and draws it; it renders nothing on its own.',

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

On this head the search circle stays an inert tab while a separate Cancel button lies over it, outside the tab list, and cancels through fieldRef.cancel() or blurs the field and calls onActiveChange(false) (TabBar.tsx:1200-1230, :1742-1758). Describing that button here, rather than the circle becoming the cancel button, keeps the consumer docs matching what renders.

vjeux added 4 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).
vjeux added 10 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.
The component doc said the search circle becomes the cancel button; the
circle stays a tab, out of reach while the field is active, and a separate
Cancel button lies over it.

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This needs an engineering owner's decision before it can be approved: no spec on main governs the TabBar's active-search Cancel button (its own button over the search circle, outside the tab list, named by @astryx.tabBar.cancelSearch), so an engineering owner needs to provide or identify the governing spec, or record the decision by commenting /approve-spec <full head SHA> on this pull request, which the author may do as an engineering owner. Independently of that decision, two changes are still required, and two small fixes remain (Lab's second isRtlElement, and docs that still call the search circle the cancel button):

  • Lab's keyboard module takes Chrome's navigator.virtualKeyboard report as the keyboard height and turns on overlaysContent (packages/lab/src/keyboard/useKeyboardHeight.ts:124-203), while spec:AST-099 FR6, FR8 and DEC-4 require the visual-viewport measurement in every browser and forbid overriding the app's own viewport setting.
  • The branch carries about 44,600 authored lines of stacked work; landing the predecessors so this pull request holds only its own layer is needed to review and revert it as one change.

[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: no spec on main governs the TabBar's active-search Cancel button (its own button over the search circle, outside the tab list, named by @astryx.tabBar.cancelSearch), so an engineering owner needs to provide or identify the governing spec, or record the decision by commenting /approve-spec <full head SHA> on this pull request, which the author may do as an engineering owner. The consumer docs now describe that Cancel button correctly; independently of the decision, two changes are still required, and two small fixes remain (Lab's second isRtlElement, and the fieldRef JSDoc and code comments in TabBar.tsx and useTabBarSearch.ts that still call the search circle the cancel button):

  • Lab's keyboard module takes Chrome's navigator.virtualKeyboard report as the keyboard height and turns on overlaysContent (packages/lab/src/keyboard/useKeyboardHeight.ts:124-203), while spec:AST-099 FR6, FR8 and DEC-4 require the visual-viewport measurement in every browser and forbid overriding the app's own viewport setting.
  • The branch carries about 44,700 authored lines of stacked work; landing the predecessors so this pull request holds only its own layer is needed to review and revert it as one change.

[Automated review]

Comment on lines +267 to +272
/**
* The field's handle: focused by the tap that activates it, and cancelled
* (`cancel`, when it has one) by the search circle, which is the active
* field's cancel button under a finger. Without `cancel`, the circle
* reports `onActiveChange(false)`.
*/

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 JSDoc still says the field is cancelled by the search circle and that, without cancel, the circle reports onActiveChange(false). On this head a separate Cancel button over the circle does both, blurring the field first when the handle has no cancel (lines 1205-1230), and the consumer docs now say so (TabBar.doc.mjs:172). Worth wording it the same way, along with the header at lines 87-89 and useTabBarSearch.ts lines 26-31 and 79-80.

This branch was successfully deployed

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