-
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
Audit blocks for writing and contentOnly modes #65778
Comments
For blocks like "list" and "quote", their "inner blocks area" should be marked as "content" somehow it seems. But how far do we take this: is "cover" block's inner blocks also "content"? I guess not but the line is very blurry, in some situations I would love to be able to add paragraphs within "already designed cover blocks" for instance. |
Yep, it does feel a bit blurry. Also whether only paragraphs can be added to Quote/Cover or other types of content blocks too. Heading and List might be other basic text blocks that are candidates. Then List is itself a container, so this is where the flat content structure in contentOnly mode starts to become more challenging to represent. |
The most straightforward move is to solve for repeatable inner blocks, like Button within Buttons block, and List Item within the List block first. Where if you press enter, another of the same block is inserted. |
File block was an easy one to fix so I've made a PR - #65787. I've also been experimenting with the List block with mixed results. I'll try to get a PR up soon. |
Related #57911 |
I just tested Write/Design mode with a few themes and want to underscore the following as we need these:
Blocks I think should be on the list: Social Icons: it's odd that you can't edit these, especially if you think about a link in bio site social.icons.can.t.edit.movQuery Loop block: strange experience where you can edit the "no results" text but nothing else. I think we should expand what's available in block settings in line with what's described here so there's a more visual and clearer action to take: #63497 query.loop.oddness.mov |
Just did user testing with a friend and want to underscore featured image block too. They couldn't select it and, as a result, didn't know what it was or where it would show up! Here's a quick video demoing how awkward this is, audio included: featured.image.explanation.movFinally, they also ran into issues with the site tagline where it says "write your site tagline" prompt yet they can't select it. Pretty confusing! |
Is there not a way to imitate it? Thinking of site title and tagline here. |
I think an option might be to switch those blocks over to use block bindings (then the blocks would have a I'll do an investigation to see what that would require. |
@talldan @richtabor I'm not sure I understand how |
I think it can be used as a metric most of the time for
The attribute would have a binding to the site title, so when editing it, the site title would be updated the same way it is today. There shouldn't be any change in functionality. The reason it'd be beneficial is that the block would have a more complete definition and the There's a PR available at #67260 for testing. I might try a different approach, but I think the PR shows the general idea works.
If we're talking about page editing in the site editor, I think this is a different concern, though maybe closely connected. When editing in this way, the container blocks that are part of the template are |
I'm noticing differences in the behaviour of some blocks depending on whether they're at root level or inside a container.
|
This sounds like a recent regression for me. AFAIK conceptually for the moment, it shouldn't be possible to add blocks even within containers. (maybe this regression impacts the two other cases, but that I don't know for sure) |
While testing blocks wrapped in contentOnly locked groups, I noticed some weird behaviour where double-clicking would select multiple blocks at the top level. I could also replicate the same behaviour within the site editor. I'm out of time to dig into this but I can revisit on Monday when I'm back online.
|
I added this question to the social link block. There's a bit of a disconnect between Write and Design mode (context) for this block, but a general question occurred to me: How should blocks know about write mode? Many blocks are using the useBlockEditingMode hook to do custom things based on the "Write/Design" mode. |
As far as I understand things the |
Description
contentOnly
mode is becoming more prevalent in the editor after 'Select Mode: Use the content-only behavior in select mode' was merged.Lots of block types still aren't working perfectly in
contentOnly
mode, so this list intends to capture those issues so that they can be worked on in parallel by multiple devs. Lots of the blocks also share similar issues, so hopefully there are higher-level solutions to the problems that can be found (lets discuss these in the comments).Feel free to add more to this issue if you discover untracked issues.
Rough snippet that can be run in post editor's console to generate example blocks in contentOnly locked groups, YMMV 🤷
Blocks
Buttons
Cover
contentOnly
mode (possibly the same issue as above).Details
File
PR: #65787
Gallery
List
PR: #65836
gutenberg/packages/block-editor/src/components/block-inspector/index.js
Line 242 in df27bd9
Media / Text
More
Navigation
Post Title / Featured Image / Excerpt
role: content
declaration)Query
Quote
contentOnly
templateLock to the group, and select the group.)Site Logo / Site Title / Site Tagline
PR: #67260
role: content
declaration)Social Link
<RichText />
?Synced Patterns in Write Mode
PR: #67026
Table
contentOnly
mode, including the initial placeholderTemplate Parts
The text was updated successfully, but these errors were encountered: