-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Global Styles Sidebar: Re-add Colors: Heading to selected blocks #49131
Conversation
Size Change: +68 B (0%) Total Size: 1.44 MB
ℹ️ View Unchanged
|
Flaky tests detected in 50e8e68. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/5307939740
|
FYI, in this PR #48893 where I'm refactoring the color components in both global styles and block inspector. I had to solve this issue as well within the refactoring. I mapped the behavior of the "button" colors. |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
Thanks for working on this
The following blocks can contain headings:
I think we should enable all of this. |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
@@ -35,7 +35,7 @@ export function useHasColorPanel( settings ) { | |||
const hasBackgroundPanel = useHasBackgroundPanel( settings ); | |||
const hasLinkPanel = useHasLinkPanel( settings ); | |||
const hasHeadingPanel = useHasHeadingPanel( settings ); | |||
const hasButtonPanel = useHasHeadingPanel( settings ); | |||
const hasButtonPanel = useHasButtonPanel( settings ); |
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.
Good catch! This was a typo/remnant from the older implementation that was never changed 👍
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.
Great work @carolinan!
This is a simple change, the code looks good and works as expected.
LGTM 👍
There is a conflict that needs to be resolved, but other than that this looks good to merge 🎉
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.
LGTM. Just noting it's the column block that has support, not columns.
What?
WIP
Prior to #48893,
The panel at
Site Editor Styles > Blocks > Block name > Colors
would show a heading color option for all blocks that supported text color.This was incorrect, and solved in 48893.
This PR adds the Colors > Heading option back for selected blocks only, through opt-in in block.json.
Why?
These blocks has or can have headings inside them, and having this option in the Styles sidebar is a useful feature.
Testing Instructions
Screenshots or screencast
Before:
The Verse block has a heading color option in the Styles sidebar:
https://user-images.githubusercontent.com/7422055/225591043-2cd43ce7-aaf1-487f-9c3c-0d3f0f8f2413.mov
After:
The Verse block does not have a heading color option in the Styles sidebar:
https://user-images.githubusercontent.com/7422055/233548549-683c8dd2-62ee-4831-a169-7526aebaf05d.mp4