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

Cover block overlay color empty if disabled by theme.json #46148

Closed
MatzeKitt opened this issue Nov 29, 2022 · 2 comments
Closed

Cover block overlay color empty if disabled by theme.json #46148

MatzeKitt opened this issue Nov 29, 2022 · 2 comments
Labels
[Block] Cover Affects the Cover Block - used to display content laid over a background image [Block] Navigation Affects the Navigation Block [Block] Post Featured Image Affects the Post Featured Image Block [Block] Social Affects the Social Block - used to display Social Media accounts [Feature] Colors Color management

Comments

@MatzeKitt
Copy link
Contributor

Description

For my theme, the color settings are removed completely:

{
	"version": 2,
	"settings": {
		"color": {
			"custom": false,
			"customDuotone": false,
			"customGradient": false,
			"duotone": [],
			"gradients": [],
			"link": false,
			"palette": [],
			"text": false,
			"background": false,
			"defaultGradients": false,
			"defaultPalette": false
		}
         }
}

Nevertheless, the cover block displays the color setting for the overlay color. But clicking on it returns an empty popover, since there is no color. So if there is no color, the color setting for the cover overlay should be omitted completely.

Step-by-step reproduction instructions

  1. Use the theme.json above.
  2. Create a new post and add a cover block.
  3. Add an image to the cover block.
  4. See color settings of the cover overlay.

Screenshots, screen recording, code snippet

Bildschirm­foto 2022-11-29 um 11 41 04

Environment info

  • WordPress 6.1, no Gutenberg plugin installed

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@t-hamano
Copy link
Contributor

t-hamano commented Dec 4, 2022

@MatzeKitt
Thank you for submitting the issue.
I was able to reproduce the issue, and it seems to occur in all blocks with ColorGradientSettingsDropdown.

Cover

cover

Post Featured Image

post-featured-image

Social Icons

social-icons

Navigation

navigation

@t-hamano t-hamano added [Block] Cover Affects the Cover Block - used to display content laid over a background image [Block] Navigation Affects the Navigation Block [Block] Social Affects the Social Block - used to display Social Media accounts [Block] Post Featured Image Affects the Post Featured Image Block [Feature] Colors Color management labels Dec 4, 2022
@t-hamano
Copy link
Contributor

I have discovered that this problem has been resolved by #50115.
It worked as expected on all the blocks I mentioned in this comment, not just the cover block.

@MatzeKitt
I would like to close this issue, but if you have any questions, please feel free to comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Cover Affects the Cover Block - used to display content laid over a background image [Block] Navigation Affects the Navigation Block [Block] Post Featured Image Affects the Post Featured Image Block [Block] Social Affects the Social Block - used to display Social Media accounts [Feature] Colors Color management
Projects
None yet
Development

No branches or pull requests

2 participants