question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Automatically scroll to the next file in PR files view after marking as viewed

See original GitHub issue

Description

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

github.com/refined-github/refined-github/pull/5656/files

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:2
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
fregantecommented, May 31, 2022

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 😅)

0reactions
fregantecommented, Jun 4, 2022
Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found