-
Notifications
You must be signed in to change notification settings - Fork 14.6k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
feat: Adds the DropdownContainer component #21974
feat: Adds the DropdownContainer component #21974
Conversation
I already have RTL tests locally but some are still failing. I'll add them soon. I'll also add an MDX file with an overview of the component. |
Awesome job! 1 suggestion - in the recording we can see some flashing of appearing/disappearing elements during resizing. I'm assuming that happens when container size is on the verge of fitting or not an additional element. Could we maybe add a few pixels hysteresis to changing the state of displayed/hidden elements? |
Actually, this is somewhat related to Select's horizontal label. If you set the label position at the top or remove it, you'll see it's no longer flicking. I'll check this alongside the RTL tests. I just wanted to resolve the blocking ones first in case we need to merge the PR to unblock other things. |
Codecov Report
@@ Coverage Diff @@
## master #21974 +/- ##
==========================================
- Coverage 66.95% 66.91% -0.05%
==========================================
Files 1807 1808 +1
Lines 69196 69282 +86
Branches 7402 7432 +30
==========================================
+ Hits 46331 46357 +26
- Misses 20954 21012 +58
- Partials 1911 1913 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
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.
Tested locally. LGreaTM!
@michael-s-molina This looks great, thanks! Would it be possible to add a prop for customizing the value in the badge? For horizontal filter bar, I believe we'll need to show the number of active filters, not the total number of filters. If there was a badge count prop, we could handle calls to |
@michael-s-molina For the horizontal filter bar, I think we may also need a way to programmatically open/close the dropdown. Would that be possible to include here, maybe with a |
Merged to unblock other tasks, we'll address @codyml's comments in other PRs |
SUMMARY
Adds a new component called
DropdownContainer
. The component is a horizontal container that displays overflowed items in a popover. It also displays an indicator of how many items are currently overflowing.BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Screen.Recording.2022-10-29.at.6.30.15.PM.mov
TESTING INSTRUCTIONS
Open the Storybook and check the new component.
ADDITIONAL INFORMATION