Skip to content

feat(#1979) table with global filters examples#340

Merged
chrisolsen merged 2 commits into
alphafrom
brendan/1979-table-with-global-filters-examples
Apr 24, 2025
Merged

feat(#1979) table with global filters examples#340
chrisolsen merged 2 commits into
alphafrom
brendan/1979-table-with-global-filters-examples

Conversation

@BumbleB2na
Copy link
Copy Markdown
Collaborator

@BumbleB2na BumbleB2na commented Apr 11, 2025

New example: Filter data in a table

2025-04-11-filter-table-example.mp4

Filters: When there are no active filters then it will show all table rows. This follows a "global filters" pattern that reduces complexity/cognitive load for users by allowing them to filter a data table on any column they want. Filters are each applied using AND conditions, filtering out table rows that do not match all filter criteria.

Updated example: Create a chip through typing

2025-04-21-typed-chip-example.mp4

@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 11, 2025

Deploy Preview for abgov-ui-component-docs ready!

Name Link
🔨 Latest commit f0f4c0d
🔍 Latest deploy log https://app.netlify.com/sites/abgov-ui-component-docs/deploys/68096a44c1d1bb0008b0efdf
😎 Deploy Preview https://deploy-preview-340--abgov-ui-component-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 39
Accessibility: 92
Best Practices: 100
SEO: 83
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

@BumbleB2na BumbleB2na force-pushed the brendan/1979-table-with-global-filters-examples branch from c4a69a3 to 8983d2e Compare April 11, 2025 18:04
@BumbleB2na BumbleB2na linked an issue Apr 11, 2025 that may be closed by this pull request
@BumbleB2na BumbleB2na force-pushed the brendan/1979-table-with-global-filters-examples branch from 8983d2e to 6f3ce8f Compare April 11, 2025 20:01
Copy link
Copy Markdown
Collaborator

@twjeffery twjeffery left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@BumbleB2na

The examples look good, just a couple things to change:

  • adjust the spacing between the filter input, filters, and the table - reference Figma design here
  • don't disable the button, it goes against out design guidelines for accessibility reasons we avoid disabled buttons, and instead validate to guide the user when needed

Additional to consider: if this example is a best practice solution for wrapping layout when more filters are added than the parent container width

@BumbleB2na BumbleB2na force-pushed the brendan/1979-table-with-global-filters-examples branch from 6f3ce8f to 5cab4dd Compare April 21, 2025 15:02
@BumbleB2na BumbleB2na requested a review from twjeffery April 21, 2025 15:03
Copy link
Copy Markdown
Collaborator

@twjeffery twjeffery left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@BumbleB2na the changes look good to me. Now that we have adjusted the example Filter data in a table, the example above it should be updated as well for layout consistency.

@BumbleB2na BumbleB2na force-pushed the brendan/1979-table-with-global-filters-examples branch from 5cab4dd to c7c0b0a Compare April 21, 2025 23:28
@BumbleB2na BumbleB2na requested a review from twjeffery April 21, 2025 23:37
Copy link
Copy Markdown
Collaborator

@twjeffery twjeffery left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@BumbleB2na All looks great! Thanks for making those changes.

One more small thing I noticed that might be worth changing while we're on it: I appreciate the error message on duplicate filter, that's a really good touch. Can we change the error message itself to be: "Enter a unique filter"? We have a lot of guidelines on content design for error messages, it's a good opportunity to show that as well through this example.

@BumbleB2na BumbleB2na force-pushed the brendan/1979-table-with-global-filters-examples branch from c7c0b0a to aaab6b0 Compare April 23, 2025 15:44
@BumbleB2na BumbleB2na requested a review from twjeffery April 23, 2025 15:44
@BumbleB2na
Copy link
Copy Markdown
Collaborator Author

@vanessatran-ddi ready for review

@vanessatran-ddi
Copy link
Copy Markdown
Collaborator

vanessatran-ddi commented Apr 23, 2025

@BumbleB2na I have the following feedbacks:
(2nd one if it is a bug on Angular, then we can create an issue and consider the 2nd feedback solved)

testing feedback:

  • Create a chip through typing example, old angular code
    onChange should be _change, onClick should be _click
image
  • Create a chip through typing example, new angular code
    I tried to press Enter but it doesn't add any chip. I don't know if it is an issue with goab onKeyPress or the code itself
image

Stackblitz link: https://stackblitz.com/~/github.com/vanessatran-ddi/ui-components-angular-sandbox/tree/alpha?file=src/app/filter-chip/filter-chip-typing-example.component.html

@BumbleB2na
Copy link
Copy Markdown
Collaborator Author

  • Create a chip through typing example, new angular code
    I tried to press Enter but it doesn't add any chip. I don't know if it is an issue with goab onKeyPress or the code itself

@vanessatran-ddi in your stackblitz package.json update to "@abgov/angular-components": "4.3.0-alpha.1" and it should work. This was recently fixed in angular and is in pre-release

@BumbleB2na BumbleB2na force-pushed the brendan/1979-table-with-global-filters-examples branch from aaab6b0 to f0f4c0d Compare April 23, 2025 22:31
@vanessatran-ddi
Copy link
Copy Markdown
Collaborator

vanessatran-ddi commented Apr 23, 2025

QA Passed. Tag @chrisolsen for his review. 😌

@chrisolsen chrisolsen merged commit 9e5e441 into alpha Apr 24, 2025
6 checks passed
@chrisolsen chrisolsen deleted the brendan/1979-table-with-global-filters-examples branch April 24, 2025 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Chip: Input chip component

4 participants