-
Notifications
You must be signed in to change notification settings - Fork 63
Refactor VIconButton and add VSearchBarButton #1921
Conversation
Storybook and Tailwind configuration previews: Ready Storybook: https://wordpress.github.io/openverse-frontend/_preview/1921 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: -4.96 kB (-1%) Total Size: 819 kB
ℹ️ View Unchanged
|
Playwright Failure Test Results It looks like some of the Playwright tests failed. You can download the Playwright trace https://github.com/WordPress/openverse-frontend/actions/runs/3279169516 Read more about how to use this artifact here: https://github.com/WordPress/openverse-frontend/blob/main/test/playwright/README.md#debugging |
Fixes
Fixes #1894 by @obulat
Description
The main goal for this PR is to implement a
VSearchBarButton
component as a wrapper overVIconButton
that allows setting a separate visible focus area that is smaller than the button, but larger than the icon it contains. This is necessary to match the new header mockups. TheVContentSettingsButton
, Back button and the Clear button all need to have a 48x48px tappable area to be accessible on mobile. The inner focus area which has a different color is 32x32px, and the icon size is 24x24px.This PR also audits all the
VIconButton
components and reactors them to use the single numeric value for icon size as theVIcon
component expects, instead of overriding the icon's size by using a class likew-6 h-6
on top of the computed size class. To make sure that all theVIconButton
sizes are possible, we add more sizes to theVIcon
component.Testing Instructions
You can view the buttons in the Storybook.
Checklist
Update index.md
).main
) or a parent feature branch.Developer Certificate of Origin
Developer Certificate of Origin