Automatically scroll to the next file in PR files view after marking as viewed
See original GitHub issueDescription
Every now and again, I have to review PRs with a lot of small files. When you view/collapse a file, you have to scroll a little bit to the next file to collapse it next.
I think it would be nice if, after collapsing, the page would automatically scroll the 60px to the next file.
The code I used to make my example video was:
document.querySelectorAll(".js-reviewed-toggle").forEach((el) =>
el.addEventListener("click", () => {
window.scrollBy({ left: 0, top: 60, behavior: "smooth" });
})
);
Screenshot
https://user-images.githubusercontent.com/2098462/171027573-2ea9c420-ad85-4e81-a1c5-de35f28e9e7c.mov
Example URL
Issue Analytics
- State:
- Created a year ago
- Reactions:2
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Rendering and previewing sequences - Adobe Support
In this Help article, learn how to render, preview, and playback sequences in Premiere Pro.
Read more >Mark files as viewed - The GitHub Blog
Mark files as viewed—and see if they've changed since you viewed them—to easily pick up where you left off.
Read more >Mark changes to files as "reviewed" in merge requests - GitLab
Additionally, users need to be able to track the progress they've made after viewing files. Action: Explore the concept of reducing the size...
Read more >Reviewing a pull request | Bitbucket Data Center and Server 8.6
When viewing a commit, you can comment on the whole file, or a particular line of code, for any file in the commit....
Read more >Organize and find photos in OneDrive - Microsoft Support
Learn to organize and find files in OneDrive by using photo search, tags, and albums.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This sounds good in theory but it risks being super annoying and maybe a little confusing too. Sliding the whole page under the cursor might be a little disorienting, this type of interaction is basically not seen anywhere.
I don’t know if it still works but I suggest pressing the J key to focus the next item after clicking Viewed, and then maybe continue marking as viewed with the keyboard (if such shortcut exists 🤔, I don’t know, I’m on mobile right now 😅)
Closing in favor of https://github.com/refined-github/refined-github/issues/5674