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
Mark all files as viewed/not-viewed #2444
Comments
This comment has been minimized.
This comment has been minimized.
As temporary solution I wrode JS bookmark:
Just save it as Bookmark and put JS in URL. |
I would love this feature. I love the Viewed GitHub feature but the UX is incomplete. (PS thanks for the excellent extension) If anyone wants a "set all viewed" equivalent of @Pyton's "unview all" snippet:
|
I was thinking that a better feature would be on the scroll, as you scroll down the file, it would mark file per file as viewed. |
Nop. Viewed feature (GH) collapse the code so You no longer see the code but only names. |
Seeing a file is different from being done reviewing it. You might see the whole file in a viewport, but it doesn't mean that you actually read all of it. The "Viewed" check must be an explicit action |
I'm thinking that we should put a "Mark all as read" button at the end of the page. This makes the most sense to me and also avoids this issue ⬇️, since when you reach the button, everything was loaded:
|
If such a feature can only affect files that have already been loaded then perhaps a "Load All" button/feature should be added first. If everything isn't loaded the button could be present, otherwise the button isn't shown and other commands are (e.g. "Mark all as read", "Mark all as unread", etc.). |
The solution in my last comment already solves that issue. |
Have you ever reviewed a PR that contains 2000+ files? I have. It took for ever just to load all the files and it would have been super nice to have just had a button that would have loaded everything for me instead of me scrolling down over and over again. 😄 |
AFIR when you scroll till loading starts it fetch rest of the code. |
that wasn't my experience, I had to keep scrolling down… oh, you're saying
maybe it was asynchronous loading for me even if I hadn't scrolled down
repeatedly; that's plausible; thank you
…On Mon, Jan 6, 2020 at 8:59 AM lukasz-tc ***@***.***> wrote:
Have you ever reviewed a PR that contains 2000+ files? I have. It took for
ever just to load all the files and it would have been super nice to have
just had a button that would have loaded everything for me instead of me
scrolling down over and over again. 😄
AFIR when you scroll till loading starts it fetch rest of the code.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#2444>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABKUPXKGRN2OMZKLQJS23DLQ4NBMHANCNFSM4IXMBGHQ>
.
|
In that case, just run the following on your dev tools: // toggle all to viewed
document.querySelectorAll('.js-reviewed-checkbox').forEach((elem => {
if (elem.checked) { return }
var clickEvent = new MouseEvent('click');
elem.dispatchEvent(clickEvent);
}))
// toggle all to not-viewed
document.querySelectorAll('.js-reviewed-checkbox').forEach((elem => {
if (!elem.checked) { return }
var clickEvent = new MouseEvent('click');
elem.dispatchEvent(clickEvent);
})) Btw, I shared as a bookmarklet that toggle on/off: Drag and drop the link on your bookmarks and click on the bookmarklet on GH PR page. |
What's the point of marking all files as viewed if you haven't viewed them? |
I do review them. I just don't want to click "Viewed" 2,000+ times. 😄 This doesn't happen too often but on some projects it does happen from time to time. I typically like to quickly scan all the files looking for anything suspicious and then just call it good. However, once I review it I'd like to be able to see what changed if someone pushes another commit which only affects a subset of the files, I don't want to have to quickly scan everything again just see what changed. |
The point I'm trying to make is that if you do review them, you also scrolled all the way to the bottom to see the button there. |
Just to add a use case. On a large PR we may get all the changes and review them locally in an IDE. In which case mark all as viewed helps a lot. |
Indeed, I didn’t think of checking it via git 👌 |
Can you check for an API to mark them as viewed? Marking “2000+ files” means making 2000+ HTTP requests. I think it’s gonna take a lot of time and maybe overwhelm GitHub. You might want to change strategy because GitHub didn’t account for it. I suggest sending this feature request to GitHub Maybe, also, avoid such huge PRs. What kind of code are you handing and how can you review that? |
A more interesting feature to me would be to mark all files up to a specific one to be Viewed. Not all files, just all the files from the first one up to one I select. That way we could have a way of tracking where we were at when we got interrupted while reviewing a super long PR Perhaps a menu item under the "..." menu of each file like "Mark all files up to and including this one as Reviewed". To me this is what the "Viewed" feature of GitHub was meant to be: to kind of bookmark where you were at during a review, which means only marking files as Viewed up to a certain one. |
@AliSoftware this could be realized by Click select like: click first item, click last item with Shift == Select all between |
I'll just add the reason I would like this feature and the reason I made #2865. Sometimes in big PRs I mark files as viewed when they are finalized for that PR, and leave some unviewed to make sure I clean up before finishing with that PR. Some other times, while I'm in the middle of working in a big PR, I need to do a "PR Party" and explain the changes to the rest of the team, and to do that it's useful to mask everything unviewed, then with the team go through the files and mark them as viewed as we go. Finally, after that is done, I either uncheck the unfinished views, or uncheck all again and mark the finished files viewed. |
Hello, another use-case would be to mark files containing some texts as viewed. |
@Decat-SimonA you can use https://github.com/github/linguist#generated-code "marking all files containing |
FYI: I've been using a custom search engine in Google Chrome to mark all files as read/unread, switch to the rich diffs, etc.; this could be modified to use
|
I'm implementing this via shift-click to mark multiple files at once |
would alt-click not make more sense? e.g. I believe alt-click is already natively supported by GitHub for expanding/collapsing all files |
Alt-click would make sense if it acted on all, but that's not how it works (currently). Shift-click is the standard for selecting "from X to Y"
That acts when clicking the toggle icon. This feature acts when clicking the "Viewed" checkbox |
I opened an issue for that: #3043, to extend the feature I implemented. |
This comment has been minimized.
This comment has been minimized.
I see this PR hasn't moved since it was created 😭 My use case:
|
@lordzsolt the feature already exists, you just need 2 clicks instead of 1: #3007 |
While reviewing PRs with 10+ files, the workflow gets easier by marking files as viewed. However, when I need to re-review the PR, it gets very tedious marking all files as not-viewed before going ahead with the review.
Would be great if we had a button that would mark all files as view or not-viewed.
The text was updated successfully, but these errors were encountered: