-
Notifications
You must be signed in to change notification settings - Fork 63
Conversation
Storybook and Tailwind configuration previews: Ready Storybook: https://wordpress.github.io/openverse-frontend/_preview/1928 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: -3.4 kB (0%) Total Size: 811 kB
ℹ️ View Unchanged
|
Replace all `size`s with `w-x h-x` classes Reuse VSearchBarButton instead of a separate VClearButton component Add 8 to safelist and fix iconSize (it's string, not a number) Revert changes to plain--avoid button Add size classes to all VIcons Add size classes to all VIcons
6bcef8d
to
3da22e9
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.
Did you miss the tests? Can't see them in the PR. All good otherwise!
3b451f7
to
8b08bf7
Compare
I did forget to add the tests! I went back to add some tests, and also re-audited all the VIconButtons to make sure that we have consistent sizes (and removed all of the unused ones). Could you have one more look at this PR? |
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.
Love the tests and really appreciate how much confidence the visual regression tests give us when working on these things. Kudos to everyone who's been writing more and more of them 🚀
The changes LGTM. I left just one non-blocking note about the names of the sizes.
larger: { icon: 8, button: 'w-14 h-14' }, | ||
large: { icon: 12, button: 'w-20 h-20' }, |
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.
Just a nit pick on the names here: In my head I expected larger
to be bigger than large
🤔 Maybe larger -> large
and large -> extra-large
or something would be clearer in the "order" of how big one or the other is?
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.
Thank you for helping with the naming :)
Fixes
Fixes #1894 by @obulat
Description
This PR is an alternative to #1895. It keeps using the
size
prop because otherwise, we would have to use classes like!w-4
to override the default icon size, or not have a default icon size and add size classes to every VIcon..This PR audits all the
VIconButton
s:There is a Storybook VR test for
VIconButton
sizes.button-props
declarations are re-written. There's no need to passaria-label
orvariant="plain"
tobutton-props
because the first can be passed directly to theVIconButton
, and the second is the default.This PR also adds a Storybook story for VSearchBarButton; replaces
VClearButton
with aVSearchBarButton
in the desktop search bar.Testing Instructions
The CI should pass, including all the audio VR tests that use various sizes of
VIconButton
, and all of the Storybook tests.Checklist
Update index.md
).main
) or a parent feature branch.Developer Certificate of Origin
Developer Certificate of Origin