Repository navigation
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. |
SantosGuillamot
left a comment
There was a problem hiding this comment.
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
selectanddispatchtosetValuesandgetValuesinstead of the fullregistryobject.Why?
We don't need those full objects on the functions.
How?
Testing Instructions
CI Tests should pass.