Skip to content

Add warning dialog when users click "Merge immediately" merge train option

Nathan Friend requested to merge nfriend-add-merge-train-warning-dialog into master

What does this MR do?

Adds a warning modal that is shown when users click "Merge immediately" instead of allowing an MR to progress naturally through the merge train. In addition, the "Merge immediately" dropdown option is rendered with a red background.

In addition, this MR moves one associated test file (mr_widget_ready_to_merge_spec.js) from Karma to Jest.

Documentation

Documentation updates for this feature are being made in !21060 (merged).

GIF

2019-11-29_14.46.31

Some details that may not be obvious from the GIF above:

  • When the dialog is opened, the Cancel button is automatically given keyboard focus
  • The link in the body of the dialog opens this page in a new tab
  • The warning dialog and the red background of the "Merge immediately" dropdown option are only shown for this specific merge train scenario. For example, if the button reads "Merge when pipeline succeeds", the dropdown button looks and behaves normally.

Also, the background of the "Merge immediately" dropdown button (not the button in the dialog) has since been changed to have a white background instead of a red background (i.e. no visual change from before):

image

Closes #12679 (closed)

Edited by Nathan Friend

Merge request reports