Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

comment multiple lines in gitlab without blue icon?

Tags:

github

I want to comment multiple lines in a commit. I googled for that and found multiple instructions that all mention that one have to click the blue plus icon like here or at How to select/comment on a range of lines in github pull request?:

enter image description here

However, when I hove over this section with my mouse, no blue icon appears. I tried it in Chrome and Firefox (using Ubuntu 20.20).

Any chance that I can select multiple lines without the icon? Or what can I do to enable the icon?

like image 658
Adam Avatar asked Nov 27 '20 10:11

Adam


People also ask

Is there a symbol for multiple line comments?

/* */ (multiline comment) Multiline comments are used for large text descriptions of code or to comment out chunks of code while debugging applications. Comments are ignored by the compiler.

How do I comment out a line in Gitlab?

By the line you want to comment on, hover over the line number and select Comment ( ). You can select multiple lines by dragging the Comment ( ) icon. Enter your comment and select Start a review or Add comment now.

How do I comment a block of code in Gitlab?

Click and drag multiline merge request comments For instance, a portion of a logic block, a paragraph of prose, or an entire function. This forces users to choose a single line to provide feedback, but the feedback refers to other portions of the file.


1 Answers

That actually seems supported on GitLab only now (Jan. 2021):

Users can now click at the beginning of a line and drag the comment marker across multiple lines to highlight and reference multiple lines when leaving feedback in an MR.

See GitLab 13.8 (January 2021)

Click and drag multiline merge request comments

Commenting on a single line is great for simple kinds of code review feedback, but often a comment addresses multiple lines in the diff.
For instance, a portion of a logic block, a paragraph of prose, or an entire function. This forces users to choose a single line to provide feedback, but the feedback refers to other portions of the file.

mr multiline comment

Previously, users could select multiple lines after posting a comment by adjusting line numbers up and down from the original comment point. Now, users can click at the beginning of a line and drag the comment marker across multiple lines to highlight and reference multiple lines when leaving feedback in a merge request.

See Documentation and Issue.

like image 148
VonC Avatar answered Sep 21 '22 07:09

VonC