Skip to content

Conversation

gibrown
Copy link
Member

@gibrown gibrown commented Aug 29, 2019

This is the same as #13313 but merging into instant-search-master rather than master.

Changes proposed in this Pull Request:

Implementing the minimal search results mockup from p3QzjZ-VL-p2

There will be three different types of search results:

  • minimal
  • product
  • engagement

But this is just focusing on the first one and setting us up for the other two.

This PR also implements the logic for corrected search queries when we do any spelling correction and displaying the total number of results. Here is what it all looks like:

Screen Shot 2019-08-26 at 8 24 06 PM

Instant Search remains gated by a JETPACK_SEARCH_PROTOTYPE define.

Is this a new feature or does it add/remove features to an existing part of Jetpack?

  • Yes, this is a new feature being added onto Jetpack Instant Search (p3QzjZ-V3-p2).

Testing instructions:

  • Add define( "JETPACK_SEARCH_PROTOTYPE", true ); to your wp-config.php.
  • Ensure that your site has the Jetpack Pro plan and has Jetpack Search enabled.
  • Enter a query into a search widget. Alternatively, navigate to a search page like /?s=privacy.
  • Verify how the page looks and that you are getting results as expected

You can also follow the instructions in #13290 to run your query against any site rather than the site you deploy the code on (all the data comes from the API).

Proposed changelog entry for your changes:

  • No changelog entry necessary; these changes will not be accessible to our users.

@gibrown gibrown added [Status] Needs Review This PR is ready for review. [Feature] Search For all things related to Search Instant Search labels Aug 29, 2019
@gibrown gibrown requested review from bluefuton, jsnmoon and a team August 29, 2019 21:35
@gibrown gibrown self-assigned this Aug 29, 2019
aggregations: aggs,
filter: filter,
};
return fetch(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How should we handle failed API requests?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question. Probably depends on what the error code was. Let's deal with it in #13366

@bluefuton
Copy link
Contributor

Layout bug with long titles:

Screen Shot 2019-08-30 at 13 50 57

Copy link
Contributor

@bluefuton bluefuton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happy for us to merge this into the feature branch as a work-in-progress. Let's make sure we go back and address feedback from the original PR #13313 later.

@bluefuton
Copy link
Contributor

Spelling suggestions seem to work well:

Screen Shot 2019-08-30 at 13 49 15

@bluefuton bluefuton removed the [Status] Needs Review This PR is ready for review. label Aug 30, 2019
Copy link
Member

@jeherve jeherve left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@jeherve jeherve added the [Status] Ready to Merge Go ahead, you can push that green button! label Aug 30, 2019
@gibrown gibrown merged commit a4e056f into instant-search-master Aug 30, 2019
@matticbot matticbot added [Status] Needs Changelog and removed [Status] Ready to Merge Go ahead, you can push that green button! labels Aug 30, 2019
@jeherve jeherve deleted the update/instant-search-results-formatting branch September 4, 2019 06:25
jsnmoon added a commit that referenced this pull request Oct 23, 2019
* Implement minimal search results and spelling correction (#13365)
* Add filtering display (#13371)
* Fix search result display bugs and make improvements (#13393)
* Add rudimentary support for filtering on post types (#13430)
* Add support for filtering on categories and tags (#13505)
* Add instant search sorting based on the URL (#13377)
* Add support for filtering on dates (#13545)
* Add custom taxonomy filtering (#13605)
* add sort widget (#13614)
* fix many theme incompatibilities (#13602)
* Add infinite scrolling (#13684)
* Add caching to the api requests (#13714)
* Clean up some design bugs/issues (#13721)
* Fix labels for post types when we have them. (#13750)
* Add localization and formatting of all dates (#13748)
* search from any page on the site (#13713)
* Hook up default options (inc. sort) (#13742)
* Add TrainTracks analytics (#13730)
* Create PostTypeIcon component (#13790)
* Upgrade to Preact 10 (#13794)
* Add comments component (#13797)
* Address review feedback
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Search For all things related to Search
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants