-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New Component: chip-group and selection modes #1933
Comments
Can we bump the priority of this? We are still using a hand-rolled solution using Calcite Chips on the icon search linked above. |
+1, have a need for this as well! |
This looks great! |
@benelan let's look at re-prioritizing this one if possible next triage. |
@jay-bis ended up implementing something similar for a different project, I am not sure if some if it could be reused / moved to this repository |
**Related Issue:** [#1933](#1933) ### ~~Opening as a draft~~ Ready for review :) ## Summary This still needs work but want to get a branch up so folks can preview and provide feedback. This PR adds the proposed `chip-group` component and some associated changes to `chip`. - `chip-group` can be used for spacing and keyboard navigation of selectable or non-selectable `chip` components. - `chip-group` defaults to `selection-mode:none`, but supports `single`, `single-persist`, and `multiple` selection modes. To do / looking for feedback: - Currently, users need to add `selectable` property to child `chip` components to enable the selection capability. This could potentially be managed by the parent `chip-group`: conditionally applied via an internal property based on `selection-mode`, but that creates a weird situation where `selectable` is not documented but the `selected` property is public, since that will always need to be available to a user. Open to thoughts there. - Currently, once dismissed, the previous chip is focused. If the first chip is dismissed, focus is moved to the "next first chip" as it takes the place - does this make sense? - Add more tests as needed. - Audit of keyboard navigation. - Need an a11y audit from @geospatialem :) - Style cleanup / design feedback from @SkyeSeitz @ashetland :) - General pattern feedback :) https://user-images.githubusercontent.com/4733155/208154126-bdc706de-8c25-4d64-b7e7-988952d96043.mov
Installed and assigned for verification. |
Verified in Referencing issue #6825 for additional keyboard support down the line. |
Description
We need a workflow for single or multi selection of chips.
Material refers to these as “choice” / “filter” chips - https://material.io/components/chips#types
Our options could match other components in our system like dropdown, accordion, etc., with a single/ multi / single-persist / none selection mode prop.
User Stories
Single select cc @asangma
Multi select:
Category search on : https://developers.arcgis.com/calcite-design-system/icons/
That functionally works as "multi select choice chips" would (missing some keyboard affordances)
calcite-rating
?calcite-chip
would need anactive
prop to determine styling.calcite-chip-group
would set the selection-mode, similar to a dropdown group or accordion component.calcite-chip-group
would be able to space consistently chips used in static display, or dismissible chip grid. Need to evaluate keyboard behavior for chips in chip group without selection - do they need focus? only when dismissible?High priority for Online (analysis/home app)
The text was updated successfully, but these errors were encountered: