-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Manual cherry pick of #62768 to wp/6.6 #62905
Conversation
…S is generated (#62768) * Render styles after the variation style overrides have been saved to stage. Getting closer. But the overrides in state need to be merged with incoming revision styles. * For every current override, update the variation CSS with the incoming config from the revision. * Rename hook Destructure in hook so the consumer doesn't have to clone Only send the override overrides to EditorStyles that need to be overridden. * Fetching overrides in the hook * Feedback suggestions from review: add overrides to dep array in Editor Styles rename hook * Return getBlockStyles from the useSelect callback * Refactor so we don't have to change the EditorStyles props Register revision overrides with useStyleOverride * Adding some explanatory comments Add rudimentary E2E test covering block style partials, applying them, updating them and viewing styles revisions. * Removed unused style fixture Co-authored-by: ramonjd <[email protected]> Co-authored-by: aaronrobertshaw <[email protected]> Co-authored-by: ellatrix <[email protected]>
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Size Change: +415 B (+0.02%) Total Size: 1.75 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1, this is testing well for me, too, and the code change looks good visually (includes both PRs). 🚀
@@ -25,6 +25,7 @@ const { | |||
ExperimentalBlockEditorProvider, | |||
GlobalStylesContext, | |||
useGlobalStylesOutputWithConfig, | |||
__unstableBlockStyleVariationOverridesWithConfig, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this __unstable
? It's already private, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a bit of discussion around it.
To answer the "why", to advertise without ambiguity that, despite being private, it's unstable.
Similar to how private block editor functions have the Experimental
or Private
prefixes 🤷🏻
I don't think it does any harm, but could easily be communicated in comments. I can rename it next week if you feel strongly about it.
What?
A manual cherry pick of the following PRs to
wp/6.6
Why?
There was a tiny conflict because the hook name change in #62464 was not cherry-picked into
wp/6.6
Testing Instructions
Smoke test according to test instructions in #62768