Search: Add instant search auto config#15026
Conversation
|
Caution: This PR has changes that must be merged to WordPress.com |
|
I'm concerned about the implicit nature of our auto-configuration adversely affecting the new customer experience. Could we possibly simplify our approach to the following?
Given that we already create the Overlay Sidebar on behalf of the user, performing an automated action onto the sidebar seems reasonable. Also, I think we could merge this branch into |
It should be doing both of these already (when the query param is present).
The register function only puts the info into php global variables. Adding the widgets adds them to the DB can we can't do DB writes on every page load.
Ah, good point. I think that this should then get combined into #15074 since that is adding an api call for actually triggering the auto config. @AnnaMag was going to take a look at that code to clean up my hackiness and see if that approach makes sense. So Calypso will make three api calls after purchase:
Then it will redirect to show the thank you banner in wp-admin. |
Yup, sounds good! 👍 |
|
Gah... i need to rebase this onto |
Yep, perfect! 🌟 |
dfc6096 to
26f4e17
Compare
|
Rebased this and removed the query param for triggering it so we can use an API. Merging this so we can focus separately on how we want to trigger things. |
* Search: Add Search plan to wp-admin Plans/My-Plans pages (#15011) * Add Instant Search feature gate * Add Jetpack Search to the Plans page * Instant Search: Add support in glance and performance sections (#15043) * Search: Add instant search auto config (#15026) * Significant refactoring of Plans pages, especially for Backups * Update the copy for search module. (#15123) * Search: Add search plan to my-plans page (#15095) * Search: Add pricing and tier information to Plans page (#15125) * Search: Fix search plan detection (#15156)
For a number of cases we should do some version of auto config on the instant search widgets to improve the initial UX.
Cases this handles:
sidebar-1sidebar-1then adds the preconfigured widget and replaces the core search widget if it exists.The default settings for the widget are look at the post types on the site and registered taxonomies in addition to tags, categories, and year.
The trigger for the auto config is currently just a hacky query string:
/wp-admin/?jpsearch_autoconfig. I am not sure what this should get hooked up to. Currently there is no nonce and we probably need to hook it up to something else. It may need to be tied into the onboarding/post-purchase flow though so maybe we should merge this into the feature branch as is for now?