WordPress / gutenberg

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

Content Only mode should allow controls in the Inspector to still be reachable if they are content related #57911

Open fabiankaegy opened 10 months ago

fabiankaegy commented 10 months ago

We have more and more controls that I would consider content rather than design tools that are only visible in the Inspector controls of a block. Currently however the content only mode hides the blocks inspector controls entirely.

This is a major issue for things like the Alt text of the image block which cannot be changed in the context of a content only mode.

CleanShot 2024-01-17 at 09 58 18@2x

But also new other tools such as the background image option on the group block, or the rel attribute for buttons, anchor tags for elements etc are common pieces of content that should be editable in the content only mode.

I think with the introduction of the useBlockEditingMode we have a robust API to make granular choices about which settings should display in the content only mode and we should therefore rethink the limitation of disabling the inspector all together for content only locking.

https://github.com/WordPress/gutenberg/blob/aec6947ee08c32e7c16ef0cdd65e63ba0c14ede1/packages/block-editor/src/components/block-inspector/index.js#L171-L177

fabiankaegy commented 10 months ago

CC: @annezazu @SaxonF this is what I referenced in our Hallway Hangout yesterday.

And @talldan because we talked about this in https://github.com/WordPress/gutenberg/issues/53705#issuecomment-1895357950

talldan commented 10 months ago

Thanks! I've referenced this in the TODO list of the pattern overrides tracking issue.

fabiankaegy commented 9 months ago

Just noting here that a workaround was found for the image blocks alt text in https://github.com/WordPress/gutenberg/pull/58998 🎉

richtabor commented 1 month ago

I'm a bit hesitant that introducing a drill down in the Inspector will be a net-negative experience.

For instance, navigating the Navigation block for example is quite heavy-handed. If we don't have to do this, we shouldn't. Perhaps we should identify the other affordances that need to be accounted for first, then decide if this route is still necessary. Related: #65778