Clicking next to the page title in FSE flows will display block options for the content slot block, which we don't want to expose to customers. Let's hide this, or disallow the block from being selected directly (might be possible using the one of the Gutenberg redux stores/actions).
Similarly clicking on the header or footer will display template options that we don't want to display in UI. (Might be possible to fire a sidebar event to open document options + CSS to hide UI? )
Do we want to expand this to apply to the template part block options like href/classname? Related to this discovery: https://github.com/Automattic/wp-calypso/issues/34751#issuecomment-516980519
Sure I can update @noahtallen, though I'd be fine with a PR per each item if the work splits out that way.
awesome :) just wanted to double check that we do also want to remove them for the TP blocks as well!
Updated ✅
@gwwar is this what we're thinking? I.e. no settings to change? (this is super easy to do, you just tell it to not support custom class name and anchor)
I think it not changing the sidebar at all is the best, but removing these options is still a good incremental improvement.
Gotcha - so does the goal look like:
Yes. Just be aware of this PR: https://github.com/Automattic/wp-calypso/pull/35081
If there's a better way let's replace it, but it should build on that I think (certainly keeping the CSS class added to the container).
Oh neat! Do you think we should apply that same approach to the templates? I think I'll also open a PR that disables support for those top level settings just for caution's sake (since modifying them can cause the blank revision issue)
I was thinking that we could display document settings instead of block settings for these cases. The ideal is that a customer doesn't need to know about the existence of any technical bits, like templates or content_slots.
I did notice that when you select into the site title block, it shows document settings. If you click on the block settings it deselects the block and doesn't show anything
Oh neat! Do you think we should apply that same approach to the templates?
I think this makes sense to me.
Another note is that Gutenberg master has added outlines around all the blocks, so you can see the post content block outline here even though you can't select it anymore. It also shows the parent block name:
Ah interesting. I'd expect we can override that with the CSS in place too? That's one drawback of this method, it's going to be somewhat fragile to changes unless there is an officially supported way to do it.
Yeah, I was able to get it hidden. I think they must have made the selector more specific, so it was overriding the changes you had made! As far as I know, there's not a built in solution, but there is an issue open for it: https://github.com/WordPress/gutenberg/issues/7469
Just a quick note per the resolution. It is still _possible_ to see the content block info because of some gutenberg limitations which you can read about in #35115. To mitigate this:
I think getting it the final 10% of the way hidden could be more effort than it's worth at this point because of the way gutenberg works internally with selecting parent blocks, but that could also just be me not knowing enough about how it works. :p The hack I used for the template blocks is actually one used in one of the core blocks, but it unfortunately doesn't work for post content :(
Most helpful comment
I was thinking that we could display document settings instead of block settings for these cases. The ideal is that a customer doesn't need to know about the existence of any technical bits, like templates or content_slots.