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 5d33dd5
Browse filesBrowse the repository at this point in the historyBrowse files
feat(PowerSearch): presentation is a stable prop, and adaptive is its default
PowerSearch's touch sheet flow graduates from `experimental.presentation`
to 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.
`experimental.presentation` stays as a deprecated experimental alias; the
top-level prop wins when both are set, with one development warning. A
staged codemod rewrites a static `experimental={{presentation: x}}` to
`presentation={x}`. Stories that pass `menuWidth` or
`tokenOverflowBehavior`, which the sheet does not render, pin
`presentation="popover"`.
The default change is `[breaking]` under spec:AST-017 FR1, FR3, and FR31,
so it is held for a declared minor; the promotion is `[feat]`.
Copy file name to clipboardExpand all lines: .changeset/powersearch-experimental-bottom-sheet.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,6 @@
2
2
'@astryxdesign/core': patch
3
3
---
4
4
5
-
[experimental] PowerSearch gains a touch surface behind `experimental={{presentation: 'bottom-sheet' | 'adaptive'}}`. `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, so a PowerSearch that does not opt in does not carry it. New `@astryx.powersearch.sheet.*` catalog keys for the sheets' strings; no new theming target. Anything inside PowerSearch's `experimental` prop may change or be removed in a patch release; omitting it keeps the stable behavior.
5
+
[experimental] PowerSearch gains a touch surface behind `experimental={{presentation: 'bottom-sheet' | 'adaptive'}}`. `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. Anything inside PowerSearch's `experimental` prop may change or be removed in a patch release.
[feat]`astryx upgrade` gains the `promote-powersearch-presentation` codemod, which rewrites a static `experimental={{presentation: x}}` on PowerSearch to the stable `presentation={x}`. It and `promote-tokenizer-presentation` share one set of rules: each leaves a TODO, and keeps the working deprecated spelling, where it cannot prove the rewrite. That includes any call that spreads props, because a spread can carry its own `presentation`, also as `undefined`.
[feat] PowerSearch's `presentation` prop is stable, and its default is `'adaptive'`. `presentation` takes `'popover' | 'bottom-sheet' | 'adaptive'`, typed by the new exported `PowerSearchPresentation`. The API change is additive: the prop is new and optional, no existing prop, type or export is removed or narrowed, and `experimental={{presentation: x}}` keeps working as a deprecated experimental alias that `astryx upgrade` rewrites to `presentation={x}`; when both are set, `presentation` wins and the field warns once in development. The behavior changes only on compact coarse-pointer screens (phones), which is what `'adaptive'` is for: there a PowerSearch with no `presentation` becomes one trigger with display-only filter tokens that opens the stacked Filters, Add filter and value sheets, 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.
/* TODO(astryx upgrade): experimental.presentation is deprecated. Pass presentation instead; this one was left unchanged because the codemod could not prove the rewrite. */
@@ -2151,21 +2155,22 @@ export const ExperimentalAdaptive: Story = {
2151
2155
filters={filters}
2152
2156
onChange={next=>setFilters(next)}
2153
2157
timezoneID="America/Los_Angeles"
2158
+
/* TODO(astryx upgrade): experimental.presentation is deprecated. Pass presentation instead; this one was left unchanged because the codemod could not prove the rewrite. */
2154
2159
experimental={{presentation: 'adaptive'}}
2155
2160
/>
2156
2161
<FilterDumpfilters={filters}/>
2157
2162
</PhoneFrame>
2158
2163
);
2159
2164
},
2160
-
name: 'Experimental: adaptive',
2165
+
name: 'Adaptive (default)',
2161
2166
};
2162
2167
2163
2168
/**
2164
2169
* With `contentSearchFieldKey`, Add filter carries the content search: the
2165
2170
* field typeahead's suggestions list inline under the search box, and a value
@@ -2178,13 +2183,14 @@ export const ExperimentalBottomSheetContentSearch: Story = {
2178
2183
filters={filters}
2179
2184
onChange={next=>setFilters(next)}
2180
2185
placeholder="Search issues…"
2186
+
/* TODO(astryx upgrade): experimental.presentation is deprecated. Pass presentation instead; this one was left unchanged because the codemod could not prove the rewrite. */
2181
2187
experimental={{presentation: 'bottom-sheet'}}
2182
2188
/>
2183
2189
<FilterDumpfilters={filters}/>
2184
2190
</PhoneFrame>
2185
2191
);
2186
2192
},
2187
-
name: 'Experimental: bottom sheet with content search',
0 commit comments