-
Notifications
You must be signed in to change notification settings - Fork 3
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
Feature: Multiple selection #202
base: main
Are you sure you want to change the base?
Conversation
While this is functionally living up to expectations, we have a pretty big a11y/UX issue. Please see the attached video. Now that we have this option to multi-select more than one menu item, using the keyboard arrow keys to move up and down the list to unselect any options is almost impossible. See in the video that the DOM is triggering active state, but the UI is NOT reflecting this feedback making this almost unseable to assistive device use. @leeejune we will need some assistance with this. |
@blackfalcon I see a few suggestions to address this:
|
0943893
to
7729eec
Compare
Some of the recommendations you are suggesting will be implemented with the new multi-select combobox element where the selected options will appear in a list above the dropdown. But that's not the issue I am bringing up here. I am electing to move this to a new issue where we can discuss a keyboard interaction solution. |
f4ba4a4
to
eef024c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated this commit and PR to fit an evolving specification the team is going for. Please let me know if you have any questions.
Also, please look into this weird warning coming from the test logs on a build
https://github.com/AlaskaAirlines/auro-menu/actions/runs/9166453632/job/25201867531#step:6:25
I am aware of this as well. |
@sourcery-ai review |
The core of this commit is updating the ability of the element to know the difference between the default single-select and the multi-select option. With the multi-select options selected, the value of the menu selections will be kept in an array versus a single string. Changes to be committed: modified: src/auro-menu.js modified: src/style-base.scss modified: src/style-menuoption.scss
Changes to be committed: new file: apiExamples/multiple.html modified: docs/partials/api.md
A reference string in the page was removed as it's only template content. Changes to be committed: modified: docs/partials/index.md modified: demo/index.md
This commit updates the pakcage.json build scripts to be compliant with the decisions made in this discussion: https://github.com/orgs/AlaskaAirlines/discussions/523 This commit also updates the `assets` object to reference the correct api.md file for post-back to the repo. Changes to be committed: modified: .github/workflows/testPublish.yml modified: package.json
Changes to be committed: modified: package-lock.json modified: package.json
Changes to be committed: modified: test/auro-menu.test.js
eef024c
to
99e1323
Compare
Alaska Airlines Pull Request
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Resolves: #199
Summary:
The code diff introduces a new
multiSelect
attribute to theAuroMenu
component, allowing for multiple options to be selected. Here's a breakdown of the functional differences:New Attribute:
multiSelect
multiSelect
Boolean attribute to the class, allowing the menu to support multiple selections.Handling
value
Propertyvalue
property was a single string representing the selected value.value
property can be either a string or an array of strings whenmultiSelect
is true.Selection State Management
toggleSelectionState
: Toggles the selection state of an option.handleDeselectState
: Handles deselection of an option, updating thevalue
array.handleLocalSelectState
to support multiple selections by updating thevalue
array.Resetting Option States
resetOptionsStates
was always called when selecting an item.resetOptionsStates
is only called whenmultiSelect
is false.Event Handling
The changes allow the
AuroMenu
component to handle multiple selections by using an array for thevalue
property and providing methods to manage the selection and deselection of multiple options.Type of change:
Please delete options that are not relevant.
Checklist:
By submitting this Pull Request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Pull Requests will be evaluated by their quality of update and whether it is consistent with the goals and values of this project. Any submission is to be considered a conversation between the submitter and the maintainers of this project and may require changes to your submission.
Thank you for your submission!
-- Auro Design System Team