• 
      

    Ensure we always show a retina version of file attachment thumbnails.

    Review Request #7284 — Created May 2, 2015 and submitted

    Information

    Review Board
    release-2.5.x
    9673b3f...

    Reviewers

    Loading of file attachment thumbnails can sometimes be racy with regards to
    retina.js. In particular, if we finish loading everything before the window's
    onload event fires, retina.js will happily process all the images and show
    the at2x versions. If not (and for file attachments created via drag-and-drop),
    it never processes them.

    This change updates the FileAttachmentThumbnailView to manually create a
    RetinaImage, and remove the data-at2x attribute (so that the onload
    handler won't process them).

    Uploaded new file attachments and saw the high-res version of the thumbnail.

    Description From Last Updated

    You can avoid the need for self above by doing: _.each(this._$thumbnailContainer.find('img'), function(el) { ... }, this);

    chipx86chipx86
    reviewbot
    1. Tool: Pyflakes
      Ignored Files:
          reviewboard/static/rb/js/views/fileAttachmentThumbnailView.js
      
      
      
      Tool: PEP8 Style Checker
      Ignored Files:
          reviewboard/static/rb/js/views/fileAttachmentThumbnailView.js
      
      
    2. 
        
    chipx86
    1. 
        
    2. Show all issues

      You can avoid the need for self above by doing:

      _.each(this._$thumbnailContainer.find('img'), function(el) {
          ...
      }, this);
      
    3. 
        
    david
    reviewbot
    1. Tool: PEP8 Style Checker
      Ignored Files:
          reviewboard/static/rb/js/views/fileAttachmentThumbnailView.js
      
      
      
      Tool: Pyflakes
      Ignored Files:
          reviewboard/static/rb/js/views/fileAttachmentThumbnailView.js
      
      
    2. 
        
    chipx86
    1. Ship It!
    2. 
        
    david
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to release-2.5.x (2465832)