Interactivity API: Refactor internal proxy and signals system#62734
Interactivity API: Refactor internal proxy and signals system#62734luisherranz merged 91 commits intotrunkfrom
Conversation
|
Size Change: +5.01 kB (+0.28%) Total Size: 1.77 MB
ℹ️ View Unchanged
|
643b333 to
4b66d89
Compare
|
Flaky tests detected in ebbe873. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/10146436572
|
2f0562a to
46fa744
Compare
michalczaplinski
left a comment
There was a problem hiding this comment.
I left a couple of comments on the technical side of things and pushed a minor commit too.
1997db5 to
2252f8b
Compare
|
@DAreRodz I have linked this issue to be closed when this pull request is merged with a test that makes sure that plain arrays cannot be used at the root of the context. |
848e40a to
947b8d8
Compare
|
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. |
Co-authored-by: Luis Herranz <luisherranz@gmail.com>
3eea771 to
28d329b
Compare
|
Luis, I've addressed all the actionable feedback you shared. Feel free to take a look at the PR again. 🙂 |
luisherranz
left a comment
There was a problem hiding this comment.
Let's merge this so it can be included in the next release.
I'll add more tests in a new PR to try to ensure we haven't missed anything.
What?
The main goal of this refactoring is to have more control when defining state/context properties. The idea is to keep a unique computed for each of these properties per scope, which tracks changes even when its value is replaced with a getter. This way, properties can contain an initial value and be replaced with a getter later on or vice-versa, ensuring that directives update accordingly in this case. This is especially relevant for stores that are loaded asynchronously, like the
core/routerstore from the@wordpress/interactivity-routermodule.Also, we can take this opportunity to remove an external dependency (deepsignal), keeping the code specific to the Interactivity API and making it more maintainable.
Tasks
peek()Next
I think these tasks should be addressed in a subsequent PR:
Testing Instructions
No testing instructions yet.