-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
## Summary: Create the multiple version that displays the selected values as individual Pill components that can be deleted/unchecked. Added a new hook to manage keyboard navigation for the multiple selection logic. ### Combobox Implementation Plan: 1. #2216 2. #2221 3. **Add multiple selection support to `Combobox` component.[CURRENT]** 4. Improve accessibility support on Combobox (labels, aria-live). 5. Add autocomplete support to `Combobox` component. 6. Add async/dynamic support to `Combobox` component. Issue: https://khanacademy.atlassian.net/browse/WB-1676 ## Test plan: 1. Navigate to: /?path=/docs/packages-dropdown-combobox--docs#multiple%20selection 2. Use the multi-select version of the Combobox. 3. Navigate using the keyboard. 4. Verify that you can select multiple options and can delete selected options using the keyboard. ### Keyboard navigation instructions (when the combobox is focused): - `Arrow Up | Arrow Down`: to navigate the listbox options - `Arrow left | Arrow right`: to navigate the selected options (pills displayed before the input) - `Backspace`: removes the last pill in the stack - `Enter`: - When the listbox is focused: unselects an option from the list - When the pills are focused: removes the currently focused pill and unselects the associated option in the listbox. https://github.com/Khan/wonder-blocks/assets/843075/7ad1476a-df73-42e0-87a3-2e7bf80c6b77 Author: jandrade Reviewers: jeresig Required Reviewers: Approved By: jeresig Checks: ✅ Chromatic - Get results on regular PRs (ubuntu-latest, 20.x), ✅ Check build sizes (ubuntu-latest, 20.x), ✅ Lint (ubuntu-latest, 20.x), ✅ Test (ubuntu-latest, 20.x, 2/2), ✅ Test (ubuntu-latest, 20.x, 1/2), ✅ Chromatic - Build on regular PRs / chromatic (ubuntu-latest, 20.x), ✅ Publish npm snapshot (ubuntu-latest, 20.x), ⏭️ Chromatic - Skip on Release PR (changesets), ✅ Prime node_modules cache for primary configuration (ubuntu-latest, 20.x), ✅ gerald, ✅ Check for .changeset entries for all changed files (ubuntu-latest, 20.x), ⏭️ dependabot Pull Request URL: #2223
- Loading branch information
Showing
11 changed files
with
748 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@khanacademy/wonder-blocks-dropdown": minor | ||
--- | ||
|
||
Add multiple selection support to `Combobox` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@khanacademy/wonder-blocks-pill": minor | ||
--- | ||
|
||
Add `tabIndex` prop to customize keyboard focusability of clickable pills |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.