Button to collapse all diffs

Description

When I'm reviewing a diff on a Merge Request, I like to be able to collapse all of the code to get an overview of what files have been changed, and then expand and review them in the order I choose. This is tedious when there are a lot of files with changes because I have to click on each one to collapse the diff.

Proposal

I would love to see a "Collapse All" button. It would make things much quicker for people like me who don't necessarily want to scroll through the files in the order that GitLab presents them.

Any thoughts? I'm happy to tackle this one if it seems like it would be helpful 😃

Design

  • If not all files are expanded, enable Expand button. Otherwise, disable the button.
  • If not all files are collapsed, enable Collapse button. Otherwise, disable the button.
Expand is disabled and collpase is enabled

02-expand-disable

Expand is enabled and collpase is disabled

03-collapse-disable

Edited by Hazel Yang