Add support for showing diffs of file attachments in the diff viewer.

Review Request #4481 — Created Aug. 23, 2013 and submitted — Latest diff uploaded

Information

Review Board
master

Reviewers

Add support for showing diffs of file attachments in the diff viewer.

Review UIs can now opt in to providing diffing functionality for file
attachments. A ReviewUI subclass that has supports_diffing=True will
have the whole width of the diff table to render in. It will be given
both the new file's fileAttachmentID, and the original's (as
diffAgainstFileAttachmentID).

FileAttachmentComment can now specify a FileAttachment that's being
diffed against. The ID for this can be set when creating a new comment
in the webapi.

FileAttachmentReviewUI will properly filter the comments when passing
down to the JavaScript to ensure only the comments matching that diff
range (or, if not using a diff, comments that are on a single
FileAttachment) are passed down.

It's up to the review UI to decide how to render the diff.
Tested with the image diff review UI change in /r/4493/.
    Loading...