Commit 3ae9b79a authored by Amy Qualls's avatar Amy Qualls

Merge branch '299246-docs-aqualls-click-drag' into 'master'

Explain methods for multi-line commenting

See merge request gitlab-org/gitlab!54861
parents b71d049c 9281dbd6
...@@ -187,27 +187,31 @@ Feature.disable(:local_file_reviews) ...@@ -187,27 +187,31 @@ Feature.disable(:local_file_reviews)
> [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/-/issues/13950) in GitLab 11.5. > [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/-/issues/13950) in GitLab 11.5.
In a merge request, you can leave comments in any part of the file being changed. In a merge request, you can leave comments in any part of the file being changed.
In the Merge Request Diff UI, click the **{comment}** **comment** icon in the gutter In the Merge Request Diff UI, you can:
to expand the diff lines and leave a comment, just as you would for a changed line.
![Comment on any diff file line](img/comment-on-any-diff-line.png) - **Comment on a single line**: Click the **{comment}** **comment** icon in the
gutter to expand the diff lines and display a comment box.
- [**Comment on multiple lines**](#commenting-on-multiple-lines).
### Commenting on multiple lines ### Commenting on multiple lines
> - [Introduced](https://gitlab.com/gitlab-org/ux-research/-/issues/870) in GitLab 13.2. > - [Introduced](https://gitlab.com/gitlab-org/ux-research/-/issues/870) in GitLab 13.2.
> - [Added](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/49875) click-and-drag features in GitLab 13.8.
> - [Feature flag removed](https://gitlab.com/gitlab-org/gitlab/-/issues/299121) in GitLab 13.9. > - [Feature flag removed](https://gitlab.com/gitlab-org/gitlab/-/issues/299121) in GitLab 13.9.
GitLab provides a way to select which lines of code a comment refers to. After starting a comment When commenting on a diff, you can select which lines of code your comment refers
a dropdown selector is shown to select the first line that this comment refers to. to by either:
The last line is the line that the comment icon was initially clicked on.
New comments default to single line comments by having the first and last lines ![Comment on any diff file line](img/comment-on-any-diff-line_v13_10.png)
the same. Selecting a different starting line turns this into a multiline comment.
![Multiline comment selection highlighted](img/multiline-comment-highlighted.png) - Clicking and dragging the **{comment}** **comment** icon in the gutter to highlight
lines in the diff. GitLab expands the diff lines and displays a comment box.
- After starting a comment by clicking the **{comment}** **comment** icon in the
gutter, select the first line number your comment refers to in the **Commenting on lines**
select box. New comments default to single-line comments, unless you select
a different starting line.
Once a multiline comment is saved the lines of code pertaining to that comment are listed directly Multiline comments display the comment's line numbers above the body of the comment:
above it.
![Multiline comment selection displayed above comment](img/multiline-comment-saved.png) ![Multiline comment selection displayed above comment](img/multiline-comment-saved.png)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment