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

Color panel should be hidden when the block's color are disabled #33304

Closed
oandregal opened this issue Jul 8, 2021 · 0 comments · Fixed by #33369
Closed

Color panel should be hidden when the block's color are disabled #33304

oandregal opened this issue Jul 8, 2021 · 0 comments · Fixed by #33369
Assignees
Labels
[Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended

Comments

@oandregal
Copy link
Member

In working at #33280 and preparing #33295 I've realized the color panel doesn't work as expected.

If a theme passes the following data via theme.json:

{
  "version": 1,
  "settings": {
    "color": {
      "custom": false,
      "customGradient": false,
      "gradients": [],
      "link": false,
      "palette": []
  }
}

the result is that the color panel is hidden.

However, let's look at a block such as the paragraph. It supports text, background, and link colors but not gradients. I'd expect that disabling only the things it supports should hide the color panel (notice that there's no customGradient or gradients in the following theme.json):

{
  "version": 1,
  "settings": {
    "color": {
      "custom": false,
      "link": false,
      "palette": []
  }
}

What happens instead is that the color panel is shown empty:

Captura de ecrã de 2021-07-08 19-49-04

@oandregal oandregal added [Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi [Type] Bug An existing feature does not function as intended labels Jul 8, 2021
@jorgefilipecosta jorgefilipecosta self-assigned this Jul 8, 2021
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Jul 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended
Projects
None yet
2 participants