Make draft comments in diffviewer and text based attachments resizable and movable

Review Request #7032 — Created March 9, 2015 and updated — Latest diff uploaded

Information

Review Board
master
2f1b795...

Reviewers

Currently if a draft comment is made with the wrong range of lines, there is no way to correct it other than to delete it and make a new one. This fix aims to make the comment bubbles movable and resizable to update the line range.

Manual testing by dragging comment blocks.

Dragging:
Checked that the comment block can only be dragged if it is a new draft comment and not one made to an existing comment thread.

Resizing:
Checked that begin row cannot be resized to rows after end row.
Checked that end row cannot be resized to rows before begin row.
Checked that begin/end row is resized to a valid row (not headers).
Checked that dragging can be done across compressed diff headers.
Checked that dragging cannot be done across different files.

Moving:
Checked that line range stays the same when moving.
Checked that comment block can only be moved within visible lines.
Checked that line range cannot contain invalid rows.
Checked that dragging cannot be done across different files.

Triggering of comment dialog:
Checked that the comment dialog is triggered on click of the comment block.
Checked that the comment dialog is triggered on click of a row number in the diffviewer.