-
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
Block bindings: Refactor passing select and dispatch instead of full Registry. #65710
Conversation
Size Change: -45 B (0%) Total Size: 1.77 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. |
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.
This change makes sense to me. We can always pass the whole registry
if it is requested in the future, but for the time being, it seems safer this way. People shouldn't call dispatch
from getValues
, for example.
Additionally, it seems there are other examples where registry, select, dispatch
are all passed as arguments like thunks or resolvers.
There was a conflict while trying to cherry-pick the commit to the wp/6.7 branch. Please resolve the conflict manually and create a PR to the wp/6.7 branch. PRs to wp/6.7 are similar to PRs to trunk, but you should base your PR on the wp/6.7 branch instead of trunk.
|
…Registry. (#65710) * Try use select and dispatch instead of registry * Pass `select` to `canUserEditValue` * Pass `select` to `getFieldsList` * Fix `setValues` --------- Co-authored-by: cbravobernal <cbravobernal@git.wordpress.org> Co-authored-by: SantosGuillamot <santosguillamot@git.wordpress.org>
Ignore the above, I've cherry-picked into |
…Registry. (WordPress#65710) * Try use select and dispatch instead of registry * Pass `select` to `canUserEditValue` * Pass `select` to `getFieldsList` * Fix `setValues` --------- Co-authored-by: cbravobernal <cbravobernal@git.wordpress.org> Co-authored-by: SantosGuillamot <santosguillamot@git.wordpress.org>
…of full Registry. (WordPress#65710)" This reverts commit 4e532d0.
What?
Pass
select
anddispatch
tosetValues
andgetValues
instead of the fullregistry
object.Why?
We don't need those full objects on the functions.
How?
Testing Instructions
CI Tests should pass.