-
Notifications
You must be signed in to change notification settings - Fork 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
FSE: Content Slot and Template block options are visible #35094
Comments
Do we want to expand this to apply to the template part block options like href/classname? Related to this discovery: #34751 (comment) |
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: #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 |
I think this makes sense to me. |
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: WordPress/gutenberg#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 :( |
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? )
The text was updated successfully, but these errors were encountered: