Convert some more code in js/views/ to ES6.
Review Request #8779 — Created Feb. 24, 2017 and submitted
Everything in here is a straightforward syntax clean-up, with no functional
changes.
Ran js-tests.
Description | From | Last Updated |
---|---|---|
No closing </li>? |
brennie | |
These are all defined on each loop, but never change. Let's pull them out, so we're not looking up localized … |
chipx86 | |
Let's update this to use .listenTo. |
chipx86 | |
Should we just rip this out? Or is this included for _super() prototype reasons, where otherwise we would run into … |
brennie | |
Can we use .listenTo here? |
chipx86 | |
.listenTo |
chipx86 | |
Single quotes. |
brennie | |
This could probably be one statement now. |
chipx86 | |
This still hoists to top of scope. We can do const showCommentDlg = function showCommentDlg() { ... } to avoid … |
brennie | |
.listenTo |
chipx86 | |
.listenTo |
chipx86 | |
We only ever need to compute this once, so we could put it as a constant on the class or … |
brennie | |
We only ever need to compute this once, so we could put it as a constant on the class or … |
brennie | |
We only ever need to compute this once, so we could put it as a constant on the class or … |
brennie | |
We only ever need to compute this once, so we could put it as a constant on the class or … |
brennie | |
Col: 10 Missing semicolon. |
reviewbot | |
This doesn't align with the if above. |
brennie |
-
-
-
reviewboard/static/rb/js/views/commentDialogView.es6.js (Diff revision 1) Should we just rip this out?
Or is this included for
_super()
prototype reasons, where otherwise we would run into infinite loops? -
-
reviewboard/static/rb/js/views/commentDialogView.es6.js (Diff revision 1) This still hoists to top of scope. We can do
const showCommentDlg = function showCommentDlg() { ... }
to avoid hoisting and to keep the function name in stack traces, which is valuable.
-
-
reviewboard/static/rb/js/views/commentDialogView.es6.js (Diff revision 1) These are all defined on each loop, but never change. Let's pull them out, so we're not looking up localized strings more than we need to (the slowest part of this).
-
reviewboard/static/rb/js/views/commentDialogView.es6.js (Diff revision 1) Let's update this to use
.listenTo
. -
reviewboard/static/rb/js/views/commentDialogView.es6.js (Diff revision 1) Can we use
.listenTo
here? -
-
reviewboard/static/rb/js/views/commentDialogView.es6.js (Diff revision 1) This could probably be one statement now.
-
-
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 2 (+536 -430) |
Checks run (1 failed, 1 succeeded, 1 failed with error)
JSHint
-
reviewboard/static/rb/js/views/commentDialogView.es6.js (Diff revision 2) Col: 10 Missing semicolon.
-
-
reviewboard/static/rb/js/views/commentDialogView.es6.js (Diff revision 2) We only ever need to compute this once, so we could put it as a constant on the class or as a toplevel constant.
-
reviewboard/static/rb/js/views/commentDialogView.es6.js (Diff revision 2) We only ever need to compute this once, so we could put it as a constant on the class or as a toplevel constant.
-
reviewboard/static/rb/js/views/commentDialogView.es6.js (Diff revision 2) We only ever need to compute this once, so we could put it as a constant on the class or as a toplevel constant.
-
reviewboard/static/rb/js/views/commentDialogView.es6.js (Diff revision 2) We only ever need to compute this once, so we could put it as a constant on the class or as a toplevel constant.
-
reviewboard/static/rb/js/views/commentIssueBarView.es6.js (Diff revision 2) This doesn't align with the if above.
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 3 (+566 -446) |