Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/storybook/stories/MobilePowerSearch.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ const fullConfig: PowerSearchConfig = {
},
{
key: 'unread',
label: 'Unread only',
label: 'Only show unread',
defaultOperator: 'yes',
operators: [{key: 'yes', label: '', value: {type: 'empty'}}],
},
Expand Down
12 changes: 6 additions & 6 deletions packages/lab/src/MobilePowerSearch/MobilePowerSearch.doc.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export const docs = {
name: 'timezoneID',
type: 'string',
description:
'IANA timezone, accepted for API parity with Core PowerSearch. Dates follow Core: tokens and Filters rows show a date_absolute as the Core token does (its day in the browser zone, no time of day) and the date editors read and write the UTC day, so this prop does not change a date value today.',
'IANA timezone for date values. Used by tokens, Filters rows, and the date editors alike, so a boundary date reads the same everywhere.',
},
{
name: 'maxSearchResults',
Expand Down Expand Up @@ -107,7 +107,7 @@ export const docs = {
],
usage: {
description:
'Lab prototype for trying the touch PowerSearch flow. Choose it explicitly on touch layouts (for example `const Search = isTouch ? MobilePowerSearch : PowerSearch`); it never switches on pointer type by itself. The whole field is one Manage filters trigger showing display-only tokens. Tapping it opens a tall Filters sheet listing each filter as a chevron row with its value in bold, Add filter at the top right, and sticky Clear all and Done actions. Opening a row edits that filter in a sheet with Cancel, Apply, and Remove. Add filter opens directly when no filter exists; when the config names a content-search field it carries that search with inline suggestions. Creating a filter drills field → operator (radios, only when a field has more than one) → value. Each step is its own BottomSheet; moving between steps is a BottomSheet replace handoff (the entering step rises above the leaving one under the one scrim), so the steps need no BottomSheetSwitcher. Single and multi-value choices are full-width rows with trailing checks; other value types use the matching Astryx input. Announcements made while a sheet is open — an added or removed filter, a result count, an empty-result message — are spoken inside the open sheet; Clear all removes every filter and is announced once the flow has closed. A filter whose field or operator the config no longer knows still lists by its raw keys, and its step offers Remove. Fields whose only operators are nested are left out with a development warning.',
'Lab prototype for trying the touch PowerSearch flow. Choose it explicitly on touch layouts (for example `const Search = isTouch ? MobilePowerSearch : PowerSearch`); it never switches on pointer type by itself. The whole field is one Manage filters trigger showing display-only tokens. Tapping it opens a tall Filters sheet listing each filter with its value in bold and a direct trailing remove action, an Add filter icon button at the top right, and sticky Clear all and Done actions. One-tap boolean filters use the same trailing remove action as every other removable filter. When there are no filters, the centered Add filter action stands alone; the duplicate header add and footer Done controls are hidden. Clear all asks for confirmation, removes editable filters without closing the sheet, and preserves read-only filters. Opening the rest of a row edits that filter with Cancel and Apply. Add filter opens directly when no filter exists and leaves search unfocused until the user chooses it; when the config names a content-search field it carries that search with inline suggestions. Creating a filter drills field → operator (radios, only when a field has more than one) → value. A value editor that is the sheet’s only section sits directly on the sheet surface; multiple sections use separate muted containers. The previous step remains open beneath the current standalone BottomSheet, so Escape, a scrim press, or a downward swipe dismisses the current sheet and reveals that retained step; the Add filter header stays action-free. the stack keeps one scrim and blocks covered sheets. Single-value choices use persistent radio indicators and multi-value choices use persistent checkbox indicators. Searchable string and entity lists and date calendars remain inline in the value sheet; date-only and date-range selections honor timezoneID, while date-time operators keep their date-and-time input. Announcements made while a sheet is open are delivered inside that dialog. Filters remain keyed by identity across controlled reorder, stale filters stay visible and removable, and controlled removals re-home focus. The scroll viewport reaches the sheet edge while padded inner content aligns with the fixed header. Fields whose only operators are nested are left out with a development warning.',
bestPractices: [
{
guidance: true,
Expand All @@ -117,7 +117,7 @@ export const docs = {
{
guidance: true,
description:
'A date_absolute value is the UTC midnight of the chosen day, as Core PowerSearch stores it, and tokens and rows show it as the Core token does, so a filter reads and means the same in both components.',
'Pass timezoneID whenever filters carry dates, so tokens, rows, and editors agree on the calendar day.',
},
{
guidance: false,
Expand All @@ -141,19 +141,19 @@ export const docs = {
name: 'Filters sheet',
required: true,
description:
'Tall sheet with a heading, Add filter, a divided list of chevron rows, and sticky Clear all plus Done.',
'Tall sheet with a heading, an Add filter icon button, editable rows with direct trailing remove actions, and sticky Clear all plus Done.',
},
{
name: 'Add filter sheet',
required: true,
description:
'Back, a field list grouped by field group (searchable past eight fields), or the content search with inline suggestions.',
'A full-width Done footer when entered directly; otherwise the action-free header is followed by a field list grouped under General or each configured field group (searchable past eight fields), or the content search with inline suggestions.',
},
{
name: 'Value sheet',
required: true,
description:
'Field or field-and-operator title, operator radios when needed, the value editor, and Cancel plus Add filter or Apply and Remove. A list value (string_list, entity_list) edits through the Lab MobileTokenizer: its trigger shows the staged tokens in the step, and tapping it opens a second, searchable sheet titled with the field name.',
'Field or field-and-operator title, operator radios when needed, the value editor, and Cancel plus Add filter or Apply. String and entity lists search and select inline in the current sheet; date-only and date-range values use an inline Calendar.',
},
],
},
Expand Down
Loading
Loading