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

Restore defaultPalette/defaultGradients to only hide UI #39966

Merged
merged 1 commit into from
Apr 6, 2022

Conversation

ajlende
Copy link
Contributor

@ajlende ajlende commented Apr 1, 2022

What?

Restore the old behavior of defaultPalette and defaultGradients prior to #38681 to only disable the UI and not stylesheet generation.

Make defaultDuotone added in #38681 behave like the other default* options.

Re-opens #38299

Why?

As per discussion in #38681, making the default* options disable generation has adverse affects on block patterns which expect generated styles to be present.

I think we shouldn't disregard the principle we set for block patterns. We've always committed to the fact that block patterns should be allowed to use "core" palettes and work cross themes. This is not something we can break I think.

How?

Remove default origin checks and the use_default_presets from PRESETS_METADATA.

Testing Instructions

  1. Use a theme with "defaultDuotone": false, "defaultGradients": false, "defaultPalette": false in theme.json
  2. Ensure that the UI does not show default palettes
  3. Ensure that the generated CSS does include the default palettes

@ajlende ajlende added [Type] Bug An existing feature does not function as intended Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json labels Apr 1, 2022
@ajlende ajlende requested review from youknowriad and oandregal April 1, 2022 05:52
@ajlende ajlende self-assigned this Apr 1, 2022
Copy link
Member

@oandregal oandregal left a comment

Choose a reason for hiding this comment

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

We should move these changes to lib/compat/6.0. This is bigger than this PR (see), so I'm approving to get things moving.

@ajlende ajlende force-pushed the fix/default-palette-generation branch 2 times, most recently from 67c0fe9 to 3f65b03 Compare April 6, 2022 16:18
@ajlende ajlende merged commit 9d37dac into trunk Apr 6, 2022
@ajlende ajlende deleted the fix/default-palette-generation branch April 6, 2022 18:43
@github-actions github-actions bot added this to the Gutenberg 13.0 milestone Apr 6, 2022
ajlende pushed a commit to ajlende/wordpress-develop that referenced this pull request Apr 7, 2022
oandregal added a commit that referenced this pull request Apr 7, 2022
Co-authored-by: André <583546+oandregal@users.noreply.github.com>
pento pushed a commit to WordPress/wordpress-develop that referenced this pull request Apr 11, 2022
Follow-up for [53129].

This PR backports the remaining `defaultDuotone` option changes added in the Gutenberg plugin. Related PRs: WordPress/gutenberg#38681 and WordPress/gutenberg#39966.

Props oandregal, ajlende.
See #55505.
 



git-svn-id: https://develop.svn.wordpress.org/trunk@53130 602fd350-edb4-49c9-b593-d223f7449a82
github-actions bot pushed a commit to platformsh/wordpress-performance that referenced this pull request Apr 11, 2022
Follow-up for [53129].

This PR backports the remaining `defaultDuotone` option changes added in the Gutenberg plugin. Related PRs: WordPress/gutenberg#38681 and WordPress/gutenberg#39966.

Props oandregal, ajlende.
See #55505.
 


Built from https://develop.svn.wordpress.org/trunk@53130


git-svn-id: https://core.svn.wordpress.org/trunk@52719 1a063a9b-81f0-0310-95a4-ce76da25c4cd
markjaquith pushed a commit to markjaquith/WordPress that referenced this pull request Apr 11, 2022
Follow-up for [53129].

This PR backports the remaining `defaultDuotone` option changes added in the Gutenberg plugin. Related PRs: WordPress/gutenberg#38681 and WordPress/gutenberg#39966.

Props oandregal, ajlende.
See #55505.
 


Built from https://develop.svn.wordpress.org/trunk@53130


git-svn-id: http://core.svn.wordpress.org/trunk@52719 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants