-
Notifications
You must be signed in to change notification settings - Fork 6
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
Feature/895 pagination #358
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #358 +/- ##
===========================================
- Coverage 96.42% 96.40% -0.02%
===========================================
Files 442 442
Lines 13932 13971 +39
===========================================
+ Hits 13434 13469 +35
- Misses 498 502 +4
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
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.
I agree that the best approach is the 3rd one. It looks nice (CI fails though) but I cannot test it completely in my local machine as I fetch only a few cases using the bsn we usually use. I assume we can see that in the right way when we deploy.
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.
My only observation is the paginator shows when there aren't any cases but that might be common for all list views.
Since we have to filter cases on client side (separate open cases from closed) we can't use
page
query param to Zaken API for pagination and we have to implement it also on the client side.There were 3 options considered to implement pagination:
+ We show client all the data
- Performance-heavy, especially on staging environment, where we have thousands cases for 1 person
ordering
query param when requesting cases from Zaken API.+ It would be an optimal solution: we could order cases on the end date and limit the request to only open ones or closed ones.
- Too bas this query param doesn't work in eSuite
+ Improve performance
- We don't show all cases
- We limit requests, not the amount of cases, and then we separate open and closed ones, it means it is possible to show the user 3 closed cases and hide 30 older ones. But for regular user in production it is very unusual situation
@alextreme and I decided to stick to the 3rd option for now, because it won't affect users in production much, since it's rare for a user to have hundreds of cases, but it will improve our performance on staging env
each of them we limit to 50 cases. Not sure if this step is necessary, I'd like to hear your opinionUpd. removed thanks to @alextreme