-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat(menu): add multi-select & component refactor #133
Conversation
Reviewer's Guide by SourceryThis pull request introduces multi-select functionality to the Class diagram showing the updated AuroMenu component structureclassDiagram
class AuroMenu {
+Boolean multiSelect
+Array~string~ value
+Array~HTMLElement~ optionSelected
+String matchWord
+Boolean noCheckmark
+Boolean loading
+HTMLElement optionActive
+reset()
-handleSelectState(option)
-handleDeselectState(option)
-clearSelection()
-navigateOptions(direction)
-isOptionSelected(option)
-notifySelectionChange()
}
class AuroSelect {
+Boolean multiSelect
+Array~string~ value
+Array~HTMLElement~ optionSelected
+updateDisplayedValue()
}
class AuroCombobox {
+Array~string~ value
+Array~HTMLElement~ optionSelected
-handleInputValueChange()
}
AuroMenu <-- AuroSelect: uses
AuroMenu <-- AuroCombobox: uses
State diagram for menu option selection statesstateDiagram-v2
[*] --> Unselected
Unselected --> SingleSelected: Click (single-select)
Unselected --> MultiSelected: Click (multi-select)
SingleSelected --> Unselected: Click/Reset
MultiSelected --> PartialSelected: Deselect some
PartialSelected --> MultiSelected: Select more
PartialSelected --> Unselected: Deselect all/Reset
MultiSelected --> Unselected: Deselect all/Reset
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
chrisfalaska seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
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.
Hey @chrisfalaska - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟡 General issues: 1 issue found
- 🟢 Security: all looks good
- 🟡 Testing: 4 issues found
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
62963e0
to
0c01c8b
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.
Hey @chrisfalaska - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
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.
Refactor selection logic based on our conversation so that the value/optionSelected logic is isolated from the UI updates. And make the UI updates responsive to value/optionSelected in the updated() function rather than triggered directly by the selection event.
9baea1f
to
1341a73
Compare
@sourcery-ai review |
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.
Hey @chrisfalaska - I've reviewed your changes - here's some feedback:
Overall Comments:
- Consider moving event handler bindings from constructor to connectedCallback/disconnectedCallback to prevent potential memory leaks during component lifecycle
- Consider consolidating duplicate event dispatch code into a helper method to improve maintainability and reduce code duplication
Here's what I looked at during the review
- 🟡 General issues: 4 issues found
- 🟢 Security: all looks good
- 🟡 Testing: 4 issues found
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
0c44791
to
b849de0
Compare
@sourcery-ai review |
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.
Hey @chrisfalaska - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟡 Testing: 4 issues found
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
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.
Can there be some cleanup around commits? 72 commits for 10 file changes seems a bit excessive and I see some duplicate commits in there.
I can squash and merge into a single commit. It's one big refactor, I'd argue preserving the commit history is not so important. EDIT: I squashed some of the duplicate-named commits and reduced the overall number by a few. Thank you for the feedback! |
84ebf52
to
65b0517
Compare
f8e5e18
to
20c646d
Compare
5a83ada
to
1e30ac2
Compare
1e30ac2
to
f3dbb83
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.
Hey @chrisfalaska - I've reviewed your changes - here's some feedback:
Overall Comments:
- Consider adding a migration guide or breaking changes section in the documentation to highlight the change from string to array values, as this could impact existing implementations.
Here's what I looked at during the review
- 🟡 General issues: 9 issues found
- 🟢 Security: all looks good
- 🟡 Testing: 1 issue found
- 🟡 Complexity: 1 issue found
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
381d421
to
fadfe06
Compare
ee7ceba
to
301561e
Compare
a4e4929
to
dfa6a50
Compare
654f124
to
7f440c6
Compare
🎉 This PR is included in version 2.0.0-beta.11 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Alaska Airlines Pull Request
Multi-select was originally added to
auro-menu
as a pending PR in AlaskaAirlines/auro-menu#199.This feature was never merged or integrated but was selected for adoption into
@auro-formkit/auro-menu
. This PR incorporates that adoption into theformkit
monorepo.Testing
menu-muli-select.mp4
Summary by Sourcery
Add multi-select functionality to the menu component and implement loading states for combobox, menu, and select components. Update documentation and fix multiple bugs.
New Features:
auro-menu
.Tests:
Summary by Sourcery
Add multi-select functionality to the auro-menu component.
New Features:
auro-menu
.Tests:
Summary by Sourcery
Add multi-select functionality to the auro-menu component.
New Features:
auro-menu
.Tests: