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

Allow default duotone styles in classic themes. #57191

Merged
merged 1 commit into from
Dec 19, 2023

Conversation

tellthemachines
Copy link
Contributor

What?

Fixes one of the issues detected in #56131, although it's not specific to classic themes with support for appearance tools, but all classic themes and block themes without theme duotone presets.

This allows the default duotone presets to display if they're not explicitly disabled in theme.json.

I don't know all the history behind the decision to not have defaults enabled for themes without their own, but it seems that at least since #49103 filters are no longer output on every page, so if that was the concern it should be OK to enable now.

Testing Instructions

  1. With a classic theme, add an Image block and open the duotone dropdown from the block toolbar;
  2. Verify that default duotone options appear in the dropdown;
  3. Select one, save and check that editor matches front end.

Testing Instructions for Keyboard

Screenshots or screencast

Screenshot 2023-12-19 at 6 32 06 pm Screenshot 2023-12-19 at 6 32 29 pm

@tellthemachines tellthemachines self-assigned this Dec 19, 2023
@tellthemachines tellthemachines added [Type] Bug An existing feature does not function as intended [Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi labels Dec 19, 2023
Copy link

This pull request has changed or added PHP files. Please confirm whether these changes need to be synced to WordPress Core, and therefore featured in the next release of WordPress.

If so, it is recommended to create a new Trac ticket and submit a pull request to the WordPress Core Github repository soon after this pull request is merged.

If you're unsure, you can always ask for help in the #core-editor channel in WordPress Slack.

Thank you! ❤️

View changed files
❔ lib/class-wp-theme-json-resolver-gutenberg.php

Copy link
Contributor

@ajlende ajlende left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know all the history behind the decision to not have defaults enabled for themes without their own, but it seems that at least since #49103 filters are no longer output on every page, so if that was the concern it should be OK to enable now.

I honestly don't fully remember either, but enabling them now sounds good to me. 👍

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.

so if that was the concern it should be OK to enable now.

I imagine that was the main concern, so that classic themes that aren't using Duotone don't output unneeded markup or styles. So sounds like it's unblocked!

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.

Looking good!

image

@tellthemachines
Copy link
Contributor Author

Thanks for the reviews folks!

@tellthemachines tellthemachines merged commit 50f2ae2 into trunk Dec 19, 2023
59 of 60 checks passed
@tellthemachines tellthemachines deleted the fix/default-duotone branch December 19, 2023 22:30
@github-actions github-actions bot added this to the Gutenberg 17.4 milestone Dec 19, 2023
@tellthemachines tellthemachines added the Needs PHP backport Needs PHP backport to Core label Dec 19, 2023
@tellthemachines tellthemachines removed the Needs PHP backport Needs PHP backport to Core label Jan 18, 2024
@getdave
Copy link
Contributor

getdave commented Jan 22, 2024

@tellthemachines You've removed the Needs PHP Backport label on this Issue. For tracking purposes, could you advise why these changes don't need backporting?

Apologies if you've already done this and I missed it 🙇

@tellthemachines
Copy link
Contributor Author

@getdave could you please read through the history previous to the label removal, you'll see there's a link to a core backport PR that has been committed. For tracking purposes, the backport label is removed as soon as the backport is concluded.

@getdave
Copy link
Contributor

getdave commented Jan 23, 2024

Thanks.

@getdave getdave added the Backported to WP Core Pull request that has been successfully merged into WP Core label Jan 23, 2024
@getdave
Copy link
Contributor

getdave commented Jan 23, 2024

✅ I updated this PR with the Backported to Core label to indicate that the backport was successfully merged into WP Core. I also updated the PHP Sync Tracking Issue for WP 6.5 with the missing Trac and Core Backport PR links.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backported to WP Core Pull request that has been successfully merged into WP Core [Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants