Skip to content
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

Conditionally show or hide inspector settings depending on other block settings #36972

Closed
priethor opened this issue Nov 29, 2021 · 4 comments
Closed
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.

Comments

@priethor
Copy link
Contributor

priethor commented Nov 29, 2021

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, and Link Color. However, some blocks like Post Date and Post Date can work entirely as links or plain text, making options like Color and Link 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 and Post Date blocks, Color or Link color would be shown depending on the value of Make 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.

@priethor priethor added [Type] Enhancement A suggestion for improvement. [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 [Block] Post Title Affects the Post Title Block [Block] Post Author Affects the Post Author Block [Block] Post Date Affects the Post Date Block labels Nov 29, 2021
@ntsekouras
Copy link
Contributor

Thanks for the issue @priethor! This seems to come up often and similar use cases would be when we a block is in a placeholder state, etc..

@annezazu
Copy link
Contributor

annezazu commented Feb 9, 2022

Related issue: #31255 Would love to see this! Closing out the original but wanted to be sure the feedback from the outreach program was known since this has come up quite often.

@richtabor
Copy link
Member

I don't think is as much of an issue, now that the controls are behind the toolbelt UI, i.e. available when intentionally applied. And we also have text and link colors applied at the same time, when changing text color.

Should we close this?

@annezazu
Copy link
Contributor

annezazu commented May 8, 2024

Agreed. Let's close.

@annezazu annezazu closed this as completed May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.
Projects
None yet
Development

No branches or pull requests

4 participants