Support showing attachment diff info and thumbnails in reviews.

Review Request #7121 — Created March 25, 2015 and submitted — Latest diff uploaded

Information

Review Board
release-2.5.x
98195f8...

Reviewers

When reviewing a diff of a file attachment, we store some data on the
attachment being diffed against. However, we weren't using this data
when showing thumbnails of comments in the review dialog or in reviews.

Before, a ReviewUI would be created that pointed to the attachment being
commented on, but without the diff information, leaving the ReviewUI to
have to grab it itself from the comment. To fix this, we now have a
review_ui property on FileAttachmentComment that builds its own ReviewUI
with the diff information.

Now, both the review dialog and reviews show the revision ranges for the
attachments, and both set things up to use an appropriate thumbnail. The
reviews page also reduces queries for diffed file attachments by
re-associating attachments, like we do elsewhere.

Tested with older file attachments, with newer attachments (single revision),
and with diffs of file attachments.

Note that in the screenshots, there are differences between the presentation and
style of both thumbnails. This needs to be dealt with still, but is a separate
issue.


    Loading...