-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Zoom out: try pattern inserter instead of starter pattern modal #61489
base: trunk
Are you sure you want to change the base?
Conversation
Size Change: -13 B (0%) Total Size: 1.75 MB
ℹ️ View Unchanged
|
b0f5bb9
to
7024e02
Compare
fd4fcda
to
5d9f316
Compare
34379ec
to
299e7d4
Compare
Something isn't working quite right on this PR when I test with playground: testing.zoom.out.inserter.movOpens to the Inserter but I can't insert any patterns. That's because the focus isn't on the post content section :D What's the plan for starter patterns here? I think I would be more into this PR if we surfaced starter patterns still and dropped folks into the Editor. Speaking personally, I find it really annoying to have to close out of the starter patterns nearly every time I create a page (usually for testing purposes but this is true when I'm generally creating content on my sites) and this would work around that nicely while still surfacing patterns. |
The rebase probably broke it |
Quick question -- will this open to a dedicated set of patterns with a category set to starter patterns? I think that's our best bet here rather than just opening up to all patterns as it seems to based on the GIF above in the PR description. |
That's exactly what the PR does, the GIF is old. I haven't had the time to update it, this is the last thing we did obviously Friday and I've been working non stop on other stuff sorry |
299e7d4
to
c1356cd
Compare
Fixed the site editor, and updated the GIF |
return sectionRootClientId; | ||
} | ||
} | ||
return getBlockRootClientId(); |
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 is a useless call without passing a selected block, it always returns ''
.
const { get } = select( preferencesStore ); | ||
const getBlockSectionRootClientId = () => { | ||
if ( __unstableGetEditorMode() === 'zoom-out' ) { |
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.
We should always fall back to the section ID without checking zoom-out mode. Otherwise the inserter won't have any patterns, and it's impossible to enable zoom-out mode. It's not a bad thing to always fall back to section ID regardless of mode.
Completely agree, I personally also find that quite annoying. With #61518 it will be even better, because it will only take up one sidebar. I think a remaining thing to do for this PR is allowing escape from zoom-out when you click the canvas. |
I still can't get the PR to work well on playground for testing, particularly within the Site Editor. A quick clip for awareness: GB.test.movIn any case, the drawbacks I see in this approach are:
I do think #61518 will help with nudging folks but the previews are going to be pretty limited. Still worth trying and, to me, with the tradeoff compared to needing to x out of the modal every single time. |
How do I test this in the https://playground.wordpress.net/ ? In general it would be better to not have something take over the full screen when creating a new page. Having something that gives a hint about starter patterns would be better. As one could quickly choose to open patterns and check for starter content. Most of the time I go with blank pages. Having to close something every time a new page is created becomes counter protective. So perhaps as one opens a new page the left Block Inserter could be open and Starter Content if there is one could be highlighted. As is mentioned in this comment by Ella: |
All the animation that occurs on load is a bit distracting, is there any way to skip it? Should we force-close the Inspector in this case? If the idea is to funnel folks into choosing patterns then it's also quite distracting. Initial focus is a bit unexpected to me, should it be the first item in the list of patterns rather than the Patterns tab itself? |
What?
Instead of showing the starter patterns modal when creating a draft page, this PR tries opening the patterns inserter instead (+ zoom out mode).
Why?
How?
Testing Instructions
Testing Instructions for Keyboard
Screenshots or screencast