-
Notifications
You must be signed in to change notification settings - Fork 813
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
Instant Search: Add infinite scrolling #13684
Conversation
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 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!
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.
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.
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.
Working for me now. Ship it!
* 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.