1. Bitbucket Website
  2. Public Issue Tracker
  3. master

Issues

Issue #5547 open

Multi-Line comments (BB-6759)

Adam Stortz
created an issue

Would like to be able to select multiple lines when commenting on code

Comments (19)

  1. Dylan Etkin

    Hi Adam,

    When we wrote the feature we debated if we should support multi-line selections. Crucible does but we felt that it confuses the UI and did not have a compelling enough usecase.

    Cheers,

    Dylan

  2. Zachary Davis [Atlassian] staff

    Currently there is no way to reference multiple lines, other than the line numbers (which I understand is crude, but can be effective). As Dylan mentions, this isn't an oversight so much as a conscious decision, one that we knew had both pros and cons.

  3. Ismail S

    While reviewing, I've an objection about 3 lines of code. Hence I would like to point to those all the 3 lines instead of one line for my comment. Hope that gives you a reason to re-consider?

    Yeah, it isn't stopping the rotation of earth if I can't point to all the 3 lines. But yes, as a Github user I've seen we can do that and it was useful and I hope there are others who feel so.

  4. Dan Bennett staff

    I would agree. It seems as though won't fix is a bit short-sighted, to be honest. I'm going to re-open it. We may won't fix it again but perhaps we'll have a better argument the second time around.

  5. Guillaume Simard

    Thanks Dan!

    Here are some reasons why I would like to use multi-line comments:

    • You want to comment on pieces of code that make little sense on a single line
      • e.g. a multi-line if condition that could be reworked
    • You want to place a single comment on a large piece of code
      • e.g. Instead of having to type "The code in the functions abc() and xyz() do not follow our coding standards" you can simply comment over the two methods saying "Does not follow coding standards".
    • It helps with precision. Instead of having to describe what your comment applies to, you can directly point to it, using the exact right scope. (Better communication)

    Of course these aren't mind blowing benefits but they're very nice to have. I certainly miss them from Reviewboard :)

    Thanks!

  6. Paul van Klaveren

    I also run into this problem on a daily basis.

    In terms of usability, the fact that developers are actually using the line commenting feature as is — seeing the code review comment appear near the code it applies to — already shows that most developers actually prefer to be specific about the context of their comment.

    How many Bitbucket users refrain from using line comments, and instead place their review comments straight underneath the pull-request description? I wonder…

    This feature request is nothing more than an improvement of a feature that has already been proven to be very important to the review process.

  7. Demian Tinkiel

    I too would like to add my +1 on this feature request. Is a shame for bitbucket to lag behind gerrit and github in this regard. In fact if you guys could implement it so that the lines don't have to be contiguous you would have an advantage over the other 2 (I think, been a while since I used Gerrit)

  8. Richard Colley

    I would love this too. We use crucible at work, and this feature is invaluable.

    The argument I heard against it was that if you just want to select text so you can copy it, then the comment editor is invoked when you didn't want it. But couldn't comment line selection be done with a modifier key? i.e. shift-click/drag if you want to comment. Without shift, it's just normal selection behaviour.

  9. Log in to comment