-
Notifications
You must be signed in to change notification settings - Fork 798
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WordPress.com Block Editor Deprecate and move functionality to mu wpcom #37324
WordPress.com Block Editor Deprecate and move functionality to mu wpcom #37324
Conversation
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖 The e2e test report can be found here. Please note that it can take a few minutes after the e2e tests checks are complete for the report to be available. Once your PR is ready for review, check one last time that all required checks appearing at the bottom of this PR are passing or skipped. Jetpack plugin: The Jetpack plugin has different release cadences depending on the platform:
If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. Mu Wpcom plugin:
If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. |
...ckages/jetpack-mu-wpcom/src/features/wpcom-block-editor/class-jetpack-wpcom-block-editor.php
Outdated
Show resolved
Hide resolved
…e-wpcom-block-editor-to-jetpack-mu-wpcom
...ckages/jetpack-mu-wpcom/src/features/wpcom-block-editor/class-jetpack-wpcom-block-editor.php
Outdated
Show resolved
Hide resolved
...ckages/jetpack-mu-wpcom/src/features/wpcom-block-editor/class-jetpack-wpcom-block-editor.php
Outdated
Show resolved
Hide resolved
...ckages/jetpack-mu-wpcom/src/features/wpcom-block-editor/class-jetpack-wpcom-block-editor.php
Outdated
Show resolved
Hide resolved
...ckages/jetpack-mu-wpcom/src/features/wpcom-block-editor/class-jetpack-wpcom-block-editor.php
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All instructions tested as expected. Tested with self-hosted, simple and WoA sites.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While testing on a Simple site with Gutenframe (iframed block editor), I noticed the following warnings (not reproducible on trunk):
-
Warning: Undefined array key 1 in [REDACTED]/mu-plugins/jetpack-mu-wpcom-plugin/sun/vendor/automattic/jetpack-mu-wpcom/src/features/wpcom-block-editor/class-jetpack-wpcom-block-editor.php on line 256
-
Warning: Undefined array key 2 in [REDACTED]/mu-plugins/jetpack-mu-wpcom-plugin/sun/vendor/automattic/jetpack-mu-wpcom/src/features/wpcom-block-editor/class-jetpack-wpcom-block-editor.php on line 256
About Gutenframe: PCYsg-lwV-p2
…github.com:Automattic/jetpack into update/move-wpcom-block-editor-to-jetpack-mu-wpcom
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
wp_localize_script( | ||
'wpcom-block-editor-default-editor-script', | ||
'jetpackMuWpcomGutenberg', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we could change the variable back to wpcomGutenberg
from jetpackMuWpcomGutenberg
, but only on Atomic sites, as I know that it was changed because of a Simple issue: #37324 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I noticed that too, trying to come with an idea that serves for the different environments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests well for me on self-hosted, Atomic and Simple.
@@ -53,6 +54,8 @@ | |||
'src/features/marketplace-products-updater/class-marketplace-products-updater.php' => ['PhanTypeMismatchDimFetch', 'PhanTypeMismatchReturn'], | |||
'src/features/media/heif-support.php' => ['PhanPluginSimplifyExpressionBool'], | |||
'src/features/verbum-comments/class-verbum-comments.php' => ['PhanImpossibleTypeComparison', 'PhanNoopNew', 'PhanParamTooMany', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredFunction'], | |||
'src/features/wpcom-block-editor/class-jetpack-wpcom-block-editor.php' => ['PhanUndeclaredFunctionInCallable'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably shouldn't have ignored this. It was flagging a legitimate issue, see p1718019341602329-slack-C034JEXD1RD
…om (#37324) * Move code to package. Deprecate code in modules and not call it. * Fix bugs * Move tests to the mu-wpcom package * Update test * Phan updates for the mu-wpcom package * Phan updates for the jetpack plugin * Changelogger * Fix typos * Updated version * Fixed Unit Tests * Bump version mu-wpcom-plugin * Updated @SInCE references to indicate they come from jetpack * Updated comments related to Jetpack plugin * Autoload both files for wpcom block editor * Fixed typo * Updated function to set_cookie * Update phan baseline * Phan update * Version bump * Version bump * Marked functions file as deprecated in the module * Changed variable name for localize script * Remove isWoA check since it should work for simple as well * Remove wrong require that got added from merge * Added check for wpcom simple * Version bump * Added check for simple since same object is already localized there * Phan changes --------- Co-authored-by: Foteini Giannaropoulou <[email protected]>
Proposed changes:
jetpack-mu-wpcom
packageRegarding deprecation notices and removal of the code, I took a different approach to #37260 or #37189 since the jetpack-mu-wpcom package is not available for the jetpack plugin.
The steps I take are as follows. After removing the loading of the file from the module-extras.php I decided to mark the file as deprecated as well as the init and the constructor. But leave the file as is since I cannot replace the functionality with the one in the mu-wpcom package due to being out of reach.
Other information:
Jetpack product discussion
pfwV0U-9G-p2
Does this pull request change what data or activity we track or use?
No
Testing instructions:
Check in self-hosted and see that Justify and Underline formatting Tools are no longer available.
Make sure deprecation notices are not present unless the Class is declared explicitly.
Check that Simple and WoA still keep the justify and Underline formatting Tools