-
Notifications
You must be signed in to change notification settings - Fork 803
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
MU WPCOM: Port the starter-page-templates feature from ETK #38475
Conversation
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. Mu Wpcom plugin:
If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. Wpcomsh plugin:
If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. |
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
FYI: It seems that |
1dfdd60
to
4158876
Compare
I'd appreciate some help with the failing tests. PHP Tests are failing in wpcomsh:
PHPUnit\Framework\Exception: PHP Warning: filemtime(): stat failed for /tmp/wordpress-latest/src/wp-content/plugins/wpcomsh/vendor/automattic/jetpack-mu-wpcom/src/features/starter-page-templates/../../build/starter-page-templates/starter-page-templates.js in /tmp/wordpress-latest/src/wp-content/plugins/wpcomsh/vendor/automattic/jetpack-mu-wpcom/src/features/starter-page-templates/class-starter-page-templates.php on line 74 Maybe that's related to the path The Some Static Analysis tests are also failing:
These don't seem related. Any ideas? The diff D156481-code is meant to fix the error "UndefError PhanUndeclaredFunction Call to undeclared function \gutenberg_dir_path()" here The check "TypeError PhanTypeArraySuspicious Suspicious array access to $editor_settings of type object" here is explained here |
df97d04
to
e422693
Compare
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.
Tested the functionalities (without looking at the source code) and it seems to work properly. Tested on a TT4 theme. The default TT4 page layout selector modal is not shown (expected).
I also compared it with another test site which uses default ETK plugin and I didn't find any difference in functionalities.
Tested and the functionalities work well 👍 |
About that issue, it's on production so it's not related to this PR. The following screenshot is on production without sandboxing. The block error happens only in the modal, not when it is inserted. |
I have added back the code for sideloading images just in case. 7ec6c7f |
...ack-mu-wpcom/src/features/starter-page-templates/class-wp-rest-sideload-image-controller.php
Outdated
Show resolved
Hide resolved
...ack-mu-wpcom/src/features/starter-page-templates/class-wp-rest-sideload-image-controller.php
Outdated
Show resolved
Hide resolved
70844c8
to
5c36c4b
Compare
* Register block editor scripts. | ||
*/ | ||
public function register_scripts() { | ||
$script_path = '../../build/starter-page-templates/starter-page-templates.js'; |
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.
Try this to resolve the failing test? 🤔
$script_path = '../../build/starter-page-templates/starter-page-templates.js'; | |
$script_path = include Jetpack_Mu_Wpcom::BASE_DIR . 'build/starter-page-templates/starter-page-templates.js'; |
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.
Thanks. I have tried that in 2a32436 but it didn't work. I still see the error:
FunctionsTest::test_wpcomsh_get_atomic_client_id_defined
PHPUnit\Framework\Exception: PHP Warning: filemtime(): stat failed for /tmp/wordpress-latest/src/wp-content/plugins/wpcomsh/vendor/automattic/jetpack-mu-wpcom/src/build/starter-page-templates/starter-page-templates.js in /tmp/wordpress-latest/src/wp-content/plugins/wpcomsh/vendor/automattic/jetpack-mu-wpcom/src/features/starter-page-templates/class-starter-page-templates.php on line 104
projects/packages/jetpack-mu-wpcom/src/class-jetpack-mu-wpcom.php
Outdated
Show resolved
Hide resolved
This is ready for another review. I'd appreciate if someone can take it over when possible because there are still e2e errors failing that I don't know how to resolve. |
I'll continue on it next week 🙂 |
Yes, I will also help take a look next week. Thanks @miksansegundo, we'll take care of this PR! |
f3db17b
to
a5cb965
Compare
a5cb965
to
36e2449
Compare
All tests are passed successfully now. Re-tested and the starter page templates modal displays as expected when creating the new page. |
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.
Smoke-tested again on Simple and Atomic sites. It looks good!
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.
Re-approved.
Fixes https://github.com/Automattic/dotcom-forge/issues/8242
Proposed changes:
Automattic\Jetpack\Jetpack_Mu_Wpcom
to avoid collisionsOther information:
Jetpack product discussion
Does this pull request change what data or activity we track or use?
Testing instructions:
bin/jetpack-downloader reset jetpack-mu-wpcom-plugin
first.moon
, orproduction
, orsun
).{ SITE }/wp-admin/post-new.php?post_type=page
/vendor/automattic/jetpack-mu-wpcom/src/build/