This repository has been archived by the owner on Dec 30, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 157
feat(infiniteHits): add previous button #659
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Haroenv
reviewed
Apr 12, 2019
Haroenv
reviewed
Apr 15, 2019
samouss
suggested changes
Apr 17, 2019
Co-Authored-By: yannickcr <yannick.croissant@gmail.com>
Co-Authored-By: yannickcr <yannick.croissant@gmail.com>
Co-Authored-By: yannickcr <yannick.croissant@gmail.com>
Co-Authored-By: yannickcr <yannick.croissant@gmail.com>
Co-Authored-By: yannickcr <yannick.croissant@gmail.com>
samouss
suggested changes
Apr 23, 2019
Co-Authored-By: yannickcr <yannick.croissant@gmail.com>
Co-Authored-By: yannickcr <yannick.croissant@gmail.com>
Co-Authored-By: yannickcr <yannick.croissant@gmail.com>
Co-Authored-By: yannickcr <yannick.croissant@gmail.com>
samouss
approved these changes
Apr 24, 2019
Haroenv
pushed a commit
to algolia/instantsearch
that referenced
this pull request
Dec 28, 2022
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
The InfiniteHits widget is used to display a list of results with a “Show more” button. The user can click on this button to display more results without leaving its current page context.
Each time the user click on the “Show more” button the user will navigate to a new page (provided that the routing option is enabled in ais-instant-search).
However, in the case the user navigates directly to a particular page (direct link, previous button, page refresh) then the widget only displays the last result page.
This change add a previous button to the Infinite Hits widget to give the possibility to the user to load the previous result pages.
For implementation details see the full RFC.
Before being mergeable, this change requires a new release of https://github.com/algolia/instantsearch.js with the previous button feature:
instantsearch.js
releasevue-instantsearch
dependencies to use the newinstantsearch.js
releaseResult
Some "with previous button enabled" and "with a custom show previous render" stories were added for the Instant Hits widget.
https://deploy-preview-659--vue-instantsearch.netlify.com/stories/?selectedKind=ais-infinite-hits&selectedStory=with%20show%20previous%20enabled&full=0&addons=1&stories=1&panelRight=1&addonPanel=storybooks%2Fstorybook-addon-knobs