-
Notifications
You must be signed in to change notification settings - Fork 49
Filter Bar - new component #3386
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
Draft
dchyun
wants to merge
41
commits into
main
Choose a base branch
from
dchyun/filter-bar-component
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
+6,333
−308
Conversation
This file contains hidden or 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
a13589e to
2216998
Compare
Contributor
📦 RC Packages PublishedLatest commit: aaa30cc Published 1 packages@hashicorp/design-system-components@5.1.0-rc-20251125211530 |
6078967 to
3b7d553
Compare
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.
📌 Summary
If merged, this PR would add a new
FilterBarcomponent to the library, and aFilterBarcontextual component to theAdvancedTable.Related spike PR: #3336
Preview links
🛠️ Detailed description
This PR adds support for filtering data through the new
FilterBarcomponent, and adds this as a contextual component to theAdvancedTable.FilterBar
The
FilterBaris a new component to the component library, which supports providing both a set of filter options through a dropdown with various contextual components, and tracking applied filters through thefiltersargument.Filter types
The
filtersargument is used to track the various filters currently applied to a data set. A consumer will pass an object with various filters to this argument, and all filters will be displayed as dismissible tags.The format of the object for the
filtersargument also matches the object that is bubbled up to the user when any filters are applied via theonFilterargument.The following filter types are supported:
The format of the object for the applied filters is as follows:
Filter contextual components
The options available for a user to select in the filters dropdown are provided via contextual
DropdownandFilterGroupcomponents.AdvancedTable
In the
AdvancedTablefiltering support has been added through a new named block:actionsand contextual componentFilterBarused inside that block, which uses the newFilterBarcomponent.Also a new named argument
isEmptyand named block:emptyStatehave been added to support showing a block of content when no data is available. WhenisEmptyistrue, the table body is not rendered, and the content inside the:emptyStateis shown.📸 Screenshots
Filter Bar in AdvancedTable

AdvancedTable empty state

🔗 External links
Jira ticket: HDS-4591
Figma file: File
👀 Component checklist
💬 Please consider using conventional comments when reviewing this PR.
📋 PCI review checklist
Examples of changes to controls include access controls, encryption, logging, etc.
Examples include changes to operating systems, ports, protocols, services, cryptography-related components, PII processing code, etc.