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?:
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?
/* */ (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.
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.
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.
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.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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With