Conversation
|
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 If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
Size Change: +54 B (0%) Total Size: 1.76 MB
ℹ️ View Unchanged
|
aaronrobertshaw
left a comment
There was a problem hiding this comment.
Thanks for the ping to review @scruffian 👍
This PR highlighted some code that was missed in the recent efforts to switch shared variations from styles.blocks.variations to styles.variations.
Those changes landed yesterday in #62712. The result is that the useResolvedBlockStyleVariationsConfig has no effect and isn't required anymore. I've created a PR to remove that hook entirely in #62808.
On trunk I can't replicate the original issue so I think we might be able to close both the issue and this PR.
What?
Fixes #62758.
This processes style variation previews in the same way that we process variations when they are committed so that they are formatted the same way and can be detected as the same.
Why?
This is necessary so that style variations are marked as active:

How?
Process the style variation with
useResolvedBlockStyleVariationsConfigbefore comparing it to the saved user variation.There are some other possibilities for how to solve this:
useResolvedBlockStyleVariationsConfigcall to insideareGlobalStyleConfigsEqualso that other uses of this function benefit from the change.useResolvedBlockStyleVariationsConfigup the call stack so that the variation is processed before this point.Testing Instructions
Screenshots or screencast