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
- Open a MR
- Make a small change to a file that has more than 1,000 lines and push to the MR branch
- View diff in MR page
- Click
Click to expand it.
to view changes - Click on the Cog icon > Tick or untick
Show whitespace changes
- Click
Click to expand it.
to view changes on the file again - See the Download button even though there's only a few lines change
Example Project
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.