• 
      

    Convert ImageReviewableView and RegionCommentBlockView to ES6.

    Review Request #8214 — Created June 3, 2016 and submitted

    Information

    Review Board
    release-3.0.x
    870eca9...

    Reviewers

    This change does the basic conversion (let/const, member function sugar, fix up
    and add documentation comments), but also consolidates the code a bit to remove
    extra helper functions that were only called from one place and didn't help
    structure the code any better.

    This is in preparation for the high-DPI image review feature.

    • Ran unit tests.
    • Used in conjunction with other changes.
    Description From Last Updated

    Can we rename this to percentage?

    brennie brennie

    This should maybe indicate the range is inclusive.

    brennie brennie

    Should indicate range is inclusive.

    brennie brennie

    Can we rename this to setSplitPercentage(percentage) ?

    brennie brennie

    I would find ../${revisionTip}/ more readable here.

    brennie brennie

    Likewise with ../${revisionBase}-${revisionTip}/

    brennie brennie

    Blank line

    brennie brennie

    This can be a single line.

    brennie brennie

    The { and } are unnecessary.

    brennie brennie

    Grammar?

    brennie brennie

    No comma.

    brennie brennie

    Can we reword this as: If not, the event was actually a ``click`` event and we call the superclass' click …

    brennie brennie

    ``true`` over "yes" ``click``

    brennie brennie

    ``e.target``

    brennie brennie
    reviewbot
    1. Tool: PEP8 Style Checker
      Processed Files:
          reviewboard/staticbundles.py
      
      Ignored Files:
          reviewboard/static/rb/js/views/regionCommentBlockView.js
          reviewboard/static/rb/js/views/imageReviewableView.es6.js
          reviewboard/static/rb/js/views/regionCommentBlockView.es6.js
      
      
      
      Tool: Pyflakes
      Processed Files:
          reviewboard/staticbundles.py
      
      Ignored Files:
          reviewboard/static/rb/js/views/regionCommentBlockView.js
          reviewboard/static/rb/js/views/imageReviewableView.es6.js
          reviewboard/static/rb/js/views/regionCommentBlockView.es6.js
      
      
    2. 
        
    brennie
    1. 
        
    2. Show all issues

      Can we rename this to percentage?

    3. Show all issues

      This should maybe indicate the range is inclusive.

    4. Show all issues

      Should indicate range is inclusive.

    5. Show all issues

      Can we rename this to setSplitPercentage(percentage) ?

    6. Show all issues

      I would find ../${revisionTip}/ more readable here.

    7. Show all issues

      Likewise with ../${revisionBase}-${revisionTip}/

    8. Show all issues

      Blank line

    9. Show all issues

      This can be a single line.

    10. Show all issues

      Grammar?

    11. Show all issues

      No comma.

    12. Show all issues

      Can we reword this as:

      If not, the event was actually a ``click`` event and we call the superclass' click handler.
      
    13. Show all issues

      ``true`` over "yes"

      ``click``
      
    14. 
        
    david
    reviewbot
    1. Tool: Pyflakes
      Processed Files:
          reviewboard/staticbundles.py
      
      Ignored Files:
          reviewboard/static/rb/js/views/regionCommentBlockView.js
          reviewboard/static/rb/js/views/imageReviewableView.es6.js
          reviewboard/static/rb/js/views/regionCommentBlockView.es6.js
      
      
      
      Tool: PEP8 Style Checker
      Processed Files:
          reviewboard/staticbundles.py
      
      Ignored Files:
          reviewboard/static/rb/js/views/regionCommentBlockView.js
          reviewboard/static/rb/js/views/imageReviewableView.es6.js
          reviewboard/static/rb/js/views/regionCommentBlockView.es6.js
      
      
    2. 
        
    brennie
    1. 
        
    2. Show all issues

      The { and } are unnecessary.

      1. They are, but when doing assigns inside of a fat arrow function I think it makes it more readable (and I believe Christian feels the same way).

    3. Show all issues

      ``e.target``
      
    4. 
        
    david
    reviewbot
    1. Tool: PEP8 Style Checker
      Processed Files:
          reviewboard/staticbundles.py
      
      Ignored Files:
          reviewboard/static/rb/js/views/regionCommentBlockView.js
          reviewboard/static/rb/js/views/imageReviewableView.es6.js
          reviewboard/static/rb/js/views/regionCommentBlockView.es6.js
      
      
      
      Tool: Pyflakes
      Processed Files:
          reviewboard/staticbundles.py
      
      Ignored Files:
          reviewboard/static/rb/js/views/regionCommentBlockView.js
          reviewboard/static/rb/js/views/imageReviewableView.es6.js
          reviewboard/static/rb/js/views/regionCommentBlockView.es6.js
      
      
    2. 
        
    david
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to release-3.0.x (103579e)