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 386
feat(infiniteHits): add previous button #2296
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
Deploy preview for react-instantsearch ready! Built with commit 7c0250e https://deploy-preview-2296--react-instantsearch.netlify.com |
samouss
suggested changes
Apr 17, 2019
packages/react-instantsearch-dom/src/components/InfiniteHits.js
Outdated
Show resolved
Hide resolved
packages/react-instantsearch-dom/src/components/__tests__/InfiniteHits.js
Outdated
Show resolved
Hide resolved
packages/react-instantsearch-dom/src/components/__tests__/InfiniteHits.js
Outdated
Show resolved
Hide resolved
…niteHits.js Co-Authored-By: yannickcr <yannick.croissant@gmail.com>
…niteHits.js Co-Authored-By: yannickcr <yannick.croissant@gmail.com>
Co-Authored-By: yannickcr <yannick.croissant@gmail.com>
packages/react-instantsearch-core/src/connectors/__tests__/connectInfiniteHits.js
Outdated
Show resolved
Hide resolved
packages/react-instantsearch-core/src/connectors/connectInfiniteHits.js
Outdated
Show resolved
Hide resolved
packages/react-instantsearch-core/src/connectors/connectInfiniteHits.js
Outdated
Show resolved
Hide resolved
packages/react-instantsearch-core/src/connectors/__tests__/connectInfiniteHits.js
Outdated
Show resolved
Hide resolved
packages/react-instantsearch-core/src/connectors/connectInfiniteHits.js
Outdated
Show resolved
Hide resolved
packages/react-instantsearch-core/src/connectors/connectInfiniteHits.js
Outdated
Show resolved
Hide resolved
samouss
suggested changes
Apr 23, 2019
packages/react-instantsearch-core/src/connectors/__tests__/connectInfiniteHits.js
Outdated
Show resolved
Hide resolved
packages/react-instantsearch-core/src/connectors/__tests__/connectInfiniteHits.js
Outdated
Show resolved
Hide resolved
packages/react-instantsearch-core/src/connectors/__tests__/connectInfiniteHits.js
Outdated
Show resolved
Hide resolved
packages/react-instantsearch-core/src/connectors/connectInfiniteHits.js
Outdated
Show resolved
Hide resolved
packages/react-instantsearch-dom/src/components/InfiniteHits.js
Outdated
Show resolved
Hide resolved
packages/react-instantsearch-dom/src/components/__tests__/InfiniteHits.js
Show resolved
Hide resolved
packages/react-instantsearch-dom/src/components/__tests__/InfiniteHits.js
Show resolved
Hide resolved
yannickcr
force-pushed
the
feat/infinitehits-previous-button
branch
from
April 24, 2019 11:53
64f1a20
to
48faedd
Compare
samouss
approved these changes
Apr 25, 2019
packages/react-instantsearch-core/src/connectors/connectInfiniteHits.js
Outdated
Show resolved
Hide resolved
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 you implmented URL routing in your React integration).
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.
Result
A "with previous button" story has been added for the Instant Hits widget.
https://deploy-preview-2296--react-instantsearch.netlify.com/storybook/?path=/story/infinitehits--with-previous-button