Update DiffCommentBlock to be an AbstractCommentBlock in DiffReviewable.

Review Request #4267 — Created June 26, 2013 and submitted — Latest diff uploaded

Information

Review Board
master

Reviewers

Update DiffCommentBlock to be an AbstractCommentBlock in DiffReviewable.

DiffCommentBlock is now based on the AbstractCommentBlock{View}, which
allows us to eliminate the majority of the code and take advantage of
all the niceties that the Reviewable infrastructure gives us.

Some of the AbstractCommentBlockView code had to be made more flexible
with regard to positioning of tooltips and update bubbles, but otherwise
it's basically unmodified.

This also ends up fixing a long-standing bug where a comment in an
expanded region would not show up again if the chunk is collapsed and
then re-expanded.

Most of the code from diffviewer.js is now gone with this change.
Tested this pretty thoroughly with some diffs. Loaded in old comments
(published and drafts). Created new ones. Tried different ranges.

Tested making a comment in a collapsed area, then collapsed and re-expanded.
Saw the comment.

Repeated that test with a comment from a page load.

Unit tests pass.
    Loading...