block-visibility
block-visibility copied to clipboard
The visibility panel always "forces" all blocks to have the separate settings inspector tab
Description
Currently the Visibility
panel forces any block such as the core paragraph that usually don't have any settings to get their settings tab shown. It would be kind of cool if the Visibility panel could work similar to the Advanced panel. Where it's aware of whether there are other elements in the settings tab and if not just render at the bottom of the styles tab.
I 100% agree and will need to look into how the Advanced panel accomplishes that.
I lookes into it for a second and the logic seems to be contained in this hook here: https://github.com/WordPress/gutenberg/blob/d27c43fda419995a80b1cbdeafe2b24d9a0e2164/packages/block-editor/src/components/inspector-controls-tabs/use-inspector-controls-tabs.js#L50-L66
@fabiankaegy Thanks for the link. I gave it a quick try, and it's sorta working in #76. We need better control over slots in Core 😅