-
Notifications
You must be signed in to change notification settings - Fork 25
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
FCT 1187 - enable filter selection in filters #2971
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 0e4e544 The changes in this PR will be included in the next version bump. This PR includes changesets to release 98 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
205b1d4
to
61cb170
Compare
a54c483
to
6164e94
Compare
6164e94
to
7788ee6
Compare
<Popover.Root defaultOpen={props.isDisabled ? false : props.defaultOpen}> | ||
<Popover.Root | ||
defaultOpen={props.isDisabled ? false : props.defaultOpen} | ||
onOpenChange={(open) => { |
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.
This removes the filter from being visible in the filters list if the menu is closed and no values have been selected
control: false, | ||
}, | ||
onClearAllRequest: { | ||
control: false, |
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.
there is no point in showing a control to type in a function, since the text gets escaped by storybook, so the function wouldnt work.
…s are handled by the 'add filters' select input
…o find them in tests, add aria-label to ul containing filter chips in TriggerButton for a11y/easier test targeting, add more complete tests for Footer, TriggerButton, and FilterMenu
…cted filter values containers
…dix dialog to find filter inputs instead of looking for combobox in filters.spec.tsx
…ok controls to allow user to play around with controlling a filter menu, change type for renderSearchComponent prop to ReactNode in filters.tsx
…rappers when parent of custom select menu to allow the select input's options menu to scroll, add max-height to filter-menu dropdowns, update usage example to be more readable and add comments, update story to open filters by default so user doesn't have to click on the filters button to see the list, add filters-with-state fixture for use in VRT, add defaultOpen prop to filters so that the filters list can mount on first render, add VRTs for various open/closed states
* feat(filters): implement filters selection tests, add test helpers * feat(vrt): only defaultOpen a filterMenu if it isnt persisted and there are more locally visible filters than there are visible filters from props --------- Co-authored-by: Byron Wall <byron.wall@commercetools.com>
81957f3
to
4d29ecd
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.
All came together nicely 👏
Thank you for all the work put in on the filters 🙌🏽
aria-label={`${filterKey} selected values`} | ||
aria-live="polite" |
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.
❤️
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.
Wonderful result, can't wait to see it in action. Thanks to everyone who worked on it 🙇 .
…ves forwarded ref from radix trigger popover
This PR implements the
Filters
component and accompanying documentation and tests. These changes collectively improve the flexibility, functionality, and maintainability of thefilters
component package.filters
component so that it displays all active filters and allows for adding and removing filters.defaultOpen
prop tofilters
so that the filters list can mount on the first render.filterMenu
component so that the menu opens when a new filter is added to the menu.filterMenu
component to insure that all menus have a max height ofconstraint10
.filterMenu
body to scroll if the component rendered in the menu body exceeds the available height.add filters
select menu options container so that the text input will be fixed, and the options menu will scroll if the options exceed the available height.fixtures
files to declare inputs and constants for use throughout documentation, storybook, and tests.filters
andfilterMenu
filters
filters
in such a way that it provides a comprehensive example of the component's functionality, by allowing the user to control a specific filter menu with custom controls.filters
jsdoc props to be more concise and informative.docs/description.md
to add a brief description offilters
and the purpose of its core props.docs/usage-example.js
to have a thoroughly commented example of how to implement the component.README
to be more thorough in documenting usage and props.