Pretty self-explanatory, when the PR touches a large amount of files, it would be nice to collapse all files.
(I'm a bit new to the extension, but my guess is this wouldn't be very hard to accomplish)
Btw, for anyone that also wants this feature, this is what I'm using to accomplish it manually
On the console:
$$('.file-header').forEach(function(element){element.click()})
There used to be a collapse/expand all button, but it was removed. I don't know if we want to bring it back or what.
There used to be a collapse/expand all button, but it was removed.
@paulmolluzzo Used to be in this extension, or in GitHub's UI itself?
Would love to see this implemented. Have wanted it a few times recently.
@DrewML In the extension.
@sindresorhus Have any problems with this feature being added back? Specifically, a button that allows collapsing (and probably re-expanding) all files in a diff? We'd still keep the default behavior of everything being expanded on page load.
This is something I'd use frequently @ work.
It was removed in https://github.com/sindresorhus/refined-github/issues/85#issuecomment-198780016.
when the PR touches a large amount of files, it would be nice to collapse all files.
Why? What's the use-case?
👍 for bringing this feature back. Thanks @hneiva for the "hack".
@sindresorhus:
My use-case is that I just want to skip some files and dig into a few down the list.
@sindresorhus use case:
See: https://github.com/sindresorhus/refined-github/pull/308 Happy to add it back if someone commits to maintaining it.
See: #308 Happy to add it back if someone commits to maintaining it.
I checked #308. I would like to commit to maintaining it, in what concerns specifically to this feature, for now at least. I will try to submit a PR soon about this when I have an opportunity.
Is this needed? You can already _skip all files_ by using this dropdown

Nah, not worth it.
I can't use the dropdown because "The table of contents is too big for display."
Furthermore, it's in a small panel and is inconvenient to scroll.
To workaround the issue, we can run following command in the browser console:
$$('button.js-details-target').forEach(function(element){element.click()})
I think this would be very useful. I'm reviewing a very long PR and my browser is sluggish to the point of being unusable.
Once #821 is in, that code can be adjusted to also work on this page. PRs welcome then.
Can confirm @shroo-paulli 's hack works as of 21st Dec 2017 🎄
I use $$('.js-details-target').map(o => o.click()). Same thing but just slightly more concise.
Those commands seem to expand all the files. Why would it do that?
Those commands seem to expand all the files. Why would it do that?
@andrewbrntt and collapse all files too
Just wanted to let you all know that we just shipped this 'natively' within GitHub as part of our Papercuts initiative 🎉
@lukehefson could you clarify that this feature exists? I have no idea where this "collapse all" button is :(
Alt+click on the “minimize file” button
lukehefson could you clarify that this feature exists? I have no idea where this "collapse all" button is :(
Alt+click on the “minimize file” button
That's right – thanks @bfred-it!
@auni53 There's also a more detailed explanation in our changelog if that helps!
Thanks, it works great! Hopefully future people will be able to Google to find that information.
Hopefully the interface on the page will surface that information, instead of relying on people googling for it! The feature may as well not exist if it's not documented, and it is a fantastic quality of life improvement.
Refined GitHub used to show this info in a tooltip, maybe GitHub should do the same
@lukehefson This doesn't seem to work in GitHub Enterprise?
@queeniema please open an issue with more details, including behavior not working, any console errors, and what version of GHE you're using.
@queeniema GitHub added this feature natively so it was removed from Refined GitHub. If you're on an old version of GHE that doesn't have it, try the last version of Refined GitHub that has it: bebc684d32a5c68647fac57d1251e0da0c627f3b or 2018.9.11
Alt + click seems to be not working for me.
to collapse all files, I appended this to the url,
?file-filters%5B%5D=
Making this
https://github.com/organisation/my-repo/pull/151/files
to this
https://github.com/organisation/my-repo/pull/151/files?file-filters%5B%5D=
worked for me
This feature was dropped. Follow or help out at https://github.com/sindresorhus/refined-github/issues/1729
Most helpful comment
To workaround the issue, we can run following command in the browser console: