MR diffs page: Show whitespace changes is rendered when the url ends on ?w=0
Summary
Show whitespace changes is rendered on the MR diffs page when the page url ends on ?w=0. Clicking the button results in the page being reloaded with ?w=0
Probably related to gitlab-ce#48654.
Steps to reproduce
smcgivern/gitlab-test!2 (diffs)
What is the current bug behavior?
Show whitespace changes is rendered and clicking it results in the page being reloaded with ?w=0
What is the expected correct behavior?
Hide whitespace changes is rendered and clicking it results in the page being reloaded with ?w=1
Relevant logs and/or screenshots
Output of checks
This bug happens on GitLab.com
Possible fixes
https://gitlab.com/gitlab-org/gitlab-ce/blob/e23b966d8dd2a161d3493c0b991c0c2ce43fea75/app/assets/javascripts/diffs/components/changed_files.vue#L34
This probably needs additional check for value 0:
whitespaceVisible() {
var whitespaceVisible = getParameterValues('w')[0]
return !whitespaceVisible || whitespaceVisible === "0"
},
I can create a MR if needed.
Edited by Jasper Maes
