-
Notifications
You must be signed in to change notification settings - Fork 796
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/add search rest API #21584
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:
|
0b6d841
to
739e056
Compare
Caution: This PR has changes that must be merged to WordPress.com |
2704512
to
ab38a8f
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.
Excellent work. All the functionality described in the PR works as expected and the code changes look good, especially with the addition of unit tests.
(I'd still recommend smoke testing the changes for private atomic sites before rolling them out to WPCOM.)
ab38a8f
to
1b2466c
Compare
Hi @jsnmoon Thanks for catching this. Now a |
17eca5d
to
a4f8388
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.
This looks good to go 👍. I left some revision recommendations inline below.
IMPORTANT: I'll revert changes for Jetpack the plugin and only merge changes for search the package in the PR.
Is there a need for this with these changes? The only translated string ('You are not allowed to perform this action.'
) is shown only during 4xx API errors.
...lugins/jetpack/_inc/lib/core-api/wpcom-endpoints/class-wpcom-rest-api-v2-endpoint-search.php
Show resolved
Hide resolved
87d0fc9
to
4897a41
Compare
A lot of stacked changes on Jetpack the plugin and don't sync them, seems rather problematic to me. For example, if we have something urgent to fix, it would be pretty hard. Also by doing so we would be able to consider it with WPCOM Search together, so that we might be able to figure out a better solution, like I mentioned above, getting rid of fusion, etc..
-----EDIT------- Will merge all changes as usual. |
Hi @jeherve @anomiex @sdixon194, can I please get a review on this PR please? thanks. |
@Automattic/jetpack-crew Hi team, anyone have a look at this please? Thanks. |
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 looks good to me. Let's merge this! 🚢
Great news! One last step: head over to your WordPress.com diff, D69399-code, and commit it. Thank you! |
These changes will be synced to WPCOM once the classic/instant search migration is complete. |
* master: (22 commits) Update storybook monorepo to v6.4.0 (#21897) Refresh the site's modules and settings after successful product activation (#21886) Plugin Install: Bump MC stat on success or fail. (#21893) Nav Unification: Use correct user capability for the Inbox menu item (#21882) Jetpack: Extend disconnection dialog component to handle multiple steps and accept more props (#21048) Disable CSSTidy property shorthand optimization in the editor or headstart (#21891) Connection UI: Update Composer instructions in README.md (#21890) Partner Compatibility: Adding a unique connection screen for customers who receive a coupon from a Jetpack partner (#21813) Search package: move search dashboard to package - the base (#21865) JITM: wrap CTA below text on small viewports (#21688) Licensing JS Package – fix icon positioning and width (#21878) JITM: new JS and CSS builder (#21874) Support site_intent for `/me/sites` endpoint (#21880) Don't render Critical CSS while generating CritCSS. (#21879) ConnectScreen: make button full width on small screens (#21683) Improve the copy of the license activation banner (#21876) Rename Webpack-built files back from `.min.js` and remove hashes (#21748) Search: Migrate more helper classes to package (#21751) Search: migrate/add search rest API (#21584) Add initial state to the connection package (#21864) ...
|
Changes proposed in this Pull Request:
Add all necessary APIs for standalone and Jetpack the plugin except for the
search_auto_config
API and probably the API to deactivate expired search.Request:
Response:
The format is exactly the same with public search API v1.3. Something like the following,
Jetpack product discussion
n/a
Does this pull request change what data or activity we track or use?
no
Testing instructions:
( cd projects/packages/search && composer phpunit )
blog_public
to-1
in the databasehttp://yousite/wp-json/jetpack/v4/search
for results and results / filters show correctly.