Instant Search: Add infinite scrolling #13684
Instant Search: Add infinite scrolling #13684jsnmoon merged 13 commits intoinstant-search-masterfrom
Conversation
gibrown
left a comment
There was a problem hiding this comment.
I briefly contemplated resolving the conflicts but I though I think I see how the results are getting concatenated between requests, unsure I understand it well enough to do that merge. ;)
The scrolling works pretty well. Also tested when getting to the end of the results and that works well too.
Somehow though the filtering seems to be broken now. The initial search is not showing any filters. Sometimes they appear when scrolling, but then they disappear after applying some filtering. I assume it has to do with how the results are getting combined.
My other comments are pretty minor and not worth holding up this PR for. I like that you are directly relying on the CSS from the theme for the button. Looks good.
f1929e3 to
c4c6bbc
Compare
c4c6bbc to
a0f724c
Compare
540a623 to
3369929
Compare
This was due to a silly mix up in a ternary statement -- should be fixed!
gibrown
left a comment
There was a problem hiding this comment.
Still has a bug somewhere. When I load more results the filters then disappear. I'm guessing that the aggs results are just getting overwritten by the second search query rather than persisted.
Aggregations should now be preserved for paged responses.
* 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
Changes proposed in this Pull Request:
This enables paging via a "Load More" button with infinite scrolling support.
Is this a new feature or does it add/remove features to an existing part of Jetpack?
Yes, this adds paging to Jetpack Instant Search results.
Testing instructions:
define( "JETPACK_SEARCH_PROTOTYPE", true );to your wp-config.php.Proposed changelog entry for your changes:
None.