-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
fix: timeline scroll after navigate #23664
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
@midzelis this is quite invasive. I couldn't find any scenario where we don't want to scroll. Could you explain in which case we don't want to scroll?
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.
I'm fine always attempting to scroll to query param for all timeline/asset-viewer routes if it works and solves the problem.
This is less important since #22838 was merged. Previously, if you had scrolled when reloading the timeline due to a browser back or asset-viewer back-arrow, and the asset you were viewing was mid-viewport, if you had scrolled again to that asset, it would always move the asset to the top/left of the viewport, moving it away from its current mid-viewport position.
However, there is still one place where you don't really want to scroll - and thats on direct loads of asset-viewer. (i.e.
/photos/<id>?at=<id>) - that may be a bit contrived, because you'd never really want to specify an?at=param on the asset-viewer routes, but because the asset-viewer loads literally on top of the timeline components, this might have caused issues.The bigger problem is the fact that several timebucket API calls, memories API calls, etc are called on asset-viewer routes - which are completely invisible behind the asset-viewer. But thats a task for another day.
Uh oh!
There was an error while loading. Please reload this page.
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.
Oh got it that makes sense. Then I'd like to go with this solution for now. And yeah, the asset viewer only being a full screen overlay makes a lot of things kind of annoying; definitely warrants a larger discussion eventually