-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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: Fix rendering of tabs with no color #51498
Conversation
d68518f
to
396d22a
Compare
|
Size Change: 0 B Total Size: 1.4 MB ℹ️ View Unchanged
|
396d22a
to
f54aab2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is testing nicely for me, thank you for including the easy copy + paste theme.json
snippets for each of the permutations, very thorough! 🙇
LGTM ✨
Thanks for the review, @andrewserong! |
Thanks @t-hamano 🙌 |
Fixes: #50267
Might be related to: #48893
What?
This PR fixes a problem in the ColorPanel component where Background or Gradient tabs are rendered even when there is no color available.
Why?
When adding the tabs to be displayed to the
tabs
property array, there appears to be no check to see if they have available colors.How?
Check to see if it actually has available colors, as it does when generating element-level tabs.
Testing Instructions
Enable Emptytheme and update
theme.json
as follows in each case, cnfirm that the expected results are obtained.Disable all gradient panels
No tabs should exist, only the background panel should appear in all color panels.
theme.json
Disable all background panels
No tabs should exist, only solid gradient panel should appear in all color panels.
theme.json
Disable paragraph block gradient panel
Only for paragraph blocks, there should be no tabs, only background panel
theme.json
Disable paragraph block background panel
Only for paragraph blocks, there should be no tabs, only gradient panel
theme.json
Disable all gradient panels except the paragraph block
Except for the paragraph block, it should have no tabs, only background panel
theme.json
Disable all background panels except the paragraph block
Except for the paragraph block, it should have no tabs, only gradient panel
theme.json