• 
      

    Auto scale large images according to size

    Review Request #8392 — Created Sept. 8, 2016 and submitted

    Information

    Review Board
    release-3.0.x

    Reviewers

    Previously, we scaled images that contained @2x or @3x in their
    filenames. For images that do not contain those hints, we now scale them
    to the highest scaling factor less than or equal to 1 that allows the
    most of the image to be shown.

    Tested with a very large image and saw that it was scaled correctly in
    image diff and single image mode.

    Description From Last Updated

    "Subclasses"

    chipx86chipx86

    I know this was already here, but .includes isn't available in all browsers, and Babel doesn't do anything for it. …

    chipx86chipx86

    Array.from isn't available in all browsers.

    chipx86chipx86

    Can you put the comparison in parens? It'll help with making it clearer, given the => syntax. (Otherwise it almost …

    chipx86chipx86

    These could be moved inline into the return statement with no loss of clarity.

    daviddavid

    Same here.

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

      "Subclasses"

    3. Show all issues

      I know this was already here, but .includes isn't available in all browsers, and Babel doesn't do anything for it. We should use .indexOf instead.

      1. We do use the babel polyfill, which adds this.

      2. Ah, my apologies. I was running the wrong version of RB when checking that.

    4. Show all issues

      Array.from isn't available in all browsers.

    5. Show all issues

      Can you put the comparison in parens? It'll help with making it clearer, given the => syntax. (Otherwise it almost looks like Python's ability to do things like 3 >= 2 <= 5.)

    6. 
        
    brennie
    reviewbot
    1. Tool: Pyflakes
      Ignored Files:
          reviewboard/static/rb/js/views/imageReviewableView.es6.js
      
      
      
      Tool: PEP8 Style Checker
      Ignored Files:
          reviewboard/static/rb/js/views/imageReviewableView.es6.js
      
      
    2. 
        
    chipx86
    1. Ship It!
    2. 
        
    brennie
    reviewbot
    1. Tool: PEP8 Style Checker
      Ignored Files:
          reviewboard/static/rb/js/views/imageReviewableView.es6.js
      
      
      
      Tool: Pyflakes
      Ignored Files:
          reviewboard/static/rb/js/views/imageReviewableView.es6.js
      
      
    2. 
        
    david
    1. 
        
    2. Show all issues

      These could be moved inline into the return statement with no loss of clarity.

    3. Show all issues

      Same here.

    4. 
        
    brennie
    reviewbot
    1. Tool: PEP8 Style Checker
      Ignored Files:
          reviewboard/static/rb/js/views/imageReviewableView.es6.js
      
      
      
      Tool: Pyflakes
      Ignored Files:
          reviewboard/static/rb/js/views/imageReviewableView.es6.js
      
      
    2. 
        
    brennie
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to release-3.0.x (7ec56fb)