GitHub papercut : Collapsing files in large PRs

To provide you with some context :

- in the software world, a Papercut is considered a problem which is a minor inconvenience. Note that all projects/products we use in our daily life have such paper cuts, which we learn to live with. You have all probably heard of the phrase "Death by a thousand papercuts".

- GitHub papercuts is a project to remove such minor inconveniences, all of which could add up to reduce the usability of the platform. See blogpost - https://blog.github.com/2018-08-28-announcing-paper-cuts/

One of the papercuts that I regularly experience happens when I need to review large PRs, whether they are my own changes or someone else's.

GitHub by default shows snippets of code from all of the files, snippets which contain code that has been changed in the PR.

This is fine when the changes are small, as most PRs usually are.

This becomes a problem when a large number of files changed in the PR. Note that GitHub provides a menu item to collapse a file i.e. not show the contents/changes in the file. On a large PR, I usually end up manually closing a large number of files, to look through the changes easily.

I've been wanting to write this up for a couple of weeks now.

If I knew any Javascript, I would try writing a Firefox extension that will recognize all of the `Collapse` menu items and automatically click them all when I try viewing the files. Alas.

Popular posts from this blog

Animation using GNUPlot

Arxiv author affiliations using Python

Thoughts on the National Deep Tech Startup Policy