Skip to content

[v14]: Error and retry support for infinite scroll#32130

Merged
zmb3 merged 1 commit intobranch/v14from
bl-nero/backport-30964/v14
Sep 19, 2023
Merged

[v14]: Error and retry support for infinite scroll#32130
zmb3 merged 1 commit intobranch/v14from
bl-nero/backport-30964/v14

Conversation

@bl-nero
Copy link
Copy Markdown
Contributor

@bl-nero bl-nero commented Sep 19, 2023

Backporting #30964

This merge was requested because of conflicts on the Resources.tsx file, but somehow, it managed to merge automatically on my machine. Perhaps git rerere had something to do with it. Anyway, no manual tweaks were required.

* Add some unit tests to the existing useInfiniteScroll hook

* Change the interface of the infinite scroll hook

Now it only exposes one fetch function that can be used to trigger fetches from infinite scroll, regardless of whether it's the initial or a subsequent fetch. Restarting the data stream is driven by changing filtering parameters.

* Harden useKeyBasedPagination

* Install jsdom-testing-mocks

* Error and retry support for infinite scroll

* Fix type-check

* Fix a state management bug

* Make useInfiniteScroll a wrapper over useKeyBasedPagination

* Get rid of unnecessary useEffect

* Address review comments

* Layout fixes

* Review

* Lint fix

* Add the license

* One more review round

* Tweak the comment in useInfiniteScroll

Co-authored-by: Isaiah Becker-Mayer <isaiah@goteleport.com>

---------

Co-authored-by: Isaiah Becker-Mayer <isaiah@goteleport.com>
@zmb3 zmb3 added this pull request to the merge queue Sep 19, 2023
Merged via the queue into branch/v14 with commit 4723c82 Sep 19, 2023
@zmb3 zmb3 deleted the bl-nero/backport-30964/v14 branch September 19, 2023 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants