-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Interactivity API: migration to the new
store()
API (#55459)
* Copy new `store()` implementation * Enable TS for the interactivity API * Update directive bind tests * Update runtime with latest changes * Replace wp-effect tests with wp-watch tests * Update wp-body tests * Update wp-class tests * Update wp-context tests * Update wp-init tests * Fix wp-key assignment * Update wp-key tests * Update wp-on tests * Update directive priorities tests * Update directive slot tests * Update wp-style tests * Update wp-text tests * Update negation operator tests * Update router navigate tests * Refactor tests for router regions * Removed afterLoad tests * Fix initial state tag id * Update initial state tests * Update tovdom-islands tests * Update tovdom tests * Replace store with initial state in PHP * Fix wp prefixes in initial state * Add types declaration to package.json so that TS works * Add `wp-each` directive in the new store API * Add workaround for store API SDR * Modify children instead of replacing the element * Migrate File block to the new store API * Refactor Image block to use the new store API * Update runtime * Fix file namespace * Finish migrating the Image block * Update Navigation block * Replace effect with watch in Image * Fix namespace assignment * Fix image state getter names * Fix getters in navigation state * Update Query block * Fix directives for Navigation block * Add missing store namespace * Allow forward slashes in namespaces * Migrate Search block * Update Initial State and its tests * Revert "Add `wp-each` directive in the new store API" This reverts commit 51bf723. * Revert "Update Initial State and its tests" This reverts commit 7e5580c. * Revert "Replace store with initial state in PHP" This reverts commit 519880f. * Revert "Add workaround for store API SDR" This reverts commit 933c4ac. * Fix phpcs errors * Update Query phpunit tests * Fix Query's Interactivity API context definition * Fix action name in Navigation * Make `double()` prop a getter Co-authored-by: Luis Herranz <[email protected]> * Fix `double()` prop definition * Rename effects to callbacks in tests * Rename effects to callbacks in blocks * Rename effects to callbacks in unit tests * Move callbacks at the end of the store definition * Remove `layout-init` directive * Add default args for `openMenu` and `closeMenu` * Change Interactivity Store script tag ID --------- Co-authored-by: Michal Czaplinski <[email protected]> Co-authored-by: Mario Santos <[email protected]> Co-authored-by: Luis Herranz <[email protected]>
- Loading branch information
1 parent
9b95b63
commit 5d41abe
Showing
70 changed files
with
1,573 additions
and
1,486 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.