Scroll position after marking file as viewed #23515
Labels
type/feature
Completely new functionality. Can only be merged if feature freeze is not active.
type/proposal
The new feature has not been accepted yet but needs to be discussed first.
Feature Description
When you are reviewing a pull request, it's pretty common in our team to use the great feature of marking files as "viewed".
When you click viewed the file folds closed. When you have large diffs they have a sticky header and you can still click "viewed" even though you are at the bottom of the file, great!
The issue now:
When you mark a file as viewed while at the end of the big file, your scroll position ends up weird because the page got smaller. Now you might have skipped a few files or part of a diff and need to scroll back up to the "next" file.
Possible solution:
My idea was just scrolling the view to the folded file at the moment you mark the file as "viewed".
Then you would know where you are on the page.
Other suggestions are of course welcome.
In the video below I'm reviewing the docker-compose.yml and mark it as viewed. I expect the next file for me to review to be status.go (because it's the next file vertically). But I land in the middle of a main.go file.
Screenshots
pr_jump.mov
The text was updated successfully, but these errors were encountered: