Conditionally show or hide inspector settings depending on other block settings #36972
Labels
[Block] Post Author
Affects the Post Author Block
[Block] Post Date
Affects the Post Date Block
[Block] Post Title
Affects the Post Title Block
[Feature] Inspector Controls
The interface showing block settings and the controls available for each block
Global Styles
Anything related to the broader Global Styles efforts, including Styles Engine and theme.json
[Type] Enhancement
A suggestion for improvement.
What problem does this address?
As of Gutenberg 12.0, all color options available to a text block are shown in the inspector sidebar, such as Color,
Background Color
, andLink Color
. However, some blocks likePost Date
andPost Date
can work entirely as links or plain text, making options likeColor
andLink Color
mutually exclusive.In the example below, the Color and Link Color of a Post Date block have been set to red and blue, respectively. As we can see, by toggling the Link setting option
Make title a link
, the full block toggles between a link or plain text, thus both color options are mutually exclusive.Grabacion.de.pantalla.2021-11-29.a.las.20.35.40.mov
What is your proposed solution?
Being able to conditionally show or hide the relevant style options depending on the state of other block settings would improve the user experience. In the case of
Post Title
andPost Date
blocks,Color
orLink color
would be shown depending on the value ofMake title a link
.In the case of Post Author, it can't contain links so the
Link Color
option never applies and should be hidden.The text was updated successfully, but these errors were encountered: