-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Post Content: Add button for picking patterns to appender #58232
Post Content: Add button for picking patterns to appender #58232
Conversation
Updates the editable block outlines that appear within content-locked containers (added in #57901) to appear and then fade out after 3s when: - The page loads; or - The user clicks on the content-locked container. This is done via a private useFlashEditableBlocks() hook attached to the container.
Co-authored-by: ramon <ramonjd@gmail.com>
Size Change: +401 B (0%) Total Size: 1.7 MB
ℹ️ View Unchanged
|
I'm still not convinced on this one:
If we do need to change this behavior, it seems we could lean into that black plus, this one: Should it be a split button for blocks or patterns? Should it just always default to patterns when at the top level? If it defaults to patterns at the top level (root of the hierarchy, or inside Post Content), shoudl it have a different pattern icon? Mainly, that black plus already exists, and rather than adding yet another button, let's fix the button instead. |
I think the key intention here is to make it so that the empty Post Content block is literally bigger. Our hypothesis being that users are accidentally editing the template or deleting the Post Content block because it's easy to miss. Changing the black plus button that we already have won't help with that. I don't disagree with you though 😀 do you have any other ideas on how we can make an empty Post Content block more prominent? |
I don't think a little size increase is going to make a meaningful impact, genuinely, and it still comes with downsides. One other idea is that clicking anywhere left, right, or below post content sets focus there. Click left, right, or above the title, and it sets focus in the title field. |
3c6a1d8
to
d7671f0
Compare
Let's close this one out and it doesn't seem to be hitting the mark. I'd like to merge #58159 as the reception to that feels warmer and it's an iteration of what's already in
Thanks for the feedback Joen! This work is very "try it out and see how it feels" (mockups don't help) so I really do appreciate it. |
This PR is stacked onto #58159 so that it's easy to demo both PRs.
What?
Gives the Post Content block a custom appender that lets users quickly select a pattern.
Why?
See #55025. The hope is that increasing the size of the Post Content block's placeholder will guide users towards adding content to the page and away form accidentally modifying blocks that are a part of the template.
How?
<InnerBlocks>
within Post Content usingrenderAppender
. This custom appender shows the default appender (Type / to choose a block) but with a new insert pattern button (or start with a pattern) beneath it.__experimentalSetIsInserterOpened
to accept aninitialTab
argument. This lets us open the inserter sidebar with the Patterns tab selected. This part of the PR is lifted directly from Post content block: create content select pattern placeholder #57572 which was a previous attempt at improving the Post Content placeholder. Props @ramonjd!Testing Instructions
To do