-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Fix comment section auto-scroll glitch on initial load #8316
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
base: development
Are you sure you want to change the base?
Fix comment section auto-scroll glitch on initial load #8316
Conversation
Pull request was closed
|
Haven't actually tested it yet but what I'm seeing from the after videos is that the sort by drop down and hide comments is out of view |
sure I'll work on it to show "hide comments" and "sort by drop down" |
Head branch was pushed to by a user without write access
|
give me few days I'll try to make it more fluent than this to avoid the auto scroll up Untitled_v2.mp4 |
|
Okay I worked on this issue I got 2 solutions.
In the current behavior, when scrolling down the page, the recommendation sidebar keeps loading videos above the fold. Because of this, whenever the user clicks “Click to View Comments”, the page expands downward more than expected. To avoid a sudden “teleport” effect, I implemented a simple smooth scroll so the viewport moves back to the top of the comments section. After_V1.mp4
After_V1_90__of_the_times.mp4
But there is one major drawback: it adds a second scrollbar. Most users don’t scroll the recommendation videos separately, and they generally prefer scrolling the recommendations and comments together so it will might make user experience worse. After_V2.mp4I have committed the 1st version only but still added the video of v2 as a idea but users wont like it. |
|
This isnt really any fault of you but this feels more like a workaround then addressing the root cause. The question is how can we address the root cause of this. @PikachuEXE thoughts |



Pull Request Type
Related issue
Description
Fixes an unwanted auto-scroll behavior when loading comments. Previously, when a user expanded the video description, scrolled to the bottom, and then clicked "Load Comments," the page would automatically scroll down too far, causing the user to miss the first few comments.
Screenshots
Before :
Before_Linus.mp4
After:
After_linus.mp4
Before 2nd example:
Before_2.mp4
After 2nd example:
After_2.mp4
Testing
Go to a video e.g. https://youtu.be/g3FkuZNSGkw
Expand description
Scroll description to the bottom
Load comments
Check if the comment section starts from the 1st comment or not
2nd -> check if community post comments are loading properly or not.
Desktop
Additional context