konveyor / tackle2-ui

Tackle (2nd generation) UI component.
Apache License 2.0
8 stars 43 forks source link

:bug: Fix fetching in InfiniteScroller #2085

Closed rszwajko closed 2 months ago

rszwajko commented 2 months ago

Fixes:

  1. initial delay in first fetch - root cause was delayed initialization of sentinel reference
  2. extra page fetch request - algorithm based on items count was not sufficient

Reference-Url: https://github.com/konveyor/tackle2-ui/pull/2049

codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 7.69231% with 12 lines in your changes missing coverage. Please review.

Project coverage is 42.14%. Comparing base (b654645) to head (e13c049). Report is 235 commits behind head on main.

Files with missing lines Patch % Lines
...p/components/InfiniteScroller/InfiniteScroller.tsx 12.50% 7 Missing :warning:
...mponents/InfiniteScroller/useVisibilityTracker.tsx 0.00% 4 Missing :warning:
.../app/components/task-manager/TaskManagerDrawer.tsx 0.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #2085 +/- ## ========================================== + Coverage 39.20% 42.14% +2.94% ========================================== Files 146 174 +28 Lines 4857 5578 +721 Branches 1164 1374 +210 ========================================== + Hits 1904 2351 +447 - Misses 2939 3211 +272 - Partials 14 16 +2 ``` | [Flag](https://app.codecov.io/gh/konveyor/tackle2-ui/pull/2085/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=konveyor) | Coverage Δ | | |---|---|---| | [client](https://app.codecov.io/gh/konveyor/tackle2-ui/pull/2085/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=konveyor) | `42.14% <7.69%> (+2.94%)` | :arrow_up: | | [server](https://app.codecov.io/gh/konveyor/tackle2-ui/pull/2085/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=konveyor) | `?` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=konveyor#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.