• 
      

    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?

    brenniebrennie

    This should maybe indicate the range is inclusive.

    brenniebrennie

    Should indicate range is inclusive.

    brenniebrennie

    Can we rename this to setSplitPercentage(percentage) ?

    brenniebrennie

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

    brenniebrennie

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

    brenniebrennie

    Blank line

    brenniebrennie

    This can be a single line.

    brenniebrennie

    The { and } are unnecessary.

    brenniebrennie

    Grammar?

    brenniebrennie

    No comma.

    brenniebrennie

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

    brenniebrennie

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

    brenniebrennie

    ``e.target``

    brenniebrennie
    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)