-
Notifications
You must be signed in to change notification settings - Fork 8
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
Make combobox and select dropdowns float above other UI #1244
Merged
Conversation
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
1 task
m-akinc
commented
May 15, 2023
jattasNI
reviewed
May 16, 2023
atmgrifter00
approved these changes
May 16, 2023
rajsite
reviewed
May 17, 2023
1 task
jattasNI
approved these changes
May 18, 2023
packages/nimble-components/src/combobox/tests/combobox.foundation.spec.ts
Outdated
Show resolved
Hide resolved
rajsite
approved these changes
May 23, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request
π€¨ Rationale
Fixes: #606
Fixes: #1227
π©βπ» Implementation
I initially looked at using Floating-UI, as that is what FAST 2.0 is using to solve this problem. (see #1234) However, for consistency, that would require adding support to both the Select/Combobox as well as updating the menu button, the menu item (for submenu support), and the tooltip. Each case was a significant change, and I ran into several problems, including with the action menu in the table. It turned into a 40+ file change with a lot of risk. I sunk more time into it than I wanted, and still didn't feel close to done. I'm instead taking a much more scoped approach of extending the existing pattern and using the anchored region in the Select and Combobox.
This required forking the templates for both controls from FAST, so that we could add the anchored region element.
π§ͺ Testing
I added some tests to cover certain expectations about the templates, e.g. attribute forwarding. I'm relying mostly on existing Chromatic tests to ensure the listbox pops up in the same place given the position options.
β Checklist