From aa6ecae0fbabc0fb2c12553642b752cdd3c7a584 Mon Sep 17 00:00:00 2001 From: Thomas Randolph Date: Wed, 4 Dec 2024 00:04:48 -0700 Subject: [PATCH 01/10] Add 'Start review' button to MR Overview Changelog: added --- .../notes/components/comment_form.vue | 17 +++++++++++++++++ app/assets/javascripts/notes/i18n.js | 1 + locale/gitlab.pot | 3 +++ 3 files changed, 21 insertions(+) diff --git a/app/assets/javascripts/notes/components/comment_form.vue b/app/assets/javascripts/notes/components/comment_form.vue index 33d6a60ba84c8a..acd5b57083d3ae 100644 --- a/app/assets/javascripts/notes/components/comment_form.vue +++ b/app/assets/javascripts/notes/components/comment_form.vue @@ -172,6 +172,11 @@ export default { isEpic() { return constants.NOTEABLE_TYPE_MAPPING[this.noteableType] === constants.EPIC_NOTEABLE_TYPE; }, + isMergeRequest() { + return ( + constants.NOTEABLE_TYPE_MAPPING[this.noteableType] === constants.MERGE_REQUEST_NOTEABLE_TYPE + ); + }, trackingLabel() { return slugifyWithUnderscore(`${this.commentButtonTitle} button`); }, @@ -439,6 +444,18 @@ export default { :discussions-require-resolution="discussionsRequireResolution" @click="handleSave" /> + Date: Wed, 4 Dec 2024 00:06:36 -0700 Subject: [PATCH 02/10] Make all draft comments be resolvable/threads --- app/assets/javascripts/notes/components/comment_form.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/notes/components/comment_form.vue b/app/assets/javascripts/notes/components/comment_form.vue index acd5b57083d3ae..645ef450dd562d 100644 --- a/app/assets/javascripts/notes/components/comment_form.vue +++ b/app/assets/javascripts/notes/components/comment_form.vue @@ -242,7 +242,7 @@ export default { isDraft, }; - if (this.noteType === constants.DISCUSSION) { + if (this.noteType === constants.DISCUSSION || isDraft) { noteData.data.note.type = constants.DISCUSSION_NOTE; } -- GitLab From b183a4ed7ae9f251834810be4e4b77a4598c490e Mon Sep 17 00:00:00 2001 From: Thomas Randolph Date: Wed, 4 Dec 2024 00:07:15 -0700 Subject: [PATCH 03/10] Simplify comment options when a review is in progress --- .../notes/components/comment_form.vue | 24 +++++++------------ app/assets/javascripts/notes/i18n.js | 1 + 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/app/assets/javascripts/notes/components/comment_form.vue b/app/assets/javascripts/notes/components/comment_form.vue index 645ef450dd562d..68206f0bc0b00c 100644 --- a/app/assets/javascripts/notes/components/comment_form.vue +++ b/app/assets/javascripts/notes/components/comment_form.vue @@ -191,11 +191,6 @@ export default { return null; }, - commentNowButtonTitle() { - return this.noteType === constants.COMMENT - ? this.$options.i18n.addCommentNow - : this.$options.i18n.addThreadNow; - }, }, watch: { noteIsInternal(val) { @@ -412,24 +407,23 @@ export default { />