Ability to expand all collapsed code in PR diffs
See original GitHub issueWhen reviewing PRs, sometimes it’s useful to view the entire file with the diffs in context. To do this, one needs to click the expand diff button multiple times until the entire file is exposed.
I’d like to be able to alt-click one of the expand markers in collapsed code and have all code blocks expand at once (perhaps limited to the current file). A similar feature was recently added to VSCode, btw, so there’s precedence for this.
There is already a feature to view the file at the commit associated to the diff being viewed, but then the full code is shown unmarked, without the diff indicating what changed.
Also, please note that this is about expanding/collapsing code within a diff, rather than folding entire files, which was a previous feature and was removed after it was implemented directly by GitHub (see #1486). What I’m talking about is this:
IssueHunt Summary
tiramisu77 has been rewarded.
Backers (Total: $60.00)
Submitted pull Requests
Tips
- Checkout the Issuehunt explorer to discover more funded issues.
- Need some help from other developers? Add your repositories on IssueHunt to raise funds.
IssueHunt has been backed by the following sponsors. Become a sponsor
Issue Analytics
- State:
- Created 4 years ago
- Reactions:19
- Comments:18 (6 by maintainers)
Top GitHub Comments
And what you do is “Alt-Click” on this symbol? (That is, clicking when holding the Alt button?)
Does not work for me. Tested with Firefox and Chromium under Linux, and with Firefox (I believe) under Windows 10. Would really like to have this working.
Thanks, @tiramisu77 and @fregante! I just updated my extension to 19.9.19 and gave it a little test. It is indeed a little slow, as you noted in the PR comments, but considering that all you have to work with is UI elements, it works perfectly. Just alt-click one of the “expand” gutter buttons and all of the folded lines unfurl within a couple of seconds (depending on the size of the file and how many folded sections exist, obviously). Wonderful!