-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
fix: Explore scrolled down when navigating from dashboard #20962
Conversation
Codecov Report
@@ Coverage Diff @@
## master #20962 +/- ##
==========================================
- Coverage 66.35% 66.34% -0.02%
==========================================
Files 1766 1767 +1
Lines 67124 67144 +20
Branches 7129 7137 +8
==========================================
+ Hits 44541 44546 +5
- Misses 20759 20772 +13
- Partials 1824 1826 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more |
/testenv up |
@kgabryje Ephemeral environment spinning up at http://35.162.196.230:8080. Credentials are |
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. I was not able to reproduce the bug anymore. I also tested the navigation flows and didn't find anything. Thanks for the fix @kgabryje!
Ephemeral environment shutdown and build artifacts deleted. |
(cherry picked from commit e4fc556)
(cherry picked from commit e4fc556)
(cherry picked from commit e4fc556)
SUMMARY
Sometimes when user entered Explore from Dashboard, Explore was scrolled down and user was stuck in that position. That's because Explore is sometimes mounted with initial scroll set to some value above 0. We are stuck in this position, because of
overflow: hidden
on body. It’s related to how react-router mounts components on navigation, but I haven’t been able to find an answer why this bug is so non-deterministic.We fix it by programmatically scrolling to top when SPA route pathname changes.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
The bug shown in the video shows up only from time to time. After this fix, Explore should always open normally.
Screen.Recording.2022-08-03.at.12.48.39.PM.mov
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION
CC @andrey-zayats