Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
9281dbd6
Commit
9281dbd6
authored
Feb 24, 2021
by
Amy Qualls
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Explain methods for multi-line commenting
Multi-line commenting gained a new method recently.
parent
48d4c300
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
11 deletions
+15
-11
doc/user/project/merge_requests/img/comment-on-any-diff-line.png
...r/project/merge_requests/img/comment-on-any-diff-line.png
+0
-0
doc/user/project/merge_requests/img/comment-on-any-diff-line_v13_10.png
...ct/merge_requests/img/comment-on-any-diff-line_v13_10.png
+0
-0
doc/user/project/merge_requests/reviewing_and_managing_merge_requests.md
...t/merge_requests/reviewing_and_managing_merge_requests.md
+15
-11
No files found.
doc/user/project/merge_requests/img/comment-on-any-diff-line.png
deleted
100644 → 0
View file @
48d4c300
32.4 KB
doc/user/project/merge_requests/img/comment-on-any-diff-line_v13_10.png
0 → 100644
View file @
9281dbd6
20.8 KB
doc/user/project/merge_requests/reviewing_and_managing_merge_requests.md
View file @
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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment