Backport: Disable real-time collaboration on site editor#11181
Backport: Disable real-time collaboration on site editor#11181alecgeatches wants to merge 2 commits intoWordPress:trunkfrom
Conversation
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
|
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 Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
| 'window._wpCollaborationEnabled = true;', | ||
| 'after' | ||
| ); | ||
| global $pagenow; |
There was a problem hiding this comment.
Add missing doc for global.
@global string $pagenow The filename of the current screen.
|
|
||
| wp_add_inline_script( | ||
| 'wp-core-data', | ||
| 'window._wpCollaborationEnabled = ' . ( $enabled ? 'true' : 'false' ) . ';', |
There was a problem hiding this comment.
Instead of using a ternary ( $enabled ? 'true' : 'false' ), using wp_json_encode() is a cleaner, more "standard" way to pass PHP booleans into JavaScript.
Backport WordPress/gutenberg#76223.
Disable real-time collaboration on the site editor. In performance tests, editing large documents in the
site-editorsuite (loadinglarge-post.html) can cause performance tests in the site editor to time out with memory errors. This eventually times out the entire performance testing suite in CI, blocking Gutenberg PRs from merging.Until the root issue is resolved, temporarily disable RTC on the site editor to allow performance tests to pass until we resolve the root cause.
We may not need this PR, or the original Gutenberg PR if alternate fix WordPress/gutenberg#76224 is successful.
Trac ticket: https://core.trac.wordpress.org/ticket/64622