Use user preferences as SSOT for diffs whitespace
What does this MR do?
Related to: #329577 (closed)
Overview
This removes the code for using cookies and URL parameters to toggle "Show whitespace changes" and updates the MR preferences dropdown to save directly to user preferences when toggling the checkbox.
Details
- Updates cookie check on initial diffs page load to:
- Look for the presence of cookie
diff_whitespace
- If found save the user's stored preference from the cookie
- Remove the cookie
- Look for the presence of cookie
- Updates the initial state in vuex to default view to
false
.- This is updated on the initial diff page load from user preferences
- Updates the vuex action to save directly to user preferences
- Also removes code references to cookies and URL params
- Various other updates to remove dead code and update tests
Screenshots (strongly suggested)
There no visible changes, but this is the dropdown in question:
Does this MR meet the acceptance criteria?
Conformity
-
I have included changelog trailers, or none are needed. (Does this MR need a changelog?) -
I have added/updated documentation, or it's not needed. (Is documentation required?) -
I have self-reviewed this MR per code review guidelines. -
I have followed the style guides. -
This change is backwards compatible across updates, or this does not apply.
Availability and Testing
-
I have added/updated tests following the Testing Guide, or it's not needed. (Consider all test levels. See the Test Planning Process.)
Edited by Justin Boyson