Skip to content
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

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

Open
fabiankaegy opened this issue Jan 17, 2024 · 4 comments · May be fixed by #60412
Labels
[Block] Buttons Affects the Buttons Block [Block] Group Affects the Group Block [Block] Image Affects the Image Block [Feature] Block Locking The API allowing for the ability to lock/unlock blocks [Type] Enhancement A suggestion for improvement.

Comments

@fabiankaegy
Copy link
Member

fabiankaegy commented Jan 17, 2024

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.

if ( topLevelLockedBlock ) {
return (
<BlockInspectorLockedBlocks
topLevelLockedBlock={ topLevelLockedBlock }
/>
);
}

@fabiankaegy fabiankaegy added [Type] Enhancement A suggestion for improvement. [Block] Image Affects the Image Block [Block] Buttons Affects the Buttons Block [Block] Group Affects the Group Block [Feature] Block Locking The API allowing for the ability to lock/unlock blocks labels Jan 17, 2024
@fabiankaegy
Copy link
Member Author

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

And @talldan because we talked about this in #53705 (comment)

@talldan
Copy link
Contributor

talldan commented Jan 18, 2024

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

@fabiankaegy
Copy link
Member Author

Just noting here that a workaround was found for the image blocks alt text in #58998 🎉

@richtabor
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Buttons Affects the Buttons Block [Block] Group Affects the Group Block [Block] Image Affects the Image Block [Feature] Block Locking The API allowing for the ability to lock/unlock blocks [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants