-
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
Block Bindings: Only pass usesContext
properties to editor APIs
#65661
Block Bindings: Only pass usesContext
properties to editor APIs
#65661
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. |
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.
Nice, I like this unification 👍
Size Change: 0 B Total Size: 1.77 MB ℹ️ View Unchanged
|
Co-authored-by: SantosGuillamot <santosguillamot@git.wordpress.org> Co-authored-by: gziolo <gziolo@git.wordpress.org>
I just cherry-picked this PR to the wp/6.7 branch to get it included in the next release: 87b1251 |
What?
As suggested here, I'm exploring changing the context passed to the editor APIs to only include the properties defined in
usesContext
and not the rest fromprops.context
.Why?
It helps keeping consistency with other APIs like
getFieldsList
that only receives the properties defined inusesContext
, and it makes sense to only include those.How?
I'm just not initializing the
updatedContext
variable with the properties fromprops.context
.Testing Instructions
Everything should keep working as expected, and e2e tests should pass.