I love using Github’s pull requests. It has a lot of great features and is really fun to use. But there are a few things that irritate me from time to time. Here are a few of them.
File filter - “Select None”
I often need to review big pull requests on Github that have several files of various types (.m, .h, .csv, etc). Below is how the file filter currently works on Github. It allows you to select/deselect the type of file.
It really helpful when I want to hide files that I don’t need in the current view. It allows me to focus on the files that really need my attention. I often end up hiding images, fonts and other non-code files to really get a sense of what’s being implemented/changed in the code.
However, it becomes really frustating when I only want to review a single type of files. For example, I just want to see the “.m” files. To do this I need to go an uncheck all the other file types. It takes me around 10-15 clicks depending on the number of other file types.
A simple “Select None” option would have done wonders. I would be able to view just the “.m” files in 2 clicks. Below is a simple mock of how that would look.
Image files
Github does not show a preview for images in the pull request. It simply show a message “Binary file not shown.”
They do let you see the actual images, but for that you need to click on the “Display the rich diff” button as shown in the image below.
Great! So there is a way to review image changes. But again it gets really frustrating when you have to review a lot of images. You need to click on the “Display the rich diff” button individually for each image.
I really like how Gitlab handles this. They show you the actual image diffs by default. No need to click on a button. It definitely makes sense to show image diffs by default. Whenever I am merging a pull request, if a image has been added or modified I definitely want to see what the image looks like before approving the pull request.
Tree view for files
Currently Github only shows a list of the files that have changed. It does allow fuzzy search for files. But it doesn’t help you see what has changed in the project at a glance.
Gitlab handles this in a much better way. They allow you to switch to the tree view to see what files were changed within your projects’ directory structure.