Skip to content

Merge Request Diffs "Expand All" Button Does Nothing

Summary

When one or more files in the diffs tab of a merge request is collapsed, a button labelled "Expand All" in the header appears. Clicking this button does nothing, and triggers no console errors. Strangely, it DOES hide the "Expand All" button, so some state is changing, but the files don't appear.

Steps to reproduce

  1. Go to an MR with some file changes
  2. Collapse a file (the button will appear)
  3. Click the Expand All button

Example Project

!40636 (diffs)

What is the current bug behavior?

The button disappears like it's opened all of the files, but none of the files open.

What is the expected correct behavior?

The files should open.

Relevant logs and/or screenshots

simplescreenrecorder-2020-08-31_12.41.12

Output of checks

This bug happens on GitLab.com

Possible fixes

Off the top of my head, it seems like the parts of the state that are responsible for showing the button (getter hasCollapsedFile) is not looking at the same state that the actual file collapsing / uncollapsing is looking at (because it does work, at the individual file level).

I initially suspected that !40741 (merged) may have caused this, but that hasn't been merged yet 🤔