Skip to content

Always submit notes and comments via key shortcut when shift is pressed

Nick Leonard requested to merge shift-cmd-enter-save-nl into master

What does this MR do and why?

On MRs using cmd/ctrl-enter adds notes or comments to draft, when active. Users can manually click "Add comment now". This MR adds a modified shortcut, Shift Enter, which acts the save as clicking "Add comment now", rather than adding a pending comment.

Using ⌘Enter remains the same, except it now uses strict rules so only those keys can be pressed together, to minimize overlap between shortcuts.

Adds references to docs.

Adds both MR specific shortcuts and a general "save changes" shortcut to the shortcuts modal (Help > Shortcuts).

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

key

In shortcuts modal:

image.png

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Open an MR
  2. Add a comment
  3. Reply to the comment, submit using Shift Enter — comment should be posted.
  4. Reply to the comment, submit using Enter (no shift) - comment is in pending list.
  5. Repeat 3-4 for a new comment (not reply)
Edited by Nick Leonard

Merge request reports