Create a bookmarklet called "Load all diffs". Click it to show all changed files on a GitHub PR.
Does anyone have a simpler solution whether it be software driven or (preferably) a link i'm missing on github?
From my GitHub gist here:
(credit goes to @Juanca from their gist here)
Instructions:
Create these bookmarks in your browser with the following Name and URL fields. For the URL field, just copy and paste the code block exactly as written, line breaks and all, including the javascript:
line at the top! Line breaks, whitespace, and multi-line C-style comments (ex: /* comment */
) are all permitted (tested in Chrome at least) when copy-pasting into the URL field to create a bookmarklet. Once you've created a browser bookmark with this code in it, then put it in your bookmarks bar at the top of your browser, and click on them when needed to run the specified Javascript program to perform the prescribed function.
When viewing the "Files changed" tab during a GitHub PR review, some files with many changes may be collapsed. GitHub shows a "Load diff" link for these files, and says in small font underneath this link: "Large diffs are not rendered by default.". This makes it impossible to use Ctrl + F to search the page for certain code or text within those files, and it can be tedious to manually scroll down and click the "Load diff" link one-at-a-time for each of those files. So, click your "Load all diffs" bookmarklet below to quickly show (load) the diffs for all files.
Name: "Load all diffs"
URL:
javascript:
/*
Load all diffs by expanding all files in the "Files changed" tab during a GitHub PR
review.
Source: https://gist.github.com/juanca/5fd799c5b094e3e4f8b709cd101d7403
*/
document.querySelectorAll('.load-diff-button').forEach(node => node.click())
Now click the Load all diffs bookmarklet at the top of your browser to show all files during a GitHub PR code review. Done.