-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reviewing PRs: Ctrl+Enter submits comment instead of starting a review #23241
Comments
This behavior comes from Why the Ctrl+Enter doesn't trigger the default primary button: because in the review form, users might not want to approve the PR, they might just want to leave a comment. I agree to improve the UX, while some details could be fine-tuned and considered together. A quick fix could be: change some forms' default actions, some forms use "start review" while some forms use "comment" |
Quickly go through the code again, making the "Start Review" button as the default action seems not an easy task (not just minutes, but maybe hours?), maybe that's the reason why I didn't touch them last time when I added the Ctrl+Enter support .... I can still see my comment for Update: I tried to proposed a fix (more complicated than I thought ...), did some quick tests, it seems working as expected. |
Please test this fix: Make Ctrl+Enter submit a pending comment (starting review) instead of submitting a single comment #23245 |
… submitting a single comment (#23245) Close #23241 Before: press Ctrl+Enter in the Code Review Form, a single comment will be added. After: press Ctrl+Enter in the Code Review Form, start the review with pending comments. The old name `is_review` is not clear, so the new code use `pending_review` as the new name. Co-authored-by: delvh <[email protected]> Co-authored-by: techknowlogick <[email protected]>
Description
When writing an inline comment on a pull request, the "Start review" button is highlighted as the primary button for the text area:
However, when pressing Ctrl+Enter on the keyboard, it is interpreted as pressing the "Add single comment" button.
The biggest issue here is that the "Add single comment" button immediately submits the comment. There is no way to undo this, whereas accidentally starting a review does not immediately send something to the PR author, and thus the review can be cancelled at a later time without bothering anyone, in case it was started by accident.
Gitea Version
1.19.0+dev-649-g2093ca517
Can you reproduce the bug on the Gitea demo site?
Yes
Log Gist
No response
Screenshots
No response
Git Version
No response
Operating System
No response
How are you running Gitea?
Self-built from Git
Database
None
The text was updated successfully, but these errors were encountered: