-
Notifications
You must be signed in to change notification settings - Fork 43
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
✨ Use InfiniteScroller pattern for the Task Drawer #2049
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2049 +/- ##
==========================================
+ Coverage 39.20% 42.15% +2.95%
==========================================
Files 146 174 +28
Lines 4857 5577 +720
Branches 1164 1376 +212
==========================================
+ Hits 1904 2351 +447
- Misses 2939 3210 +271
- Partials 14 16 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
5e72edd
to
f6ed149
Compare
Infinite scroller inside Task Drawer(queries with 2 sec delay to show loading progress) Screencast.from.2024-08-14.20-36-24.mp4 |
b74b3c2
to
ef89747
Compare
Implement InfiniteScroller based on oVirt VmPortal implementation and use it to fetch additional tasks in the Task Drawer. Key features: 1. fetch data using useInfiniteQuery from React Query 2. track sentinel visibility using IntersectionObserver API 3. monitor item count to prevent extra fetchMore calls Reference-Url: https://github.com/oVirt/ovirt-web-ui/blob/dfe0c4b8c92638f6e41b9fe0b09e0d07509618ae/src/components/VmsList/index.js#L50 Signed-off-by: Radoslaw Szwajkowski <rszwajko@redhat.com>
ef89747
to
a326194
Compare
@sjd78 @ibolton336 |
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.
It is working well, just a few comments and questions.
client/src/app/components/InfiniteScroller/InfiniteScroller.tsx
Outdated
Show resolved
Hide resolved
client/src/app/components/InfiniteScroller/useVisibilityTracker.tsx
Outdated
Show resolved
Hide resolved
…r.tsx Co-authored-by: Scott Dickerson <sdickers@redhat.com> Signed-off-by: Radoslaw Szwajkowski <rszwajko@redhat.com>
Signed-off-by: Radoslaw Szwajkowski <rszwajko@redhat.com>
Signed-off-by: Radoslaw Szwajkowski <rszwajko@redhat.com>
@sjd78 @ibolton336 |
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.
LGTM
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: #2049 Signed-off-by: Radoslaw Szwajkowski <rszwajko@redhat.com> Co-authored-by: Scott Dickerson <sdickers@redhat.com>
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: konveyor#2049 Signed-off-by: Radoslaw Szwajkowski <rszwajko@redhat.com> Co-authored-by: Scott Dickerson <sdickers@redhat.com>
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: konveyor#2049 Signed-off-by: Radoslaw Szwajkowski <rszwajko@redhat.com> Co-authored-by: Scott Dickerson <sdickers@redhat.com> Signed-off-by: Shevijacobson <shevijacob@gmail.com>
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: konveyor#2049 Signed-off-by: Radoslaw Szwajkowski <rszwajko@redhat.com> Co-authored-by: Scott Dickerson <sdickers@redhat.com> Signed-off-by: DvoraShechter1 <d0583212560@gmail.com>
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: konveyor#2049 Signed-off-by: Radoslaw Szwajkowski <rszwajko@redhat.com> Co-authored-by: Scott Dickerson <sdickers@redhat.com> Signed-off-by: DvoraShechter1 <d0583212560@gmail.com>
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: konveyor#2049 Signed-off-by: Radoslaw Szwajkowski <rszwajko@redhat.com> Co-authored-by: Scott Dickerson <sdickers@redhat.com> Signed-off-by: HadasahR <d025834828@gmail.com>
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: konveyor#2049 Signed-off-by: Radoslaw Szwajkowski <rszwajko@redhat.com> Co-authored-by: Scott Dickerson <sdickers@redhat.com>
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: konveyor#2049 Signed-off-by: Radoslaw Szwajkowski <rszwajko@redhat.com> Co-authored-by: Scott Dickerson <sdickers@redhat.com>
Implement InfiniteScroller based on oVirt VmPortal implementation and
use it to fetch additional tasks in the Task Drawer.
Key features:
Resolves: #1973
Reference-Url: https://github.com/oVirt/ovirt-web-ui/blob/dfe0c4b8c92638f6e41b9fe0b09e0d07509618ae/src/components/VmsList/index.js#L50
Signed-off-by: Radoslaw Szwajkowski rszwajko@redhat.com