Support showing attachment diff info and thumbnails in reviews.
Review Request #7121 — Created March 25, 2015 and submitted
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 theReviewUI
to
have to grab it itself from the comment. To fix this, we now have a
review_ui
property onFileAttachmentComment
that builds its ownReviewUI
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.
- Change Summary:
-
Removed an unused import.
- Commit:
-
6452f1151e1071d99dbbd33de88bdedc37fcdad503227e48fe71796a5ce96e0e7833cff8dfaf761a
-
Tool: Pyflakes Processed Files: reviewboard/reviews/views.py reviewboard/reviews/models/file_attachment_comment.py Ignored Files: reviewboard/static/rb/js/views/reviewDialogView.js reviewboard/templates/reviews/boxes/review.html Tool: PEP8 Style Checker Processed Files: reviewboard/reviews/views.py reviewboard/reviews/models/file_attachment_comment.py Ignored Files: reviewboard/static/rb/js/views/reviewDialogView.js reviewboard/templates/reviews/boxes/review.html
- Change Summary:
-
Updated a check to make sure the ReviewUI supports diffing.
- Commit:
-
03227e48fe71796a5ce96e0e7833cff8dfaf761a98195f81bd153616fd3c61cccca78d9dd5c443df
-
Tool: Pyflakes Processed Files: reviewboard/reviews/views.py reviewboard/reviews/models/file_attachment_comment.py Ignored Files: reviewboard/static/rb/js/views/reviewDialogView.js reviewboard/templates/reviews/boxes/review.html Tool: PEP8 Style Checker Processed Files: reviewboard/reviews/views.py reviewboard/reviews/models/file_attachment_comment.py Ignored Files: reviewboard/static/rb/js/views/reviewDialogView.js reviewboard/templates/reviews/boxes/review.html