block-visibility icon indicating copy to clipboard operation
block-visibility copied to clipboard

The visibility panel always "forces" all blocks to have the separate settings inspector tab

Open fabiankaegy opened this issue 1 year ago • 3 comments

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.

fabiankaegy avatar Jul 19 '23 08:07 fabiankaegy

I 100% agree and will need to look into how the Advanced panel accomplishes that.

ndiego avatar Jul 19 '23 10:07 ndiego

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 avatar Jul 19 '23 10:07 fabiankaegy

@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 😅

ndiego avatar Jul 28 '23 21:07 ndiego