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: allow users to store duotone data #35318

Merged
merged 5 commits into from Oct 7, 2021

Conversation

oandregal
Copy link
Member

Follow-up to #34667
Related #35228 #35248 #35255

With this PR, duotone data provided by the users in the proper format will be stored safely in the CPT that holds the user data. This has no effect on the UI because we still don't have duotone in the global styles sidebar. When we add it, it'll work fine.

How to test

Test duotone works as expected:

  • Use a theme that provides a theme.json and add within styles.blocks the following code:
"core/image": {
  "filter": {
    "duotone": "var(--wp--preset--duotone--blue-red)"
  }
}
  • Add two images in the post editor and set a duotone filter for one. Leave the other in the default state.
  • Publish the post and verify that both images have the proper filters applied in the post editor and in the front of the site.

Test that the user data filter works as expected:

  • Run npm run test-php should pass.

@oandregal oandregal self-assigned this Oct 4, 2021
@oandregal oandregal requested review from ajlende and a team October 4, 2021 10:59
@oandregal oandregal added the Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json label Oct 4, 2021
@oandregal oandregal changed the title Allow users to store duotone data Global Styles: allow users to store duotone data Oct 4, 2021
@oandregal oandregal merged commit 396e61a into trunk Oct 7, 2021
@oandregal oandregal deleted the update/secure-styles-duotone branch October 7, 2021 06:41
@github-actions github-actions bot added this to the Gutenberg 11.8 milestone Oct 7, 2021
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants