-
Notifications
You must be signed in to change notification settings - Fork 64
Conversation
Storybook and Tailwind configuration previews: Ready Storybook: https://wordpress.github.io/openverse-frontend/_preview/2087 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: -7.8 kB (-1%) Total Size: 887 kB
ℹ️ View Unchanged
|
It looks great ✨ I just noticed the following minor details: Filter tab in drawer.From Popover position and layoutIn In narrow-height devices, the popover is cut off, as shown below. Selecting a content typeBased on this comment, the drawer should hide the "See results" button and close itself once shifting to a new media. On the other hand, it seems better to set the drawer's height to This layout comes from the search result drawer, but in that case, the height is a device's height percentage to allow scrolling filters. Item sizeI noticed that in both drawer and popover elements, the content type item is slightly bigger. I wonder if we took this approach to meet i18n requirements. If so, my believe is that label lengths won't reach the full width of its container; in the same way we did with the header's search input. If that is the case, the best would be finding a new spacing solution. The switcher will not change as often as adding new filters or any other similar menu displayed in a popover. This comment might go beyond this PR's scope, so please feel free to skip it and address this point in a different ticket. Even so, here are the specs. Size in drawerThe button has a height of Size in popoverIn this case, item height is |
7e19c1c
to
3213e41
Compare
It doesn't need to happen in this PR, but should we have homepage snapshot test(s) which include the open popover? |
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.
This looks and behaves beautifully, @obulat! The one thing I notice is a small design note: the rounded top corners of the modal are missing.
d612f64
to
a3c1af2
Compare
91db330
to
1bc4c96
Compare
cd67b43
to
027caae
Compare
1bc4c96
to
07643d3
Compare
cf89dba
to
722978e
Compare
722978e
to
3fcee75
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.
I have some comments. But the code works fine so consider them non-blocking. This is a great PR, thanks!
@@ -93,6 +93,7 @@ module.exports = { | |||
40: "10.00rem", | |||
50: "12.50rem", | |||
64: "16.00rem", | |||
66: "16.25rem", |
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.
After a certain point (which we might have already crossed), it might make more sense to replace this with:
Object.fromEntries(Array.from({ length: 120 }, (_, i) => [i, `${i/4}rem`]))
@@ -18,7 +18,7 @@ | |||
<VButton | |||
data-item-group-item | |||
:as="as" | |||
class="group relative flex min-w-full justify-between py-2 hover:bg-dark-charcoal-10 focus:z-10" | |||
class="group relative flex min-w-full justify-between border-0 py-2 hover:bg-dark-charcoal-10 focus:z-10" |
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.
Removing the border here makes this a special variant of Button that's only defined here, along with its usage. This might cause issues later when we try to update the button component based on @panchovm's plans.
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.
It looks great ✨
Fixes
Related to #1433 by @panchovm
Description
This PR adds a new content switcher to the homepage: modal on small screens, and popover starting from
lg
.Edit: the tests for open content switcher were added for the 'old' (from
md
) and 'new' homepage. The popover has an extra inline-end padding in the snapshots. It is not present on Mac (I tested on Firefox, Chrome and Safari), and I don't have a Linux machine to figure it out. I suspect that it's caused by the fix in #870, but I'm not sure.Testing Instructions
Turn on the
new_header
flag, or go to 'localhost:8443/?ff_new_header=on'. Check that the content switcher works on the homepage.Checklist
Update index.md
).main
) ora parent feature branch.
errors.
Developer Certificate of Origin
Developer Certificate of Origin