Filter counter in button and tab#2143
Conversation
|
Storybook and Tailwind configuration previews: Ready Storybook: https://wordpress.github.io/openverse-frontend/_preview/2143 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. |
|
Size Change: +244 B (0%) Total Size: 877 kB
ℹ️ View Unchanged
|
d60d417 to
91a452c
Compare
8bd051e to
fd311d8
Compare
91a452c to
a1ca9df
Compare
fd311d8 to
fb88e76
Compare
9677442 to
375d593
Compare
This is fine. The mix looks strange, but the tab label points out the tab content, in the same way that "Content type" refers to the list of available types of content. |
48d6190 to
c741fd4
Compare
dhruvkb
left a comment
There was a problem hiding this comment.
What does the component look like with 10 or more filters enabled? Does the number spill out of the bounding box? Should we add VR tests for that case?
dhruvkb
left a comment
There was a problem hiding this comment.
Approving because the VR tests for 2 digit filters are not blocking. Everything looks good to me!
c741fd4 to
eeec068
Compare
|
@obulat and @panchovm is this the intended styling when the sidebar is open? I find it to be completely illegible with insufficient contrast. |
|
No. The counter has no background when filter is active. Here is a screenshot from the Design Library. Filter, Figma componentTab, Figma component |
3a49d30 to
1ec6c9a
Compare
1ec6c9a to
4fb8308
Compare




Fixes
Fixes WordPress/openverse#482 by @panchovm
Description
This PR adds the counter to the filters button and tab according to the Mockups in Figma
@panchovm, I'm not sure about the label when only 1 filter is selected. As you can see here, the label now reads "1 Filters". Should we use parentheses like "1 Filter(s)", change the label according to the number ("Filter" or "Filters"), or is there a better solution?
Edit: reply below (#2143 (comment))
Testing Instructions
Checklist
Update index.md).main) ora parent feature branch.
errors.
Developer Certificate of Origin
Developer Certificate of Origin