Request visible batch of commit data first when lazy loading
What does this MR do and why?
In !71633 (merged) we added the ability to lazy load commit data in batches.
In order to support lazy loading in reverse (scrolling up), we load the batch above the currently visible batch as well.
As a further enhancement, changes in this MR ensure that we load the batch above the currently visible batch first, that way the user sees the visible batch of commit data faster.
Screenshots or screen recordings
before | after |
---|---|
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
- Enable the lazy loading
Feature.enable(:lazy_load_commits)
- Visit a repo page with many files.
- Drag the scrollbar down and notice the order in which the batches load.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #343000 (closed)
Edited by Jacques Erasmus