Always submit notes and comments via key shortcut when shift is pressed
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
In shortcuts modal:
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
- Open an MR
- Add a comment
- Reply to the comment, submit using Shift ⌘ Enter — comment should be posted.
- Reply to the comment, submit using ⌘ Enter (no shift) - comment is in pending list.
- Repeat 3-4 for a new comment (not reply)