-
Notifications
You must be signed in to change notification settings - Fork 211
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
Add a counter to filter button and tab #826
Conversation
Full-stack documentation: Ready https://WordPress.github.io/openverse/_preview/826 Please note that GitHub pages takes a little time to deploy newly pushed code, if the links above don't work or you see old versions, wait 5 minutes and try again. You can check the GitHub pages deployment action list to see the current status of the deployments. |
abf3ceb
to
6dc88c5
Compare
da46b23
to
9a243f5
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.
LGTM
<VIcon v-if="showIcon" :icon-path="filterIcon" /> | ||
<p | ||
v-else | ||
class="flex h-6 w-6 items-center justify-center" |
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.
The counter needs to have a corner radius of 2px
. I think the class is rounded-sm
.
4908874
to
d1dd32d
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.
The code and visuals look good to me, but I'd like to make sure someone accessibility-minded can look at this, specifically for the aria label. Previously, the button was labeled "Filters" and its purpose is to toggle the filter sidebar open or closed. Now, it also indicates how many filters are enabled at a given time.
I wonder if the aria label should be something like "Toggle filters (5 enabled)" instead of the current "5 filters" 🤔
Size Change: +619 B (0%) Total Size: 882 kB
ℹ️ View Unchanged
|
78b537c
to
2ecd370
Compare
2ecd370
to
085f7e7
Compare
I am going to open an issue for better accessibility of the filters button and tab. |
Fixes
Fixes #482 by @panchovm
Description
This PR adds the counter to the filters button and tab according to the Mockups in Figma
It is the same as WordPress/openverse-frontend#2143, with the gray square on hover (reported by @zackkrida) fixed.
Testing Instructions
When you select filters, the number of selected filters should appear on the button (desktop) or the tab (mobile).
I've added some Storybook snapshot tests and Playwright VR snapshot tests.
Checklist
Update index.md
).main
) ora parent feature branch.
errors.
Developer Certificate of Origin
Developer Certificate of Origin