Convert ImageReviewableView and RegionCommentBlockView to ES6.
Review Request #8214 — Created June 3, 2016 and submitted
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 | |
This should maybe indicate the range is inclusive. |
brennie | |
Should indicate range is inclusive. |
brennie | |
Can we rename this to setSplitPercentage(percentage) ? |
brennie | |
I would find ../${revisionTip}/ more readable here. |
brennie | |
Likewise with ../${revisionBase}-${revisionTip}/ |
brennie | |
Blank line |
brennie | |
This can be a single line. |
brennie | |
The { and } are unnecessary. |
brennie | |
Grammar? |
brennie | |
No comma. |
brennie | |
Can we reword this as: If not, the event was actually a ``click`` event and we call the superclass' click … |
brennie | |
``true`` over "yes" ``click`` |
brennie | |
``e.target`` |
brennie |
-
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
-
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