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

Featured Image: Fix block support selectors after shadow support addition #60184

Merged
merged 1 commit into from Mar 26, 2024

Conversation

aaronrobertshaw
Copy link
Contributor

@aaronrobertshaw aaronrobertshaw commented Mar 26, 2024

Related:

What?

Fixes broken border radius and duotone block supports on the featured image block.

Note: Any odd behaviour with the location and display of the overlay was fixed in #60187

Why?

When shadow block support was added to the featured image block it used the Block Selectors API. When this is used theme.json and global styles expect all block supports selectors to be configured by the same approach i.e. the selectors API or the old __experimentalSelectors properties but not both.

How?

Moves the selectors for duotone and borders support to the selectors API within the block.json file.

Testing Instructions

  1. Add a featured image block
  2. Select the feature image block and add an image
  3. Apply a border including border radius
  4. Save and confirm the border displays correctly in the editor and frontend
  5. Apply a duotone filter
  6. Save and confirm the duotone is applied correctly on the frontend as well

Screenshots or screencast

Screen.Recording.2024-03-26.at.10.46.49.AM.mp4

@aaronrobertshaw aaronrobertshaw added [Type] Regression Related to a regression in the latest release Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json [Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi [Block] Post Featured Image Affects the Post Featured Image Block labels Mar 26, 2024
@aaronrobertshaw aaronrobertshaw self-assigned this Mar 26, 2024
Copy link

github-actions bot commented Mar 26, 2024

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: aaronrobertshaw <aaronrobertshaw@git.wordpress.org>
Co-authored-by: andrewserong <andrewserong@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

Copy link
Contributor

@andrewserong andrewserong left a 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, thanks for the follow-up @aaronrobertshaw! Tested with a couple of different Featured Image patterns in the post and site editors with a mix of local-to-the-block and global styles, and it's all testing nicely for me 👍

image image

LGTM! ✨

@aaronrobertshaw aaronrobertshaw merged commit 90907af into trunk Mar 26, 2024
70 checks passed
@aaronrobertshaw aaronrobertshaw deleted the fix/feature-image-selectors branch March 26, 2024 05:21
@github-actions github-actions bot added this to the Gutenberg 18.1 milestone Mar 26, 2024
@jasmussen
Copy link
Contributor

Thanks for lightning fast followup. This does indeed appear to work as intended.

CC: @bph, can we cherry-pick this one for GB 18.0? Since the featured image radius is such a prominent feature of Twenty Twenty-Four, it would be a good one to include.

@bph bph added the Backport to Gutenberg RC Pull request that needs to be backported to a Gutenberg release candidate (RC) label Mar 26, 2024
@bph bph modified the milestones: Gutenberg 18.1, Gutenberg 18.0 Mar 26, 2024
@bph
Copy link
Contributor

bph commented Mar 26, 2024

I just cherry-picked this PR to the release/18.0 branch to get it included in the next release: 1cd464d

@bph bph removed the Backport to Gutenberg RC Pull request that needs to be backported to a Gutenberg release candidate (RC) label Mar 26, 2024
carstingaxion pushed a commit to carstingaxion/gutenberg that referenced this pull request Mar 27, 2024
cbravobernal pushed a commit to garridinsi/gutenberg that referenced this pull request Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Post Featured Image Affects the Post Featured Image Block [Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json [Type] Regression Related to a regression in the latest release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants