WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.45k stars 4.17k forks source link

Audit blocks for writing and contentOnly modes #65778

Open talldan opened 2 weeks ago

talldan commented 2 weeks ago

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.

Blocks

Buttons

Cover

Details

File

PR: https://github.com/WordPress/gutenberg/pull/65787

Gallery

List

PR: https://github.com/WordPress/gutenberg/pull/65836

Media / Text

More

Navigation

Post Title / Featured Image / Excerpt

Quote

Site Logo / Site Title / Site Tagline

Table

youknowriad commented 2 weeks ago

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.

talldan commented 2 weeks ago

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.

richtabor commented 1 week ago

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"?

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.

talldan commented 1 week ago

File block was an easy one to fix so I've made a PR - https://github.com/WordPress/gutenberg/pull/65787.

I've also been experimenting with the List block with mixed results. I'll try to get a PR up soon.

richtabor commented 5 days ago

For blocks like "list" and "quote", their "inner blocks area" should be marked as "content" somehow it seems.

Related https://github.com/WordPress/gutenberg/issues/57911