[go: up one dir, main page]

Skip to content

Add the Options menu to the Diff File [Rapid Diffs][Diff File]

What does this MR do and why?

For #514397 (closed)

Implements the Options ("kebab") menu dropdown for a diff file in Rapid Diffs behind the rapid_diffs feature flag and the ?rapid_diffs=true search parameter.

This is the first of three small phases, so it has notable UX issues: Primarily, the actual content of the menu will be added later. This just sets up the menu itself and the loading paradigm to get it into place. This entire feature is behind both a feature flag and an opt-in search parameter, so this is rolling out only for development.

Phase Status
Disclosure dropdown 👈🏻 You are here
View @ SHA !182850 (merged)
Open in Editor !182851 (merged)

Vue 3 Compatibility

Notably, this code is very specifically crafted to succeed in:

  • Production
  • the test suite under Vue 2
  • the test suite under Vue 3

If you have concerns about a piece of code, please check your alternative suggestion under all three scenarios, as each item in this change was added (and tweaked) specifically to work in all three environments. I elaborated a bit more on each change in the commit.

MR acceptance checklist

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

Screenshots or screen recordings

Before (no search param) Before (search param) After (search param)
image image image

How to set up and validate locally

  1. Enable the rapid_diffs feature flag: rails c => Feature.enable( :rapid_diffs )
  2. Have an MR with at least 1 change
  3. Visit the MR's Changes tab
  4. Add ?rapid_diffs=true to the URL (or &rapid_diffs=true if there are already search parameters)
    • Submit the URL change to reload the page
  5. The "kebab" (vertical ellipsis) menu should be present and "work"
Edited by Thomas Randolph

Merge request reports

Loading