Remove the Rapid Diffs toggle from merge requests

What does this MR do and why?

This MR removes the Rapid Diffs toggle from merge requests, so the Changes tab always shows Rapid Diffs. The Try Rapid Diffs and Rapid Diffs > Switch to classic loading controls next to the merge request title are gone. So are the rapid_diffs_enabled cookie and the rapid_diffs and rapid_diffs_disabled URL params that picked the experience.

Rapid Diffs has been the default on the Changes tab since 19.4. No feature flag controls it there since the rapid_diffs_on_mr_show and rapid_diffs_default_on_mr_show flags were removed. The toggle was the last way to reach the classic diffs app on a merge request.

Diff comments that Rapid Diffs can't open in place (commit comments, and comments with no position) now do a full page load of their discussion path, instead of forcing the classic diffs with rapid_diffs_disabled=true.

The toggle_rapid_diffs event and its metric are marked removed, and so is the legacy_diffs variant of the view_merge_request_diffs metric, because the server no longer sends that label. The docs lose the turn on and turn off steps.

To keep this MR easy to review, it only removes the toggle and the switch behind it. The code that served the classic app on merge request pages is now unreachable, and !269919 (merged) removes it. The rapid_diffs_debug flag is removed separately in !266204 (merged).

References

Screenshots or screen recordings

Before After
Rapid Diffs Beta dropdown open next to the merge request title No toggle next to the merge request title

How to set up and validate locally

  1. Open the Changes tab of any merge request. Rapid Diffs loads, and there is no Rapid Diffs dropdown next to the title.
  2. Set the rapid_diffs_enabled cookie to false, or add ?rapid_diffs_disabled=true to the URL, and reload. Rapid Diffs still loads.
  3. On a merge request with a comment on a specific commit, open that comment from the review drawer or the discussion. The page loads the commit's changes in Rapid Diffs.

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Stanislav Lashmanov

Merge request reports

Loading
Loading