Skip to content

Use user preferences as SSOT for diffs whitespace

Justin Boyson requested to merge jdb/sync-showwhitespace-changes into master

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
  • 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:

image

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Edited by Justin Boyson

Merge request reports