Skip to content

Reviews: batch comments on merge requests

Problem

As a reviewer every time I press the 'Add comment' button in a merge request every subscriber gets and email which might annoy them.

I want prevent notification overload by grouping comments, stage comments and submit them (email people) in the end.

Possible solutions:

  1. Have 'Draft comment' and 'Submit comment' buttons
  2. Have checkbox or review mode 'bundle comments'
  3. Something else

Phabricator solved this already.

Thanks to Eric Vander Weele

Scope

  • The scope of this issue is the batch commenting functionality.
  • Changes to emails are not in scope.
  • For other improvements see &23 (closed)

Design

We're going to call the batch commenting feature: “review”. A review is a group of comments that are published together. You can start a review, add a comment to a review, discard a review, and finish/submit a review.

The review feature is only available in merge requests, when creating a discussion from a code line, or replying to a discussion (from a code line or from the “Discussion” tab) — it is not available when adding a comment/discussion in the “Discussion” tab.

One of the main changes is replacing the “Comment” and “Comment and resolve discussion” buttons with: a new “Start a review” button; a “Add comment now” button (same function as the current “Comment” button); and a “Resolve discussion” checkbox.

Here's the flow with notes:

1) Disabled 2) Enabled 3) Pending comment 4) Adding more comments Discard review
At first, both submit buttons are disabled as there is no content. The “Cancel” button function is unchanged. The “Resolve discussion” checkbox is unselected by default and its label changes to “Unresolve discussion” if applicable.
When inserting content, buttons become enabled. The CMD + ENTER keyboard shortcut activates “Add comment now”.
After pressing “Start a review” or “Add to review” (visible in step 4), the comment is now in “Pending” state and indicates what will happen to the discussion (e.g. “Discussion stays resolved”). Users can edit the pending comment or delete it. A fixed panel slides in from the bottom of the screen, allowing users to “Submit review” or “Discard review” — this panel stays visible until the user submits or deletes/discards every pending comment. Users can still add single comments right away (“Add comment now”).
For the following comments, the “Start a review” button changes to “Add to review”. Users can always “Add comment now” for submitting single comments, even after starting a review.
If there are pending comments: an alert reminds users that they will lose their comments.
image image image image image

🔍 Design specs with the most up-to-date solution and implementation notes

This page may contain information related to upcoming products, features and functionality. It is important to note that the information presented is for informational purposes only, so please do not rely on the information for purchasing or planning purposes. Just like with all projects, the items mentioned on the page are subject to change or delay, and the development, release, and timing of any products, features, or functionality remain at the sole discretion of GitLab Inc.

Edited by 🤖 GitLab Bot 🤖