"Cancel comment" dialog has confusing button titles
Summary
When adding a comment to a merge request, the text-entry can be cancelled. A dialog appears with confusing buttons:
- Message: "Are you sure you want to cancel creating this comment?"
- Buttons: "Cancel" and "OK"
Here, "Cancel" means "I want to continue writing this comment" and "OK" means "I want to discard my comment".
In other words:
- "Cancel" -> "Don't cancel"
- "OK" -> "Cancel"
Steps to reproduce
- Open an MR
- Start adding a comment
- Press [Escape] to open the "Are you sure you want to cancel" dialog
What is the current bug behavior?
The buttons are confusing, because the word "Cancel" is used in both the dialog message and a button, but the meanings are different.
(In the message, "Cancel" refers to the comment. But the "Cancel" button refers to the "Discard comment" action)
What is the expected correct behavior?
- The dialog should not cause confusion, or lead to accidental data-loss
- The button labels should be explicit; the user should easily understand what each button does
Results of GitLab environment info
GitLab Enterprise Edition 13.5.3-ee
Possible fixes
This confusion could be avoided by having more explicit actions in the buttons:
- change "Cancel" to "Continue editing"
- change "OK" to "Discard comment"