Skip to content

feat(Selector): defer touch-sheet search focus - #11987

Open
korkt-kim wants to merge 6 commits into
meta:mainfrom
korkt-kim:korkt-kim/issue-11963-selector-keyboard
Open

korkt-kim wants to merge 6 commits into
meta:mainfrom
korkt-kim:korkt-kim/issue-11963-selector-keyboard

Conversation

@korkt-kim

@korkt-kim korkt-kim commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

fixes #11963

Primary intent

Let a person open a searchable touch sheet to browse options without starting search. This intentionally changes initial focus rather than restoring a requirement of the existing focus contract, so it uses the general-change template.

User or maintainer impact

Before this change, tapping a searchable Selector or MultiSelector to open its touch sheet immediately focused search. On a phone, that can bring up the keyboard and cover the options before the person sees them.

Problem and solution fit

Moving focus away from search after the sheet opens is too late: the browser may already have focused the input. For a searchable sheet on a coarse primary pointer, the selector makes the panel the native dialog's autofocus target before showModal() runs. The selector's show callback still focuses search for popovers, but no longer does so for sheets.

Typing on a closed, focused Selector trigger is a request to search. In that case the opening character seeds the query and the sheet moves focus to the input on the next frame. The person can keep typing without losing or duplicating the first character. Closing clears that request, so a later tap opens on the panel again.

Authority

#11963 describes the touch-sheet problem. At the merge base, Selector AR2 names search or the listbox as the focus destination. MultiSelector FR8 explicitly chooses search with hasSearch in its renderTrigger contract.

This PR proposes a different rule for a searchable bottom sheet on a coarse primary pointer: a tap focuses the panel without first focusing search; typing to open Selector moves focus into search with the typed query. The rule covers explicit bottom-sheet and adaptive resolved to a sheet, including MultiSelector's caller-rendered trigger. Searchable popovers and fine-pointer sheets still focus search; sheets without search still focus the listbox.

Change and evidence

The implementation changes Selector, MultiSelector and their shared selector presentation. Regression tests, amendments to the two component contracts, and a Core patch changeset accompany it. No public prop is added.

Before and after

  • Tap to browse: in the original browser comparison, tapping either control focused search on the base. On d96cb112ce, the component tests check that a tap focuses the panel without focusing search. Selector also starts on the panel when reopened during its close transition.
  • Type to search (Selector): with the earlier panel-focus implementation, typing B on the closed trigger and then an left the input at B. The same sequence now leaves focus in search with Ban; a later pointer reopen focuses the panel.
  • Representative unchanged paths: tapping search still lets a person select Banana. With MultiSelector's caller-rendered trigger, Tab reaches search, selecting Banana calls onChange with ['Banana'] and leaves the sheet open, and Escape returns focus to the trigger. Fine-pointer searchable popovers still focus search on open.

Historical browser comparison

Playwright Chromium 149.0.7827.55 on macOS, 390 × 844, Neutral theme, light mode, English/LTR. Both controls were checked with a coarse pointer in forced bottom-sheet and compact adaptive presentations, and with a fine pointer in a forced popover: six cases per revision, twelve in total. Each case checks opening, intentional search, selection, close/focus return, and a completed-close reopen.

The two videos show the forced touch-sheet sequence for Selector followed by MultiSelector. They use the same fixture, native showModal(), and focus-event, selected-value and onChange readouts. AS-IS (6919cd34ac) shows search taking focus on open; TO-BE (193cd51173) shows the panel taking focus with no search-input focusin before the person taps it. These are earlier revisions, not recordings of d96cb112ce. The videos do not show typing on the closed trigger or reopening during the close transition; the current component tests cover those cases. No recording fixture or media is added to the source diff.

These are desktop touch-emulation recordings of browser focus, not recordings of an Android/iOS soft keyboard. They do not establish keyboard-fit geometry or screen-reader speech.

AS-IS

selector-touch-focus-as-is.mp4

TO-BE

selector-touch-focus-to-be.mp4

Scope

Components: Selector, MultiSelector

  • This PR has one primary intent: initial focus in searchable touch sheets.
  • Shared height="hug" keyboard fitting is outside this PR. Neither BottomSheet sizing nor useMobileKeyboard changes.
  • Public text and artifacts contain no internal Meta context.

Testing

  • pnpm exec vitest run --project ui packages/core/src/Selector/Selector.test.tsx packages/core/src/MultiSelector/MultiSelector.test.tsx -t 'opens a searchable.*touch sheet|keeps typing in search when a character opens a touch sheet' --maxWorkers=2 — 3 focused jsdom tests passed on d96cb112ce.
  • pnpm exec vitest run --project ui packages/core/src/Selector packages/core/src/MultiSelector packages/core/src/BottomSheet packages/core/src/keyboard --maxWorkers=2 --testTimeout=120000 — 1,470 tests passed across 44 files in those four suites.
  • pnpm -F @astryxdesign/core typecheck, pnpm lint:strict (including the repository and knowledge checks), and pnpm build passed locally.

Writing rubric results

  • R1 narration: the amended focus clauses state behavior in the present tense. Compatibility summaries now identify the initial-focus change instead of describing it as unchanged behavior.
  • R2 research: no survey or comparison was added to either record; browser comparisons remain in the PR evidence.
  • R3 evidence: the amended verification rows point to the checked-in component tests for panel focus, typing to open, and the caller-rendered trigger. The browser recordings are PR evidence, not cited as checked-in tests.
  • R4 rejected alternatives: no alternative was added; the existing decision-log rejections are unchanged.
  • R5 change references: neither component record contains a PR or issue link or a #-number reference.
  • R6 open questions: neither record adds or changes an open question. The focus rules are in the accessibility contracts.
  • R7 project status: no work sequence or completion status was added. Selector's pre-existing pending-resolver wording remains outside this focus amendment; unrelated requirement gaps and release-lifecycle entries are retained.

@vercel

vercel Bot commented Nov 16, 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 Nov 27, 2026 10:47am UTC

Request Review

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

astracat-bot Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
❓ Needs maintainer input (for maintainers only) Nov 27, 2026, 10:49 AM UTC

@github-actions github-actions Bot added community Authored by a community contributor (not on the eng/design team) needs:code-review High-risk change (new package/component/API) — needs human code review before merge needs:design-review Affects visuals — Design should review labels Nov 16, 2026
@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · 8d60c57

This branch's preview address cannot be known in advance; open it from Vercel's comment.

Current run: The current CI run concluded failure. Current analysis is unavailable.


Generated by PR Enrichment workflow | View current CI run

@duytbp

duytbp commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

Thanks for taking this on! On the head, with a coarse pointer, both Selector and
MultiSelector with hasSearch open their sheet (presentation="bottom-sheet", and
"adaptive" with a compact viewport) without ever calling focus() on the search; focus lands
inside the sheet, and focusing the search afterwards works. With a fine pointer the popover still
focuses its search. The touch cases fail on the merge base and pass here; the Selector,
MultiSelector and BottomSheet suites pass (638 tests).

A few things before it's ready, from the reporter's side:

  1. Spec. Selector AR2 and MultiSelector FR8 still say the search (or listbox) takes focus on
    open. As you note, this needs a spec change or a ruling in the same PR.
  2. Focus target. Focus goes to the panel div rather than the sheet's title. The issue
    suggested the title: a heading names the sheet when a screen reader lands on it, whereas a
    generic focusable panel may read nothing useful or the whole content. Focusing the Heading
    (with tabIndex={-1}), or the dialog itself, would read better.
  3. Browser proof. The initial focus relies on the browser's dialog focusing steps picking the
    panel's autofocus attribute, which the jsdom test mocks inside showModal. A run on Android
    Chrome, or Playwright with touch emulation, showing document.activeElement after the sheet
    opens would confirm it.
  4. Scope. The hug-height keyboard fit changes every height="hug" BottomSheet with a text
    field, not only Selector's, and drops 'hug' from the existing "does not add keyboard
    behavior to a %s height" test. That's a contract change of its own; splitting it into a
    separate PR (with a spec line) would make both easier to land.

With 1 to 3 addressed, the focus half would resolve #11963's main report; the keyboard-fit half
would then follow in its own PR.

@korkt-kim

Copy link
Copy Markdown
Contributor Author

@cixzhang Could you decide whether searchable Selector and MultiSelector touch sheets should adopt initial panel focus, with search taking focus only when the person enters it, and record that outcome in their owning contracts if accepted?

At 193cd511737f1efd0a0e3100a4a6fdbfd4d8172b, Selector AR2 still sends touch-sheet focus to search or the listbox. MultiSelector FR8 also specifies search/listbox focus for its caller-rendered trigger. The change in this PR intentionally differs from those clauses; the issue report alone does not settle that contract.

The proposed boundary is hasSearch with a resolved bottom-sheet presentation on a coarse pointer, including compact adaptive: the panel receives initial focus without first focusing search. Searchless sheets keep listbox focus, and popovers and fine-pointer sheets keep their existing focus behavior. This question concerns initial focus, not the hug-height keyboard-layout change.

There is an existing sibling pattern: Tokenizer FR18 and PowerSearch FR13 explicitly put initial focus on the panel, not search. They motivate this choice but do not override Selector's own contract.

The AS-IS/TO-BE recordings in the description use merge base 6919cd34ac and the exact PR head 193cd51173, not the uncommitted working tree. Native Chromium checks cover both controls in coarse-pointer forced/adaptive sheets and fine-pointer popovers: the head's touch sheets focus the panel with no intervening search focus event; intentional search, selection, close/return and a completed-close reopen remain usable. These checks prove browser focus, not mobile-keyboard geometry or screen-reader speech.

@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 16, 2026
@korkt-kim

Copy link
Copy Markdown
Contributor Author

@duytbp Thanks for checking this. I've added the spec changes in eb6dacf: searchable coarse-pointer sheets start on the panel, including adaptive sheets and MultiSelector's renderTrigger path. Popovers, fine-pointer sheets and sheets without search keep their existing focus behavior. This is a proposed behavior change, not just a docs correction, and still needs owner approval.

The AS-IS/TO-BE videos are in the description now. They use native Chromium with touch emulation and show the panel taking focus without search receiving a focus event on opening. They're not a real-phone keyboard test.

I'm keeping the panel target, as Tokenizer and PowerSearch do. I haven't checked screen-reader announcements, so I can't claim it reads better than the heading. The shared hug keyboard change is still in this PR too; I haven't split that part.

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for the clear write-up and the before/after comparison. This can't be approved yet: opening touch sheets on the panel intentionally changes the current Selector AR2 and MultiSelector FR8 focus rules, so an engineering owner has to accept or reject the amended clauses by commenting /approve-spec <full head SHA> (you can do that yourself only if you are an engineering owner). Whatever that decision, these need changes:

  • Typing on a searchable Selector's trigger on a touch device now keeps only the first character, because the sheet opens on the panel (SelectorBottomSheet.tsx:71) while the trigger only seeds keys it still holds, which breaks Selector FR7's unchanged closed-trigger typeahead (in touch-emulated Chromium, typing "Ban" leaves "B"), so keep focusing search when a typed character opens the sheet.
  • BottomSheet.doc.mjs (the height and children descriptions and the dense summary) and browser-support.doc.mjs still say only a fully expanded Tall sheet handles the on-screen keyboard, which is no longer true for hug sheets.
  • The new verification rows in Selector.spec.md and MultiSelector.spec.md cite "native-dialog browser focus checks" that are not committed, so add that browser check or drop the phrase.
  • The on-screen keyboard record (AST-099) requires iOS Simulator (Safari) and Android emulator (Chrome with Gboard) results at this head for a Selector search row in its hug sheet, stated in the description as device or emulator, browser, head, animation scale and result.

The branch also conflicts with main in useSelectorPresentation.ts and needs a rebase.

Claims and files checked

Review mode: full; reason: no-earlier-review

  • Claims
    • Changeset: searchable touch sheets stay on the panel until search is requested: false for typing on the trigger (Selector.tsx:1426, SelectorBottomSheet.tsx:71; "Ban" becomes "B").
    • Changeset: hug sheets fit above the on-screen keyboard: verified in jsdom (new BottomSheet.test.tsx case fails on the base, passes on the head); no simulator or emulator result.
    • Changeset: desktop popovers still focus search on open: verified (Selector.tsx:1426, MultiSelector.tsx:1481).
    • Description: before, searchable sheets focus search on open, forced and adaptive: verified (new tests fail on the base; Chromium probe).
    • Description: after, the panel takes focus with no search focus event, including on reopen: verified (Selector.test.tsx, MultiSelector.test.tsx; Chromium probe).
    • Description: popovers, fine-pointer sheets and sheets without search keep their focus: verified (Selector.tsx:1426, SelectorBottomSheet.tsx:74-76).
    • Description: the rule covers forced sheets, adaptive sheets and the caller-rendered trigger: verified (useSelectorPresentation.ts:636; MultiSelector.test.tsx).
    • Description: the hug keyboard path also applies outside Selector: verified (BottomSheetPanel.tsx:980-982).
    • Description: no public prop is added: verified (API surface generator, 0 rows).
    • Description: search, selection, close and reopen still work: verified in jsdom (new tests).
    • Description: the focused tests and the knowledge check pass: verified (1,388 tests across the four folders; knowledge check exit 0).
    • Description rubric R3: verification entries name existing tests and native-dialog focus checks: false; no such check is committed.
    • Description rubric R1 and R5: present tense, no pull request or issue references in the records: verified.
  • Files
    • .changeset/selector-touch-search.md: finding (typing on the trigger)
    • docs/specs/components/MultiSelector/MultiSelector.spec.md: finding (owner decision; verification row)
    • docs/specs/components/Selector/Selector.spec.md: finding (owner decision; verification row)
    • packages/core/src/BottomSheet/BottomSheet.test.tsx: clear
    • packages/core/src/BottomSheet/BottomSheetPanel.tsx: finding (consumer docs not updated)
    • packages/core/src/MultiSelector/MultiSelector.test.tsx: clear
    • packages/core/src/MultiSelector/MultiSelector.tsx: clear
    • packages/core/src/Selector/Selector.test.tsx: clear
    • packages/core/src/Selector/Selector.tsx: finding (typing on the trigger)
    • packages/core/src/Selector/SelectorBottomSheet.tsx: finding (typing on the trigger)
    • packages/core/src/Selector/useSelectorPresentation.ts: clear (conflicts with main)
    • packages/core/src/keyboard/README.md: clear
    • packages/core/src/keyboard/useMobileKeyboard.ts: clear in source; simulator and emulator results missing

Automated review (maintainer link)

@korkt-kim
korkt-kim force-pushed the korkt-kim/issue-11963-selector-keyboard branch from eb6dacf to d96cb11 Compare November 18, 2026 05:04
@github-actions github-actions Bot removed the needs:design-review Affects visuals — Design should review label Nov 18, 2026

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for taking the keyboard fit out of this change and for fixing typed opens. This can't be approved yet: opening touch sheets on the panel intentionally changes the current Selector AR2 and MultiSelector FR8 focus rules, so an engineering owner has to accept the amended clauses by commenting /approve-spec <full head SHA> (you can do that yourself only if you are an engineering owner) or say what keyboard-opened sheets should focus instead, since Enter on the trigger now also lands on the panel, where ArrowDown does nothing until Tab. Whatever that decision, this needs a change:

  • The description still describes the earlier revision: it claims hug-height keyboard fitting, cites the on-screen keyboard record for it and lists BottomSheet and mobile keyboard handling, all of which the last commit removed, and its before/after evidence names a commit that is no longer on this branch, so please update it to match this head.

CI has not run on this head yet; a maintainer adds the ci:run label so it runs.

Claims and files checked

Review mode: full; reason: author-not-engowner

  • Claims
    • Changeset: searchable touch sheets stay on the panel until search is requested: verified (new Selector and MultiSelector tests fail on the base and pass here; touch-emulated Chromium).
    • Changeset: typing on a closed Selector trigger opens and focuses search with the typed query: verified (new typeahead test; Chromium keeps "Ban").
    • Changeset: desktop popovers still focus search: verified (Selector.tsx:1439, MultiSelector.tsx:1488; Chromium).
    • Description: a touch sheet opens without starting search: verified.
    • Description: the change includes hug-height keyboard fitting and extends the BottomSheet keyboard path: false (reverted by the last commit; no BottomSheet or keyboard file in the diff).
    • Description: searchable popovers, fine-pointer sheets and sheets without search keep their focus: verified.
    • Description: no public prop is added: verified (API surface generator, 0 rows).
    • Description: before, sheets focus search in forced and adaptive presentations: verified (new tests fail on the base).
    • Description: after evidence at an implementation commit, with later commits leaving runtime source unchanged: false (that commit is not on this branch, and the last commit changes Selector.tsx, SelectorBottomSheet.tsx and MultiSelector.tsx).
    • Description: search, selection, close and reopen still work: verified (new tests; Chromium).
    • Description: the focused tests and the knowledge check pass: verified.
    • Description rubric R1, R5 and R7: verified.
  • Files
    • .changeset/selector-touch-search.md: clear
    • docs/specs/components/MultiSelector/MultiSelector.spec.md: waits on the owner decision
    • docs/specs/components/Selector/Selector.spec.md: waits on the owner decision
    • packages/core/src/MultiSelector/MultiSelector.test.tsx: clear
    • packages/core/src/MultiSelector/MultiSelector.tsx: clear
    • packages/core/src/Selector/Selector.test.tsx: clear
    • packages/core/src/Selector/Selector.tsx: clear
    • packages/core/src/Selector/SelectorBottomSheet.tsx: clear
    • packages/core/src/Selector/useSelectorPresentation.ts: clear
    • Pull request description: finding (stale claims)

Automated review (maintainer link)

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for bringing this up to date with main and for the clear description. This can't be approved yet: opening touch sheets on the panel intentionally changes the current Selector AR2 and MultiSelector FR8 focus rules, so approval needs an engineering owner to update that spec, either by accepting the amended clauses with a /approve-spec <full head SHA> comment on this pull request (you can do that yourself only if you are an engineering owner) or by saying what touch sheets should focus instead, including sheets opened with Enter, which now also land on the panel. Whatever that decision, this needs one change:

  • Miss: the changeset tags this intentional change to documented focus behavior as [fix], but the release record (AST-017 FR5) says a change that replaces a documented contract is not a fix, so please retag it [feat] (still a patch) and say that search used to take focus when the sheet opened.

CI has not run on this head yet; a maintainer adds the ci:run label so it runs.

Claims and files checked

Review mode: full; reason: author-not-engowner

  • Claims
    • Changeset: the [fix] category: false (an intentional replacement of a documented contract is not a fix under AST-017 FR5).
    • Changeset: searchable touch sheets stay on the panel until search is requested: verified (the new Selector and MultiSelector tests fail on the base and pass here; touch-emulated Chromium).
    • Changeset: typing on a closed Selector trigger opens and focuses search with the typed query: verified (new typeahead test; Chromium keeps "Ban").
    • Changeset: desktop popovers still focus search: verified (Selector.tsx:1450, MultiSelector.tsx:1503; Chromium).
    • Description: a tap opens a touch sheet without starting search: verified.
    • Description: the panel becomes the dialog's autofocus target before it opens, and the show callbacks focus search only for popovers: verified (SelectorBottomSheet.tsx:72-78).
    • Description: a typed opener keeps its first character, and closing clears the request: verified (new typeahead test).
    • Description: searchable popovers and fine-pointer sheets keep search, and sheets without search keep the listbox: verified (code; Chromium for popovers).
    • Description: no public prop is added: verified (API surface comparison, no rows).
    • Description: reopening during the close transition starts on the panel: verified (new Selector test).
    • Description: the caller-rendered trigger path (Tab to search, pick, sheet stays open, Escape returns focus): verified (new MultiSelector test).
    • Description: keyboard fitting, BottomSheet sizing and the keyboard hook are out of scope: verified (no such file in the diff).
    • Description: the focused tests, the four suites, typecheck and build pass: verified at this head; lint verified on the changed files.
    • Description: the recordings show earlier revisions: taken as stated.
    • Description: writing rubric R1, R5 and R7: verified.
  • Files
    • .changeset/selector-touch-search.md: finding (category)
    • docs/specs/components/MultiSelector/MultiSelector.spec.md: waits on the owner decision
    • docs/specs/components/Selector/Selector.spec.md: waits on the owner decision
    • packages/core/src/MultiSelector/MultiSelector.test.tsx: clear
    • packages/core/src/MultiSelector/MultiSelector.tsx: clear
    • packages/core/src/Selector/Selector.test.tsx: clear
    • packages/core/src/Selector/Selector.tsx: clear
    • packages/core/src/Selector/SelectorBottomSheet.tsx: clear
    • packages/core/src/Selector/useSelectorPresentation.ts: clear

Automated review (maintainer link)

Comment thread .changeset/selector-touch-search.md Resolved
@korkt-kim korkt-kim changed the title fix(Selector): defer touch-sheet search focus feat(Selector): defer touch-sheet search focus Nov 25, 2026

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for retagging the changeset; that fixes the one change the last review asked for. This still can't be approved: opening touch sheets on the panel intentionally changes the current Selector AR2 and MultiSelector FR8 focus rules, so approval needs an engineering owner to update that spec, either by accepting the amended clauses with a /approve-spec <full head SHA> comment on this pull request (you can do that yourself only if you are an engineering owner) or by saying what touch sheets should focus instead, including sheets opened with Enter, which now also land on the panel.

Separately, the branch now conflicts with main, where the sheet's markup and initial focus moved from SelectorBottomSheet.tsx into the lazily loaded SelectorBottomSheetFrame.tsx, so the panel ref callback needs to move there. CI has not run on this head; once the branch merges cleanly, a maintainer adds the ci:run label so it runs.

Claims and files checked

Review mode: full; reason: author-not-engowner

  • Claims
    • Changeset: the [feat] category with a patch bump: verified (an intentional, compatible change to documented focus behaviour).
    • Changeset: searchable touch sheets open with focus on the panel instead of search: verified (sheet code and the new Selector and MultiSelector tests).
    • Changeset: typing on a closed Selector trigger still opens and focuses search with the typed query: verified (code and the new typeahead test).
    • Changeset: desktop popovers still focus search on open: verified (both show callbacks focus search only in a popover).
    • Description: a tap opens a touch sheet without starting search: verified.
    • Description: the panel becomes the native dialog's autofocus target before it opens, and the show callbacks focus search only for popovers: verified.
    • Description: a typed opener keeps its first character, and closing clears the request: verified (code and test).
    • Description: searchable popovers and fine-pointer sheets keep search, and sheets without search keep the listbox: verified in code.
    • Description: reopening during the close transition starts on the panel: verified (test).
    • Description: the caller-rendered trigger path (Tab to search, pick, sheet stays open, Escape returns focus): verified (test).
    • Description: no public prop is added: verified from source.
    • Description: keyboard fitting, sheet sizing and the keyboard hook are out of scope: verified (file list).
    • Description: the focused tests, suites, typecheck, lint and build pass: stated for an earlier revision; not rerun on this head.
    • Description: the recordings show earlier revisions: taken as stated.
  • Files
    • .changeset/selector-touch-search.md: clear
    • docs/specs/components/MultiSelector/MultiSelector.spec.md: waits on the owner decision
    • docs/specs/components/Selector/Selector.spec.md: waits on the owner decision
    • packages/core/src/MultiSelector/MultiSelector.test.tsx: clear (conflicts with main)
    • packages/core/src/MultiSelector/MultiSelector.tsx: clear
    • packages/core/src/Selector/Selector.test.tsx: clear
    • packages/core/src/Selector/Selector.tsx: clear
    • packages/core/src/Selector/SelectorBottomSheet.tsx: clear (conflicts with main)
    • packages/core/src/Selector/useSelectorPresentation.ts: clear

Automated review (maintainer link)

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for merging main and moving the focus logic into the new on-demand sheet frame; the branch merges cleanly again, and the move keeps the behaviour the earlier reviews checked. This still can't be approved: opening touch sheets on the panel intentionally changes the current Selector AR2 and MultiSelector FR8 focus rules, so approval needs an engineering owner to update that spec, either by accepting the amended clauses with a /approve-spec <full head SHA> comment on this pull request (you can do that yourself only if you are an engineering owner) or by saying what touch sheets should focus instead, including sheets opened with Enter, which now also land on the panel. CI has not run on this head yet; a maintainer adds the ci:run label so it runs.

Claims and files checked

Review mode: full; reason: author-not-engowner

  • Claims
    • Title: touch-sheet search focus is deferred: verified (the new Selector and MultiSelector sheet tests).
    • Changeset: the [feat] category with a patch bump: verified (an intentional change to documented focus behaviour, with no public API change).
    • Changeset: searchable touch sheets open with focus on the panel instead of search: verified (tests for an explicit Selector sheet and an adaptive MultiSelector sheet with a caller trigger; every other combination reaches the same sheet frame code).
    • Changeset: people can browse without requesting the on-screen keyboard: verified as far as a DOM test can show it (search never takes focus on a tap open).
    • Changeset: typing on a closed Selector trigger still opens and focuses search with the typed query: verified (sheet and popover tests).
    • Changeset: desktop popovers still focus search on open: verified (existing Selector and MultiSelector popover tests).
    • Description: the panel becomes the native dialog's autofocus target before it opens, and the show callbacks focus search only for popovers: verified (code and the new tests' native-focus stand-in).
    • Description: a typed opener keeps its first character without duplicating it, and closing clears the request: verified (test).
    • Description: the rule covers explicit and adaptive sheets, including the caller-rendered trigger: verified.
    • Description: searchable popovers and fine-pointer sheets keep search, and sheets without search keep the listbox: verified (tests and the sheet frame's code).
    • Description: reopening during the close transition starts on the panel: verified (test).
    • Description: tapping search still allows picking an option, and the caller-trigger path (Tab to search, pick, sheet stays open, Escape returns focus) works: verified (tests).
    • Description: no public prop is added: verified from source.
    • Description: sheet sizing and the keyboard hook are out of scope, and no media is added: verified (file list).
    • Description: the focused tests, suites, typecheck, lint and build pass: reported for an earlier revision; CI has not run them on this head.
    • Description: the recordings show earlier revisions in desktop touch emulation: reported.
  • Files
    • .changeset/selector-touch-search.md: clear
    • docs/specs/components/MultiSelector/MultiSelector.spec.md: waits on the owner decision
    • docs/specs/components/Selector/Selector.spec.md: waits on the owner decision
    • packages/core/src/MultiSelector/MultiSelector.test.tsx: clear
    • packages/core/src/MultiSelector/MultiSelector.tsx: clear
    • packages/core/src/Selector/Selector.test.tsx: clear
    • packages/core/src/Selector/Selector.tsx: clear
    • packages/core/src/Selector/SelectorBottomSheetFrame.tsx: clear
    • packages/core/src/Selector/useSelectorPresentation.ts: clear

Automated review (maintainer link)

This branch was successfully deployed

1 active deployment
Preview — 8d60c574 Deployed Nov 27, 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. community Authored by a community contributor (not on the eng/design team) needs:code-review High-risk change (new package/component/API) — needs human code review before merge needs:spec-owner-review Current knowledge records await owner approval

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Selector, MultiSelector: a bottom sheet with search focuses the search on open, so the on-screen keyboard covers the options

2 participants