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.

Ability to expand all collapsed code in PR diffs

See original GitHub issue

Issuehunt badges

When 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:

screenshot


IssueHunt Summary

tiramisu77 tiramisu77 has been rewarded.

Backers (Total: $60.00)

Submitted pull Requests


Tips


IssueHunt has been backed by the following sponsors. Become a sponsor

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:19
  • Comments:18 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
asbjornsabocommented, Mar 24, 2020

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.

3reactions
AdrianTPcommented, Sep 19, 2019

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!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Ability to expand all collapsed code in PR diffs #2151 - GitHub
Easiest solution: click all "expand" buttons until there are no more left, but this will cause multiple sequential loads and will look messy....
Read more >
Quick way to collapse/expand all files at once on a pull ...
Depending on the PR size this might take some time. Luckily, there's a quicker way. I recently found this neat shortcut/trick that can...
Read more >
Ability to collapse or minimize diffs in pull requests - Jira
Hi there,. It would be great if we could collapse the diff of a file when reviewing a pull request. That would allow...
Read more >
Button to collapse all diffs (#24679) · Issues - GitLab FOSS
I like to be able to collapse all of the code to get an overview of what files have been changed, and then...
Read more >
Automatically Collapse Generated Files in GitHub Diffs
If you haven't noticed yet, there's now a little chevron in the corner of each file in a GitHub diff that allows you...
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