-
Notifications
You must be signed in to change notification settings - Fork 799
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
Search: migrate search widget to package #22364
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 (other than "Required review") appearing at the bottom of this PR are passing or skipped. Jetpack plugin:
|
Caution: This PR has changes that must be merged to WordPress.com |
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'm not sure if I'm doing something wrong, but I don't see the widget's JS and CSS being enqueued on the frontend, whether concatenation is enabled or disabled (with define( 'SCRIPT_DEBUG', true );
). Does it work for you?
I also get to see this warning on a JN site where concatenation is disabled:
PHP Warning: filemtime(): stat failed for /wp-content/plugins/jetpack-dev/jetpack_vendor/automattic/jetpack-search/src/widgets/js/search-widget-admin.js in /wp-content/plugins/jetpack-dev/jetpack_vendor/automattic/jetpack-assets/src/class-assets.php on line 374
Hi @jeherve thanks for your feedback. The assets only load for Classic Search as it did. I tried to keep everything as they were. Sorry the instructions weren't so clear. Just updated, would you mind testing it again? Thanks. |
20cdf40
to
e831bd4
Compare
This possibly is a @anomiex question, becuase I could see warnings for other scripts as well.
|
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.
Looking good, let's merge this! 🚢
Great news! One last step: head over to your WordPress.com diff, D73301-code, and commit it. Thank you! |
The jitm one probably means you didn't build packages/jitm in your local dev environment, so the built file isn't there to be served. The search one is the opposite, files in packages/search's |
I tested the package on WPCOM which works fine. The changes regarding the search widget will be applied manually to WPCOM after next release. And fusion syncing will be removed accordingly. |
Changes proposed in this Pull Request:
The PR moves Jetpack Search widget to the search package. Changes include:
jetpack-search-pkg
Jetpack_Initializer
PHP linter tried to arrange the order of the functions which lead to possibly hard review, and had to re-order and commit with
--no-verify
.Jetpack product discussion
pcNPJE-oI-p2
Does this pull request change what data or activity we track or use?
no
Testing instructions:
search-widget-frontend.js
andsearch-widget-frontend.css
(the style file is concatenated in /wp-content/plugins/jetpack/css/jetpack.css)Note: please use a theme that supports widgets (e.g. theme twentytwenty) as FSE themes don't have widget areas.