Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

MM-14791 Safari and FF scroll correction issue when loading more posts #2556

Merged
merged 1 commit into from
Mar 28, 2019

Conversation

sudheerDev
Copy link
Contributor

Summary

This is part of #2551
Safari and FF takes an extra frame for scroll correction causing jump to the right post when loading more posts

This happens because of an requestAnimationFrame added for correction which is only needed for chrome. Chrome does not correct the scroll position at times without request animation frame and loads another set of posts before correcting. requesting another frame prevents this behaviour but causes jump for other browsers
Solution: Use request animation frame callback only for chrome
mattermost/react-window@71be4d8

Ticket Link

MM-14791

…sing jump to the right post when loading more posts
@sudheerDev sudheerDev added the 2: Dev Review Requires review by a core commiter label Mar 28, 2019
@@ -21,6 +21,9 @@ const POSTS_PER_PAGE = Constants.POST_CHUNK_SIZE / 2;
const MAX_NUMBER_OF_AUTO_RETRIES = 3;

const MAX_EXTRA_PAGES_LOADED = 10;
const OVERSCAN_COUNT_BACKWARD = window.OVERSCAN_COUNT_BACKWARD || 50; // Exposing the value for PM to test will be removed soon
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addidng these so @esethna can change them on the fly to check the optimal values

@@ -21,6 +21,9 @@ const POSTS_PER_PAGE = Constants.POST_CHUNK_SIZE / 2;
const MAX_NUMBER_OF_AUTO_RETRIES = 3;

const MAX_EXTRA_PAGES_LOADED = 10;
const OVERSCAN_COUNT_BACKWARD = window.OVERSCAN_COUNT_BACKWARD || 50; // Exposing the value for PM to test will be removed soon
const OVERSCAN_COUNT_FORWARD = window.OVERSCAN_COUNT_FORWARD || 100; // Exposing the value for PM to test will be removed soon
const HEIGHT_TRIGGER_FOR_MORE_POSTS = window.HEIGHT_TRIGGER_FOR_MORE_POSTS || 1000; // Exposing the value for PM to test will be removed soon
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@enahum enahum added 4: Reviews Complete All reviewers have approved the pull request and removed 2: Dev Review Requires review by a core commiter labels Mar 28, 2019
@sudheerDev sudheerDev removed their assignment Mar 28, 2019
@sudheerDev sudheerDev added the CherryPick/Approved Meant for the quality or patch release tracked in the milestone label Mar 28, 2019
@sudheerDev sudheerDev added this to the v5.10.0 milestone Mar 28, 2019
@sudheerDev sudheerDev merged commit 742f772 into mattermost:master Mar 28, 2019
sudheerDev added a commit that referenced this pull request Mar 28, 2019
…sing jump to the right post when loading more posts (#2556)
@sudheerDev sudheerDev deleted the MM-14791 branch March 28, 2019 18:53
@sudheerDev sudheerDev added CherryPick/Done Successfully cherry-picked to the quality or patch release tracked in the milestone and removed CherryPick/Approved Meant for the quality or patch release tracked in the milestone labels Mar 28, 2019
sudheerDev added a commit that referenced this pull request Mar 28, 2019
…tion causing jump to the right post when loading more posts (#2556)"

This reverts commit 742f772.
sudheerDev added a commit that referenced this pull request Mar 28, 2019
…tion causing jump to the right post when loading more posts (#2556)" (#2560)

This reverts commit 742f772.
sudheerDev added a commit that referenced this pull request Mar 28, 2019
…tion causing jump to the right post when loading more posts (#2556)" (#2560)

This reverts commit 742f772.
@sudheerDev
Copy link
Contributor Author

reverting from both master and release branch

@amyblais amyblais added Changelog/Not Needed Does not require a changelog entry Docs/Not Needed Does not require documentation labels Mar 29, 2019
stevepartridge pushed a commit to stevepartridge/mattermost-webapp that referenced this pull request Mar 30, 2019
stevepartridge pushed a commit to stevepartridge/mattermost-webapp that referenced this pull request Mar 30, 2019
…tion causing jump to the right post when loading more posts (mattermost#2556)" (mattermost#2560)

This reverts commit 742f772.
thekiiingbob pushed a commit to thekiiingbob/mattermost-webapp that referenced this pull request Apr 2, 2019
thekiiingbob pushed a commit to thekiiingbob/mattermost-webapp that referenced this pull request Apr 2, 2019
…tion causing jump to the right post when loading more posts (mattermost#2556)" (mattermost#2560)

This reverts commit 742f772.
@lindy65 lindy65 removed the 4: Reviews Complete All reviewers have approved the pull request label Apr 12, 2019
@lindy65 lindy65 modified the milestones: v5.10.0, v5.12.0 Apr 13, 2019
@ogi-m ogi-m added Tests/Not Needed Does not require new release tests Tests/Done Release tests have been written and removed Tests/Not Needed Does not require new release tests labels May 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Changelog/Not Needed Does not require a changelog entry CherryPick/Done Successfully cherry-picked to the quality or patch release tracked in the milestone Docs/Not Needed Does not require documentation Tests/Done Release tests have been written
Projects
None yet
6 participants