-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Editor: Address feedback on addition of global styles to editor settings #61022
Editor: Address feedback on addition of global styles to editor settings #61022
Conversation
Size Change: +710 B (+0.04%) Total Size: 1.74 MB
ℹ️ View Unchanged
|
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. |
packages/editor/src/components/provider/use-block-editor-settings.js
Outdated
Show resolved
Hide resolved
When I initially tested #59929 with the block style variations work in #57908 I was focused on the theme style variation defined block styles loading. The current implementation of the @talldan do you think the |
I'm no expert when it comes to global styles, I think you know vastly more than me. Thought it sounds like Could always merge this into the base PR, and then work on a separate PR that implements it as you describe. It is also private now, so could also merge the base PR and continue work against |
The other possibility is for the hook to only return the merged data set. The two primary use cases I'm aware of are the enhanced block style variations and style inheritance. My understanding is the style inheritance needs to show whatever the final inherited value is rather than base vs theme vs user vs block instance. |
56395db
to
b7ecbba
Compare
5ed25f3
to
a3ada64
Compare
b7ecbba
to
a81e965
Compare
I've rebased this and the base PR branch to resolve some conflicts. After recent iterations on the proposed For the time being, it is a private API and the data is also behind a private key, so we have the freedom to update things as required. The ability to access merged global styles data in the block editor settings is required for the block style variations work planned for WP 6.6. Getting this merged soon is needed to unblock that work. |
I'm going to merge this into the base PR branch ready for a more formal review process. |
2fff473
into
try/styles-inheritance-hok
Related: #59929
What?
Addresses some feedback received on #59929 and renames the key under which the global styles data is added to the editor settings as per #59929 (comment).
Why?
Global Styles data is needed within the editor for features such as indicating style inheritance in the UI as well as extended block style variations.
How?
This PR is based on #59929
It simply makes a few suggested tweaks and proposes naming the editor settings key for the global styles data:
globalStyles
.Testing Instructions
globalStyles
key with the global styles dataNote: The base PR needs a rebase as well