Skip to content

Toggle show whitespace changes on and off while viewing diff triggers download file

Summary

When viewing diff in Merge Request, if a file has more than 1,000 lines, clicking expand > clicking Show whitespace changes in the cog icon cause the file > click expand again will cause the file to be unviewable and required a refresh. The download button will make sense if there are a lot of changes on the file but it probably make more sense to be able to view the changes on the MR page when there's only a few changes to the file.

Steps to reproduce

  1. Open a MR
  2. Make a small change to a file that has more than 1,000 lines and push to the MR branch
  3. View diff in MR page
  4. Click Click to expand it. to view changes
  5. Click on the Cog icon > Tick or untick Show whitespace changes
  6. Click Click to expand it. to view changes on the file again
  7. See the Download button even though there's only a few lines change

Example Project

https://gitlab.com/rotanak/testproject/-/merge_requests/12/diffs?w=1&view=parallel#ce1be0ff4065a6e9415095c95f25f47a633cef2b_0_11

What is the current bug behavior?

File that has more than 1,000 lines will not be viewable in the MR diff page even if there was only a few changes made to the file.

What is the expected correct behavior?

User can view changes to a file on the MR diff page without having to download it when GitLab can load the changes.

Output of checks

GitLab Enterprise Edition 12.7.0-pre 2f3aa846

Possible workaround

Make use of the WebIDE "Review" mode to review changes.

Edited by Cynthia "Arty" Ng