forked from WordPress/gutenberg
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce
withSyncEvent
action wrapper utility and proxy event
ob…
…ject whenever it is not used (WordPress#68097) * Implement withSyncEvent action wrapper utility. * Prepare Interactivity API infrastructure for awareness of action prior to evaluating it. * Proxy event object when withSyncEvent() is not used. * Ensure generator functions using withSyncEvent() are wrapped correctly to still be recognized as generator functions. * Update Interactivity API documentation to reference withSyncEvent(). * Use withSyncEvent() in all built-in actions that require it. * Minor fixes for withSyncEvent docs. * Clarify documentation. Co-authored-by: Weston Ruter <[email protected]> * Enhance withSyncEvent implementation and ensure the sync flag is maintained when proxying functions via withScope. * Add doc block for wrapEventAsync(). * Use more specific types for event proxy handler. * Amend callback in withSyncEvent instead of wrapping it. * Revert "Prepare Interactivity API infrastructure for awareness of action prior to evaluating it." This reverts commit dba93ec. * Update evaluate() to no longer invoke functions (except where needed for BC) and move responsibility to the caller. * Export withSyncEvent * Fix evaluate to return scoped function and always reset scope. * Update custom directives for e2e tests to account for evaluate behavior change. * Update release version number in documentation. --------- Co-authored-by: Weston Ruter <[email protected]> Co-authored-by: Luis Herranz <[email protected]>
- Loading branch information
1 parent
0f7193c
commit c300edf
Showing
22 changed files
with
334 additions
and
69 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
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
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
11 changes: 8 additions & 3 deletions
11
packages/e2e-tests/plugins/interactive-blocks/get-server-context/view.js
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
11 changes: 8 additions & 3 deletions
11
packages/e2e-tests/plugins/interactive-blocks/get-server-state/view.js
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.