-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Increase pattern modal dimensions when creating a new template #49722
Conversation
Size Change: -425 B (0%) Total Size: 1.37 MB
ℹ️ View Unchanged
|
Hm you should not see that. On larger screens there should always be 4 columns, even if some are empty, as noted in the OP. I'm still trying to work out how best to handle that. Edit: A commit was missing :) |
Hey James. Great! I believe there are a few older issues which touch upon various aspects of a bigger modal. Which could likely be good to take a closer look at. I will see what I dig up and edit this comment. Edit Added: Add categories to the "New Page" pattern modal -- Template Part: Make it clearer which is currently in use in replace modal Manage Reusable blocks without leaving Gutenberg Display block pattern options in a modal rather than placeholder state Starting out blank or with selecting a template layout. The above are some issues mentioning modals. There are also other Full Site Editing which mentions template modals which one can gain inspiration from. As bigger sized modals become more common place. We need a consistent way of what these look like and work. |
Bigger sounds good, no reason not to have room here. Riad described it as a bug but is it possible to maintain 3 columns across the viewports, and the items inside just scale to go with it? |
That's how it works, although 4 columns instead of 3. We can probably switch to three at certain sizes, but on wide screens I think the previews would be too big. I'll try 3 on medium viewports and share a video. |
Here we go: patterns.mp4 |
Nice, that looks good to me. Thank you for the video. Happy to green check this one if you like? |
Looks good! |
The only trade-off is the appearance when there are 'empty' columns, e.g.: I don't think it's a big deal, hopefully this won't happen very often once more patterns are added. As a follow-up we should ensure the pattern modal in the add-page flow matches. They currently use different implementations 😞 |
Flaky tests detected in a0cc0a5. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/4677162089
|
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 think this is a good improvement, and I agree that with only two patterns it looks a bit empty but it's not a huge deal in the grand scheme of things.
What?
Increases the size of the pattern modal that appears when creating a template
Why?
A larger modal is more immersive (distractions of the editor are hidden), and the previews themselves are larger.
How?
Adjusts some css.
Testing Instructions
Before
After
The one drawback with this approach is that the modal is a little empty when there are only two options:
We could allow them to scale up to fill the space, but then the previews are enormous when there's only two.
I'm very open to suggestions on how to improve this aspect.