-
Notifications
You must be signed in to change notification settings - Fork 792
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
base: trunk
Are you sure you want to change the base?
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.
This tests well for me on self-hosted. On Atomic it also tests well.
Simple also works - however I'm not sure we need to consider Simple as from what I can see the same code is loaded via the gutenberg-wpcom plugin. Whether it's related to being loaded twice or not, I also seem to be getting ongoing console errors on Simple related to the gutenberg-wpcom plugin (Uncaught TypeError: Cannot read properties of undefined (reading 'apiFetchUnknown')
) - moving back to production those are gone.
I wonder if it is worth adding a check in the jetpack-mu-wpcom package to make sure a site is Atomic before requiring the files?
Thanks for reviewing! Nice catch on the console log for Simple. I've been investigating and seems that the issue was coming because wp_localize_script with same |
namespace Jetpack\EditorType; | ||
|
||
_deprecated_file( __FILE__, 'jetpack-$$next-version$$', 'Automattic\\Jetpack\\Jetpack_Mu_Wpcom\\WPCOM_Block_Editor\\EditorType' ); |
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 have marked this file as deprecated too. This implies that we need to take care of only existing use I have been able to find since now it is using deprecated code. D149564-code should take care of it.
...ckages/jetpack-mu-wpcom/src/features/wpcom-block-editor/class-jetpack-wpcom-block-editor.php
Show resolved
Hide resolved
if ( ! ( new Host() )->is_woa_site() ) { | ||
add_filter( 'jetpack_sso_bypass_login_forward_wpcom', '__return_true' ); | ||
} |
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.
Do we want to keep this? We might be able to just leave the flow regarding sso not being active.
…github.com:Automattic/jetpack into update/move-wpcom-block-editor-to-jetpack-mu-wpcom
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