Skip to content

Mark all files as viewed/not-viewed #2444

Closed

Description

@umanghome

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.

Activity

  1. fregante commented on Sep 17, 2019

    @fregante
  2. Pyton commented on Oct 11, 2019

    @Pyton

    As temporary solution I wrode JS bookmark:

    javascript:boxes=document.getElementsByClassName("js-reviewed-checkbox"),counter=0;for(let e=0;e<boxes.length;e++){const t=boxes[e];"File viewed, click, value:true"==t.dataset.gaClick&&(t.click(),counter++)}alert("Unfolded "+counter);
    

    Just save it as Bookmark and put JS in URL.

  3. bbugh commented on Oct 22, 2019

    @bbugh

    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:

    javascript:boxes=document.getElementsByClassName("js-reviewed-checkbox"),counter=0;for(let e=0;e<boxes.length;e++){const t=boxes[e];"File viewed, click, value:false"==t.dataset.gaClick&&(t.click(),counter++)}alert("Folded "+counter);
    
  4. leocaseiro commented on Jan 6, 2020

    @leocaseiro
    Contributor

    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.

  5. Pyton commented on Jan 6, 2020

    @Pyton

    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.

  6. fregante commented on Jan 6, 2020

    @fregante
    Member

    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.

    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

  7. fregante commented on Jan 6, 2020

    @fregante
    Member

    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:

    such feature can only affect files that have already been loaded.

  8. mfulton26 commented on Jan 6, 2020

    @mfulton26

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

  9. fregante commented on Jan 6, 2020

    @fregante
    Member

    The solution in my last comment already solves that issue.

  10. added
    small
    on Jan 6, 2020
  11. mfulton26 commented on Jan 6, 2020

    @mfulton26

    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. 😄

  12. 14 remaining items

  13. mfulton26 commented on Apr 14, 2020

    @mfulton26

    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 %s in the search URL to take "arguments" to a "Mark all as viewed" function to match file names or contents of files (you'd have to modify the script to detect such, etc.)

    Search engine Keyword Query URL
    GitHub: Display all rich diffs ghrd javascript: document.querySelectorAll('.js-rendered').forEach(button => button.click());
    GitHub: Display all source diffs ghsd javascript: document.querySelectorAll('.js-source').forEach(button => button.click());
    GitHub: Mark all as not viewed gh-v javascript: document.querySelectorAll('.js-reviewed-checkbox').forEach(input => !input.checked || input.click());
    GitHub: Mark all as viewed gh+v javascript: document.querySelectorAll('.js-reviewed-checkbox').forEach(input => input.checked || input.click());
  14. self-assigned this
    on Apr 15, 2020
  15. fregante commented on Apr 15, 2020

    @fregante
    Member

    I'm implementing this via shift-click to mark multiple files at once

  16. mfulton26 commented on Apr 16, 2020

    @mfulton26

    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

  17. fregante commented on Apr 17, 2020

    @fregante
    Member

    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"

    I believe alt-click is already natively supported by GitHub for expanding/collapsing all files

    That acts when clicking the toggle icon. This feature acts when clicking the "Viewed" checkbox

  18. deleted a comment from on Apr 22, 2020
  19. deleted a comment from on Apr 22, 2020
  20. deleted a comment from on Apr 22, 2020
  21. deleted a comment from on Apr 22, 2020
  22. fregante commented on Apr 30, 2020

    @fregante
    Member

    would alt-click not make more sense?

    I opened an issue for that: #3043, to extend the feature I implemented.

  23. Flabbergasted-1 commented on Oct 20, 2020

    @Flabbergasted-1
  24. lordzsolt commented on Feb 15, 2021

    @lordzsolt

    I see this PR hasn't moved since it was created 😭

    My use case:

    • I review a PR, mark each file individually as "Viewed"
    • PR gets approved and merged
    • After the release, something breaks, so we need to revisit the PR to see what change could've caused it.
    • All files are collapsed, so I individually have to expand all of them....
  25. fregante commented on Feb 15, 2021

    @fregante
    Member

    @lordzsolt the feature already exists, you just need 2 clicks instead of 1: #3007

  26. locked as resolved and limited conversation to collaborators on Feb 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

acceptedenhancementsmall

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions