-
Notifications
You must be signed in to change notification settings - Fork 63
Add breakpoint based modal variations #1272
Conversation
It looks great so far. I just noticed two things that maybe you are currently working on. Modal scrollWhen I scroll down, the white area where content is placed remains fixed while the internal content moves up and down. I think the best approach is how Unsplash and Rawpixel solved this. Go and search for something since pasting a URL from both sites takes you to the non-modal version of the single result view. Modal widthThe modal widths for breakpoints In breakpoints Screenshots
|
Okay, I didn't understand the mock-ups correctly, I will update it, it's just a matter of moving the widths up one breakpoint.
How would we implement that behavior with the close button where it is, above the modal? It would scroll out of view 🤔 |
I do not think that being out of view when scrolling down is terrible as it is consistent with all breakpoints and the back to results. On the other hand, the escape button can work for closing the modal. |
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 really like the clean-up of the Modal components :)
a116085
to
36d9308
Compare
@panchovm widths are updated, let me know if they're correct now (I'm having a hard time fully understanding the mock-ups and how they relate to the space between the breakpoints, in particular the space between the I also updated it so that it scrolls the full modal overlay rather than just the modal body, as you requested. |
@panchovm Sorry, there is some confusion. This does not implement the "results open as a modal" behavior, it just updates the modal to behave appropriately for each breakpoint (a necessary step for the results as a modal PR). When we implement the "results as a modal" PR, we will replace the top bar with the "back to search results" as indicated in the designs. This is easily possible now due to some internal implementation changes I made in this PR as well. Basically this PR sets us up for implementing the search result modal (so long as we can sort out the browser navigation difficulties, but that's a technical implementation detail, not something you need to worry about 😁) |
Perfect. Thanks for the clarification. The dev work looks great then ✨ |
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.
Looks nice, and the code is much cleaner.
You cannot open a modal twice, but I guess it's being worked on in #1279?
@obulat yes, that's going to be a doozy for another PR. I think I will have to re-write the whole dialog composable |
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.
These look great, and such a clean approach to fixing the issue. I still see a vertical 1px (!!) shift in the logo when opening the menu, which I tried to debug but was unsuccessful. It's a major improvement regardless.
Fixes
Fixes #522 by @panchovm
Fixes #1375 by @AetherUnbound
Description
Updates the existing modal implementation to add breakpoint-based variations. It's just style updates except that the mobile version also includes the logo button. I added that because the only place we actually currently use the modal is for the mobile filters and search type switcher and those use the logo button in the header.
This does also wrap the top bar in a slot to make it easier to modify the modal content without having to copy/paste the whole thing like we've done with the
VMobileModalContent
.This PR also removes that component 🎉
Testing Instructions
Checkout the branch and run
pnpm dev
to visit the site locally.Go to the search results page with a small viewport width and verify that the modal for the search type switcher and the filters still works as expected and that it looks good.
Next run
pnpm storybook
and open the Modal story in storybook and test out the various breakpoints using Storybook's breakpoints option or by opening the iframe popout and changing your viewport width manually (the second option can give you a sense of how responsive it is).Checklist
Update index.md
).main
) or a parent feature branch.Developer Certificate of Origin
Developer Certificate of Origin