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

Global Styles Sidebar: Re-add Colors: Heading to selected blocks #49131

Merged
merged 14 commits into from
Jun 30, 2023
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions docs/reference-guides/core-blocks.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ A single column within a columns block. ([Source](https://github.com/WordPress/g

- **Name:** core/column
- **Category:** text
- **Supports:** anchor, color (background, gradients, link, text), spacing (blockGap, padding), typography (fontSize, lineHeight), ~~html~~, ~~reusable~~
- **Supports:** anchor, color (background, gradients, heading, link, text), spacing (blockGap, padding), typography (fontSize, lineHeight), ~~html~~, ~~reusable~~
- **Attributes:** allowedBlocks, templateLock, verticalAlignment, width

## Columns
Expand Down Expand Up @@ -176,7 +176,7 @@ An advanced block that allows displaying post comments using different visual co

- **Name:** core/comments
- **Category:** theme
- **Supports:** align (full, wide), anchor, color (background, gradients, link, text), spacing (margin, padding), typography (fontSize, lineHeight), ~~html~~
- **Supports:** align (full, wide), anchor, color (background, gradients, heading, link, text), spacing (margin, padding), typography (fontSize, lineHeight), ~~html~~
- **Attributes:** legacy, tagName

## Comments Pagination
Expand Down Expand Up @@ -230,7 +230,7 @@ Add an image or video with a text overlay — great for headers. ([Source](https

- **Name:** core/cover
- **Category:** media
- **Supports:** align, anchor, color (text, ~~background~~), spacing (blockGap, margin, padding), typography (fontSize, lineHeight), ~~html~~
- **Supports:** align, anchor, color (heading, text, ~~background~~), spacing (blockGap, margin, padding), typography (fontSize, lineHeight), ~~html~~
- **Attributes:** allowedBlocks, alt, backgroundType, contentPosition, customGradient, customOverlayColor, dimRatio, focalPoint, gradient, hasParallax, id, isDark, isRepeated, minHeight, minHeightUnit, overlayColor, tagName, templateLock, url, useFeaturedImage

## Details
Expand Down Expand Up @@ -302,7 +302,7 @@ Gather blocks in a layout container. ([Source](https://github.com/WordPress/gute

- **Name:** core/group
- **Category:** design
- **Supports:** align (full, wide), anchor, ariaLabel, color (background, gradients, link, text), dimensions (minHeight), position (sticky), spacing (blockGap, margin, padding), typography (fontSize, lineHeight), ~~html~~
- **Supports:** align (full, wide), anchor, ariaLabel, color (background, gradients, heading, link, text), dimensions (minHeight), position (sticky), spacing (blockGap, margin, padding), typography (fontSize, lineHeight), ~~html~~
- **Attributes:** allowedBlocks, tagName, templateLock

## Heading
Expand Down Expand Up @@ -392,7 +392,7 @@ Set media and words side-by-side for a richer layout. ([Source](https://github.c

- **Name:** core/media-text
- **Category:** media
- **Supports:** align (full, wide), anchor, color (background, gradients, link, text), spacing (margin, padding), typography (fontSize, lineHeight), ~~html~~
- **Supports:** align (full, wide), anchor, color (background, gradients, heading, link, text), spacing (margin, padding), typography (fontSize, lineHeight), ~~html~~
- **Attributes:** align, focalPoint, href, imageFill, isStackedOnMobile, linkClass, linkDestination, linkTarget, mediaAlt, mediaId, mediaLink, mediaPosition, mediaSizeSlug, mediaType, mediaUrl, mediaWidth, rel, verticalAlignment

## Unsupported
Expand Down Expand Up @@ -536,7 +536,7 @@ Display a post's comments form. ([Source](https://github.com/WordPress/gutenberg

- **Name:** core/post-comments-form
- **Category:** theme
- **Supports:** anchor, color (background, gradients, link, text), spacing (margin, padding), typography (fontSize, lineHeight), ~~html~~
- **Supports:** anchor, color (background, gradients, heading, link, text), spacing (margin, padding), typography (fontSize, lineHeight), ~~html~~
- **Attributes:** textAlign

## Post Comments Link
Expand Down Expand Up @@ -716,7 +716,7 @@ Give quoted text visual emphasis. "In quoting others, we cite ourselves." — Ju

- **Name:** core/quote
- **Category:** text
- **Supports:** anchor, color (background, gradients, link, text), typography (fontSize, lineHeight), ~~html~~
- **Supports:** anchor, color (background, gradients, heading, link, text), typography (fontSize, lineHeight), ~~html~~
- **Attributes:** align, citation, value

## Read More
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Copy link
Member

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 👍

const hasCaptionPanel = useHasCaptionPanel( settings );

return (
Expand Down
1 change: 1 addition & 0 deletions packages/block-library/src/column/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"html": false,
"color": {
"gradients": true,
"heading": true,
"link": true,
"__experimentalDefaultControls": {
"background": true,
Expand Down
1 change: 1 addition & 0 deletions packages/block-library/src/comments/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"html": false,
"color": {
"gradients": true,
"heading": true,
"link": true,
"__experimentalDefaultControls": {
"background": true,
Expand Down
1 change: 1 addition & 0 deletions packages/block-library/src/cover/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@
},
"color": {
"__experimentalDuotone": "> .wp-block-cover__image-background, > .wp-block-cover__video-background",
"heading": true,
"text": true,
"background": false,
"__experimentalSkipSerialization": [ "gradients" ]
Expand Down
1 change: 1 addition & 0 deletions packages/block-library/src/group/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"html": false,
"color": {
"gradients": true,
"heading": true,
"link": true,
"__experimentalDefaultControls": {
"background": true,
Expand Down
1 change: 1 addition & 0 deletions packages/block-library/src/media-text/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@
"html": false,
"color": {
"gradients": true,
"heading": true,
"link": true,
"__experimentalDefaultControls": {
"background": true,
Expand Down
1 change: 1 addition & 0 deletions packages/block-library/src/post-comments-form/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"html": false,
"color": {
"gradients": true,
"heading": true,
"link": true,
"__experimentalDefaultControls": {
"background": true,
Expand Down
1 change: 1 addition & 0 deletions packages/block-library/src/quote/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
},
"color": {
"gradients": true,
"heading": true,
"link": true,
"__experimentalDefaultControls": {
"background": true,
Expand Down
8 changes: 8 additions & 0 deletions packages/blocks/src/api/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,14 @@ export const __EXPERIMENTAL_STYLE_PROPERTY = {
value: [ 'elements', 'button', 'color', 'background' ],
support: [ 'color', 'button' ],
},
headingColor: {
value: [ 'elements', 'heading', 'color', 'text' ],
support: [ 'color', 'heading' ],
},
headingBackgroundColor: {
value: [ 'elements', 'heading', 'color', 'background' ],
support: [ 'color', 'heading' ],
},
fontFamily: {
value: [ 'typography', 'fontFamily' ],
support: [ 'typography', '__experimentalFontFamily' ],
Expand Down