-
Notifications
You must be signed in to change notification settings - Fork 2.7k
MM-13180 Call load posts earlier for infinite scroll #2079
Conversation
@esethna would you like to test on a spin mint? |
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, just have a non-blocking request
|
Spinmint test server created at: https://i-07d1888c53b6bedeb.test.spinmint.com Test Admin Account: Username: Test User Account: Username: Instance ID: i-07d1888c53b6bedeb |
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.
Awesome work, looks great
Spinmint test server destroyed |
Can this be merged now or do we need to wait for the perf improvements to go in forst? |
@esethna This is not blocked IMO and better we have this in master for comparing perf benefits from the other PR's |
* MM-13180 Call load posts earlier for infinite scroll * Add check for max height for loading posts * Fix issue of loading posts not getting triggered at right position when lot of posts are loaded * scrollHeightAoveFoldForLoad can be really high when lot of posts are loaded comaparision with max value should be with scrollTop value * Change the max-value of sctollTop to 2500 for triggering loadPosts
* MM-13180 Call load posts earlier for infinite scroll * Add check for max height for loading posts * Fix issue of loading posts not getting triggered at right position when lot of posts are loaded * scrollHeightAoveFoldForLoad can be really high when lot of posts are loaded comaparision with max value should be with scrollTop value * Change the max-value of sctollTop to 2500 for triggering loadPosts
Summary
Loads posts earlier than existing trigger.
Existing trigger is at 40% of clientHeight(visible scroll area) so typically about
0.4 * 800(clientHeight)
i.e200px
from the top of the postList. If there are4000px
of posts in total at present we trigger to load posts when user reaches to3800px
With this PR we change this to load when scroll position is at 30% from the top. i.e if
4000px
we trigger to load posts at3040px
. i.e by0.3 * (4000 - 800)
i.e960px
Ticket Link
MM-13180
Checklist
[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]
make check-style
to check for style errors (required for all pull requests)make test
to ensure unit and component tests passed