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 a017ec1
Browse filesBrowse the repository at this point in the historyBrowse files
Ports the Lab MobileTokenizer touch flow into Tokenizer as the
`bottom-sheet` value of the experimental `presentation` option
(`experimental={{presentation: 'popover' | 'bottom-sheet' | 'adaptive'}}`,
spec:AST-017 FR21). `adaptive` resolves through useAdaptivePresentation,
the policy Selector, MultiSelector and DropdownMenu share. Omitting
`experimental` keeps the inline combobox unchanged.
The sheet is one standalone BottomSheet driven by `isOpen`: the shared
PanelSearchInput on top (grown to the 44px rows through a new internal
fieldXstyle), checkbox rows that keep their place while the sheet is open
and regroup selected-first on the next open, 50-row progressive rendering,
a Create row with a trailing Add action under hasCreate, and a footer with
a confirmed Clear all and Done. The list is busy from open and from each
query change until the search settles. Selection stays in Tokenizer so the
add, remove and create paths and their announcements are the inline
field's own. The trigger is the control: base props and `ref` reach it, its
accessible description lists the selected tokens, and a field that becomes
disabled while the sheet is open closes it and takes focus back. Props with
no sheet surface warn once in development. The surface loads with
React.lazy and renders nothing during hydration, so a Tokenizer that does
not opt in does not carry it. The sheet's parts expose no theming targets
while the option is experimental.
Also: @astryx.tokenizer.* catalog keys for the sheet's strings, doc.mjs
prop and examples, a `Tokenizer — Adaptive presentation` block template
(and its ShadCN route), three Core/Tokenizer stories, tests for the
resolution and the ported flow, an [experimental] core changeset and a
[docs] cli changeset, and the deletion of the spec's implementation-gap
notes.
[docs] A new Tokenizer block, `Tokenizer — Adaptive presentation`, shows the experimental `experimental={{presentation: 'adaptive'}}` option: a searchable bottom sheet of checkbox rows on compact touch screens, the inline field with its popover everywhere else. (#7977)
[experimental] Tokenizer gains a touch surface behind `experimental={{presentation: 'bottom-sheet' | 'adaptive'}}`. `bottom-sheet` replaces the inline combobox with a trigger that shows the selected tokens and opens one tall modal sheet: a search row on top, full-width checkbox rows that keep their place while the sheet is open and regroup selected-first on the next open, 50-row progressive rendering for long lists, a `Create "…"` row with a trailing Add action under `hasCreate`, and a footer with a confirmed Clear all and Done. `adaptive` uses the sheet on compact coarse-pointer screens and the popover otherwise, resolved the same way Selector resolves it. The sheet surface loads on demand, so a Tokenizer that does not opt in does not carry it. The trigger describes its selected tokens to assistive technology, and in development the field warns once about props that have no surface in the sheet presentation (`renderItem`, `renderToken`, `endContent`, `hasClear`, `hasEntriesOnFocus`, `menuWidth`, `tokenOverflowBehavior`, `hasAutoFocus`). New `@astryx.tokenizer.*` catalog keys for the sheet's strings; the sheet's parts expose no theming targets while the option is experimental. Anything inside Tokenizer's `experimental` prop may change or be removed in a patch release; omitting it keeps the stable behavior.
'Tokenizer with the experimental presentation option set to adaptive: a searchable bottom sheet on compact touch screens, the inline field with its popover everywhere else. Experimental; it may change or be removed in a patch release.',
Copy file name to clipboardExpand all lines: packages/core/locales/en.json
+48Lines changed: 48 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1599,6 +1599,54 @@
1599
1599
"defaultMessage": "Removed {label}",
1600
1600
"description": "Polite screen-reader announcement after a token is removed from a Tokenizer, by its × button or by Backspace. Live-region text, never shown on screen; `{label}` is the token's visible text."
1601
1601
},
1602
+
"@astryx.tokenizer.search": {
1603
+
"defaultMessage": "Search {label}",
1604
+
"description": "Accessible name of the search field at the top of a Tokenizer's bottom sheet (the touch presentation). `{label}` is the field's own label, e.g. `Search Tags`. Not shown on screen."
1605
+
},
1606
+
"@astryx.tokenizer.searchPlaceholder": {
1607
+
"defaultMessage": "Search…",
1608
+
"description": "Placeholder inside the search field at the top of a Tokenizer's bottom sheet, shown while the query is empty. Single word plus ellipsis."
1609
+
},
1610
+
"@astryx.tokenizer.noItems": {
1611
+
"defaultMessage": "No items available",
1612
+
"description": "Title of the empty state inside a Tokenizer's bottom sheet when the search source has nothing to choose from and no query is typed. Neutral tone (not error-y)."
1613
+
},
1614
+
"@astryx.tokenizer.noItemsDescription": {
1615
+
"defaultMessage": "There are no items to choose from.",
1616
+
"description": "Supporting sentence under the `No items available` empty-state title inside a Tokenizer's bottom sheet."
1617
+
},
1618
+
"@astryx.tokenizer.noResultsDescription": {
1619
+
"defaultMessage": "Try a different search.",
1620
+
"description": "Supporting sentence under the no-results empty-state title inside a Tokenizer's bottom sheet, suggesting the person change the query."
1621
+
},
1622
+
"@astryx.tokenizer.create": {
1623
+
"defaultMessage": "Create \"{value}\"",
1624
+
"description": "Label of the create row inside a Tokenizer's bottom sheet when `hasCreate` is set and the typed text matches no existing item. `{value}` is the typed text, e.g. `Create \"Marketing\"`."
1625
+
},
1626
+
"@astryx.tokenizer.add": {
1627
+
"defaultMessage": "Add",
1628
+
"description": "Visible label of the button at the end of the create row inside a Tokenizer's bottom sheet; pressing it adds the typed text as a new token. Imperative verb; short."
1629
+
},
1630
+
"@astryx.tokenizer.addValue": {
1631
+
"defaultMessage": "Add {value}",
1632
+
"description": "Screen-reader-only name of the create row's Add button inside a Tokenizer's bottom sheet. `{value}` is the typed text, e.g. `Add Marketing`."
1633
+
},
1634
+
"@astryx.tokenizer.done": {
1635
+
"defaultMessage": "Done",
1636
+
"description": "Label of the primary footer button inside a Tokenizer's bottom sheet; pressing it closes the sheet. Selections are already applied, so this is not a confirm."
1637
+
},
1638
+
"@astryx.tokenizer.clearAllTitle": {
1639
+
"defaultMessage": "Clear all selected items?",
1640
+
"description": "Title of the confirmation dialog shown when the person presses Clear all inside a Tokenizer's bottom sheet. A question."
1641
+
},
1642
+
"@astryx.tokenizer.clearAllDescription": {
1643
+
"defaultMessage": "This removes all selected items from {label}.",
1644
+
"description": "Body of the Clear all confirmation dialog inside a Tokenizer's bottom sheet. `{label}` is the field's own label, e.g. `This removes all selected items from Tags.`"
1645
+
},
1646
+
"@astryx.tokenizer.clearSelection": {
1647
+
"defaultMessage": "Clear selection",
1648
+
"description": "Label of the destructive action button in the Clear all confirmation dialog inside a Tokenizer's bottom sheet. Imperative verb phrase; confirms removing every token."
1649
+
},
1602
1650
"@astryx.lightbox.imagePosition": {
1603
1651
"defaultMessage": "Image {index, number} of {total, number}",
1604
1652
"description": "Polite screen-reader announcement when a Lightbox moves to a media item that has no alt text. Live-region text, never shown on screen; `{index}` is 1-based, example: `Image 3 of 12`."
0 commit comments