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 |
-
-
reviewboard/static/rb/js/views/imageReviewableView.es6.js (Diff revision 1) Can we rename this to
percentage
? -
reviewboard/static/rb/js/views/imageReviewableView.es6.js (Diff revision 1) This should maybe indicate the range is inclusive.
-
reviewboard/static/rb/js/views/imageReviewableView.es6.js (Diff revision 1) Should indicate range is inclusive.
-
reviewboard/static/rb/js/views/imageReviewableView.es6.js (Diff revision 1) Can we rename this to
setSplitPercentage(percentage)
? -
reviewboard/static/rb/js/views/imageReviewableView.es6.js (Diff revision 1) I would find
../${revisionTip}/
more readable here. -
reviewboard/static/rb/js/views/imageReviewableView.es6.js (Diff revision 1) Likewise with
../${revisionBase}-${revisionTip}/
-
-
reviewboard/static/rb/js/views/regionCommentBlockView.es6.js (Diff revision 1) This can be a single line.
-
-
-
reviewboard/static/rb/js/views/regionCommentBlockView.es6.js (Diff revision 1) Can we reword this as:
If not, the event was actually a ``click`` event and we call the superclass' click handler.
-
reviewboard/static/rb/js/views/regionCommentBlockView.es6.js (Diff revision 1) ``true`` over "yes"
``click``
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 2 (+619 -615) |
-
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
-
-
reviewboard/static/rb/js/views/regionCommentBlockView.es6.js (Diff revisions 1 - 2) The
{
and}
are unnecessary. -
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 3 (+619 -615) |
-
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