feat(PowerSearchMobile): the touch form of PowerSearch - #5314
Draft
imdreamrunner wants to merge 1 commit into
Draft
feat(PowerSearchMobile): the touch form of PowerSearch#5314imdreamrunner wants to merge 1 commit into
imdreamrunner wants to merge 1 commit into
Conversation
PowerSearch's desktop shape does not survive a phone: the typeahead drops a popover that fights the on-screen keyboard, and the edit popover lays field / operator / value out in a row that has nowhere to go at 390px. PowerSearchMobile keeps the props, the filter model and the tokens, and moves the building into a pinned-tall bottom sheet that drills down field -> operator -> value: - the tap target is the same input shell, showing the filters as tokens; tapping one reopens its editor, where Delete removes it - the field list is grouped, and past seven fields gains a search box pinned under the sheet title - an operator is a drill-down row, shown only when the field defines more than one; with one, the header carries it, so the happy path is two taps - enum commits on a single tap (Selector's mobile pattern), enum_list applies from a pinned footer (MultiSelector's), an empty operator lands with no value step at all, and every other type falls through to the shared value editor - nested filter groups have no touch editor yet: those fields are left out of the list and a dev warning says so Follows the mobile exploration at facebook.github.io/astryx/sandbox/pages/mobile-prototypes/?p=powersearch
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
github-actions
Bot
requested review from
cvkxx,
ernestt,
kentonquatman and
rubyycheung
August 22, 2026 00:29
Contributor
PR Analysis Report📚 Storybook PreviewView Storybook for this PR 🧪 Sandbox PreviewView Sandbox for this PR Modified ComponentsPowerSearch (@astryxdesign/core) · View in Storybook
Bundle Size Summary
Accessibility AuditStatus: 1 accessibility violation(s) found — 1 serious. PowerSearch - 1 issue(s)
Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
imdreamrunner
marked this pull request as draft
August 22, 2026 06:59
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
PowerSearchMobile— the touch form ofPowerSearch, in core.Following the mobile exploration: Mobile Prototypes → PowerSearch ("bottom sheet, pinned tall").
Why
PowerSearch's desktop shape doesn't survive a phone. The typeahead drops a popover that fights the on-screen keyboard, and the edit popover lays field / operator / value out in a row that has nowhere to go at 390px.
How
Same props, same
PowerSearchFiltermodel, same tokens. The typeahead dropdown and the row-shaped popover are replaced by a pinned-tall bottom sheet that drills down field → operator → value. Pick between the two variants on viewport and the call site does not change:field.group, each row captioned with the operator it will produce. Past seven fields it gains a search box pinned under the sheet title.enumcommits on a single tap (Selector's mobile pattern);enum_listapplies from a pinned footer (MultiSelector's); anemptyoperator lands with no value step at all; every other type falls through to the sharedPowerSearchValueEditor.Both sheets are
height="tall": the field list resizes as it is searched and the editor's content changes with the operator, so a self-sizing sheet would jump on every keystroke and every step — and tall is the only height that gives mobile-keyboard accommodation, which the text and number editors need. The editor sheet ispurpose="form", so a stray scrim tap can't discard a half-built filter.nestedfilter groups have no touch editor yet. Fields whose only operators are nested are left out of the list and a dev warning says so, rather than opening a blank sheet.Accessibility
<label>pointed at the button would replace its visible text as the accessible name (WCAG 2.5.3). The button is named by its own text, and carriesaria-haspopup="dialog"+aria-expanded.disabledMessagekeeps the target focusable viaaria-disabledand describes it, so the reason is reachable by keyboard; the action stays blocked.Screenshots
Light and dark, iPhone 15: assets/pr-5314
Dark
Test plan
PowerSearchMobile.test.tsx, covering the whole flow: field → operator → value, the enum single-tap commit, the multi-select apply, the empty-operator shortcut, edit/delete, clear-all keeping read-only filters, read-only and disabled, the field search and its empty state, the nested-field warning, and the imperative handle.dist: the flow works end to end with no console errors, the tablet sheet caps at 640px, and the read-only / disabled / error states behave.pnpm lint:strict,pnpm build,pnpm test(7527 core+lab, 2804 cli+apps),typecheck+typecheck:docsacross core/lab/charts/cli/storybook,pnpm -F @astryxdesign/storybook build,pnpm lab:readiness:check— all green.Notes for reviewers
hasAutoFocus,menuWidth,maxOperatorMenuItems,tokenOverflowBehavior— documented on the prop table rather than removed, so one call site can feed both variants.handleRef'sfocusTypeahead()/blurTypeahead()move focus to and from the tap target; there is no typeahead input on this variant.CheckboxListalready uses to send a long list toMultiSelector.