You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit f50bc74
Browse filesBrowse the repository at this point in the historyBrowse files
feat(PowerSearch): presentation is a stable prop, and adaptive is its default (#9797)
PowerSearch's touch sheet flow ships behind a stable top-level
`presentation` prop (`'popover' | 'bottom-sheet' | 'adaptive'`, typed by
the new exported `PowerSearchPresentation`), and an omitted `presentation`
resolves `adaptive`: the stacked filter sheets on a compact coarse-pointer
screen, and the tokenizer field with its editor popover with a fine
pointer, on a screen that is not compact, on the server, and while
hydrating.
The unreleased `experimental.presentation` option is removed, so
`presentation` is the only spelling. `presentation="popover"` keeps the
inline field everywhere; stories that pass `menuWidth` or
`tokenOverflowBehavior`, which the sheet does not render, pin it.
The engineering owner ships the `adaptive` default as a `[feat]` patch: the
API change is additive, the behavior change is limited to compact touch
screens, and desktop and server output are unchanged.
[feat] PowerSearch gains a touch surface through a new `presentation` prop, `'popover' | 'bottom-sheet' | 'adaptive'`, typed by the new exported `PowerSearchPresentation`, with `'adaptive'` the default. `bottom-sheet` makes the whole field one trigger showing display-only filter tokens, and moves filter editing into a flow of tall modal sheets that stack: each step opens above the one that led to it, and dismissing a step reveals the one beneath, so no sheet has a Back action. A Filters sheet lists the active filters as rows that edit a filter, each with a trailing remove button, under a fixed header with Add filter and over a fixed footer with Clear all and Done; with no filter it shows one centered Add filter. Clear all asks for confirmation, removes the editable filters, keeps read-only ones, and leaves Filters open. An Add filter sheet lists the fields grouped (searchable from eight fields), or the content search with the field typeahead's suggestions listed inline, and leaves its search unfocused until tapped; a field whose only operator takes no value adds at once. A value step stages operator → value and confirms from its footer, the editor on the sheet's surface, or in muted sections beside the operator choice. Closed vocabularies are full-width rows, numbers stage as typed, and `string_list` / `entity_list` values edit through the Tokenizer's own sheet presentation titled with the field label. `adaptive` uses the sheet on compact coarse-pointer screens and the popover otherwise, resolved the same way Selector resolves it. The sheet flow loads on demand, only when a field presents it. New `@astryx.powersearch.sheet.*` catalog keys for the sheets' strings; no new theming target.
6
+
7
+
The API change is additive: the prop is new and optional, and no existing prop, type or export is removed or narrowed. The behavior changes only on compact coarse-pointer screens (phones), which is what `'adaptive'` is for: there a PowerSearch with no `presentation` shows the trigger and the sheet flow, a filter reaches `onChange` when its value step confirms, and `menuWidth` and `tokenOverflowBehavior` have no surface, with a development warning that names them. With a mouse or trackpad, on a screen that is not compact, in the server render and while hydrating, nothing changes. Pass `presentation="popover"` to keep the previous behavior on every device. Shipping this default in a patch is a product decision of the engineering owner, agreed with the owner of the compatibility policy.
0 commit comments