• 
      

    Support showing attachment diff info and thumbnails in reviews.

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

    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.


    Description From Last Updated

    'render' imported but unused

    reviewbotreviewbot

    Can we double-check review_ui.supports_diffing?

    daviddavid
    reviewbot
    1. 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
      
      
    2. reviewboard/reviews/views.py (Diff revision 1)
       
       
      Show all issues
       'render' imported but unused
      
    3. 
        
    chipx86
    reviewbot
    1. 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
      
      
    2. 
        
    david
    1. 
        
    2. Show all issues

      Can we double-check review_ui.supports_diffing?

    3. 
        
    chipx86
    reviewbot
    1. 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
      
      
    2. 
        
    david
    1. Ship It!
    2. 
        
    chipx86
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to release-2.5.x (9c97765)