Review Composer: Sidebar
Review Request #10225 — Created Oct. 11, 2018 and updated
Information | |
---|---|
bolariinwa | |
Review Board | |
master | |
3de8456... | |
Reviewers | |
reviewboard, students | |
The Review composer is the redesign of the review dialog to improve user
experience. The Review composer: sidebar serves as the sidebar for the
review composer.The sidebar contains a button to create new general comments to replace the
add general comments button in the review dialog. A rendered list of comments
which will serve as a table of contents of reviews left in the review and a
tips and documentation section.
Added new JS unit tests to test functionality added. All JS tests pass.
Description | From | Last Updated |
---|---|---|
Since we're doing _super.remove below we don't need this. |
|
|
Doing render() here will break things. |
|
|
This should be this.$el.append($generalCommentButton). |
|
|
Col: 15 'commentList' is defined but never used. |
![]() |
|
Col: 15 'tipsSection' is defined but never used. |
![]() |
|
Col: 69 Missing semicolon. |
![]() |
|
You don't need this becuase of the _super call below. |
|
|
This should be in its own file. You will have to add the new file to staticbundles.py. |
|
|
Col: 29 Missing semicolon. |
![]() |
|
Col: 63 Missing semicolon. |
![]() |
|
Col: 11 Missing semicolon. |
![]() |
|
Col: 35 Missing semicolon. |
![]() |
|
Alphabetize. |
|
|
Alphabetize. |
|
|
Alphabetize. |
|
|
space between selector and { |
|
|
These are not very semantic styles. Their names indicate what they do, not why they do it or what they … |
|
|
Space between selector and { |
|
|
This should return this. |
|
|
Col: 7 'DiffCommentView' is defined but never used. |
![]() |
|
Same comment here re: inline styles. |
|
|
Col: 7 'FileAttachmentCommentView' is defined but never used. |
![]() |
|
Col: 7 'GeneralCommentView' is defined but never used. |
![]() |
|
Col: 7 'ScreenshotCommentView' is defined but never used. |
![]() |
|
We try to avoid inline style as much as possible. Is there a reason this can't be added to a … |
|
|
Col: 7 'HeaderFooterCommentView' is defined but never used. |
![]() |
|
If it is intentionally a no-op, you do not need to define it since the parent already does. Same elsewhere. |
|
|
Col: 7 'ReviewOutline' is defined but never used. |
![]() |
|
Col: 3 Missing semicolon. |
![]() |
|
Same comment here re: inline styles. |
|
|
Our templates are indented a single space, not four. |
|
|
Space after ). Same elsewhere |
|
|
This is also using inline style. |
|
|
How about: this.listenTo( reviewDialogView._fileAttachmentCommentsCollection, 'add', comment => this._renderComment($reviewOutline, comment)); |
|
|
Since you're not doing anything with tipsSection, you can just do: this.$('#sidebar-tips-section') .append($(this.tipsTemplate({ ... }))); |
|
|
As a convention, we name jQuery objects $foo. |
|
|
This should have $() wrapped around the template to convert create the DOM nodes to attach to the tree. |
|
|
Since you aren't doing anything with $buttons afterwards, you can just do: this.$('#sidebar-tips-button') .append(...); |
|
|
Our templates are indented a single space, not four. |
|
|
Col: 7 'DiffCommentView' is defined but never used. |
![]() |
|
Col: 7 'FileAttachmentCommentView' is defined but never used. |
![]() |
|
Col: 7 'GeneralCommentView' is defined but never used. |
![]() |
|
Col: 7 'ScreenshotCommentView' is defined but never used. |
![]() |
|
Col: 7 'HeaderFooterCommentView' is defined but never used. |
![]() |
|
Col: 7 'ReviewOutline' is defined but never used. |
![]() |
|
Col: 3 Missing semicolon. |
![]() |
|
Col: 7 'HeaderFooterCommentView' is defined but never used. |
![]() |
|
Col: 58 Missing semicolon. |
![]() |
|
Col: 58 Missing semicolon. |
![]() |
|
Col: 58 Missing semicolon. |
![]() |
|
Col: 58 Missing semicolon. |
![]() |
|
Col: 7 'HeaderFooterCommentView' is defined but never used. |
![]() |
|
Space after selector and before opening brace. |
|
|
Is text HTML-escaped? Or do we know its safe HTML? If not we need to use <%- text %>. |
|
|
<%- text %> |
|
|
Same comment about <%= foo %> vs <%- foo %>. |
|
|
<br> and it should be on the next line. |
|
|
<%- lines %> |
|
|
Unnecessary -- this is the default impl. |
|
|
Here too |
|
|
Space between ) and { |
|
|
Should be indented one space. |
|
|
<%- text %> |
|
|
<br> on next line. |
|
|
Unnecessary. |
|
|
Same comment here vs <%= vs <%-. |
|
|
<%- text %> |
|
|
<br> on next line. |
|
|
Unnecessary. |
|
|
This has to be marked for translation with gettext(). Replace this with a template var and pass in the result … |
|
|
This has to be marked for translation with gettext(). Replace this with a template var and pass in the result … |
|
|
Same comment here about <%= vs <%-. |
|
|
We should avoid <b> in favour of <strong>, which is more semantic (see: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/strong) However, since this is a title, … |
|
|
I don't know that we need an id selector here. class="tip-text" would be fine. |
|
|
gettext() |
|
|
Single quotes for strings |
|
|
Text needs to be marked for translation with gettext, e.g. $('<span class="fa fa-plus"></span>') .text(gettext('Add a general comment')) |
|
|
If you are going to use this for a multi-line string, use dedent, e.g. $(dedent` <span class="left-button fa fa-caret-left"></span> <span … |
|
|
Undo |
|
|
Comments should end in a period. However, I think the behaviour can be inferred from the name. |
|
|
Comments should end in a period. Again, I don't know that this is necessary. |
|
|
This file needs to be wrapped in an IIFE to not pollute global scope, e.g. (function() { const BaseCommentView = … |
|
|
Undo |
|
|
.sidebar-tips-button before .sidebar-tips-section. |
|
|
No blank line here. |
|
|
No blank line here. |
|
|
Move this to right before the block it is defined in. |
|
|
No blank line here. |
|
|
This does not interpolate variables, so it can just be a string literal. |
|
|
Instead of passing tips and current into the template, you can pass tip as tips[current] and use that instead. |
|
|
There is an extra ", right before class |
|
|
Needs a docstring. |
|
|
Col: 22 Missing semicolon. |
![]() |
|
Col: 5 'emptyDiffCommentsPayload' is defined but never used. |
![]() |
|
Col: 5 'emptyFileAttachmentCommentsPayload' is defined but never used. |
![]() |
|
Col: 5 'emptyGeneralCommentsPayload' is defined but never used. |
![]() |
|
Col: 5 'emptyScreenshotCommentsPayload' is defined but never used. |
![]() |
|
Col: 5 'diffCommentPayload' is defined but never used. |
![]() |
|
Col: 5 'fileAttachmentCommentPayload' is defined but never used. |
![]() |
|
Col: 5 'generalCommentPayload' is defined but never used. |
![]() |
|
Col: 5 'screenshotCommentPayload' is defined but never used. |
![]() |
|
Col: 5 'origGeneralCommentsEnabled' is defined but never used. |
![]() |
|
Col: 5 'dlg' is defined but never used. |
![]() |
|
Col: 10 'createReviewDialog' is defined but never used. |
![]() |
|
Col: 21 'ajaxData' is defined but never used. |
![]() |
|
Col: 96 Missing semicolon. |
![]() |
|
Col: 70 Missing semicolon. |
![]() |
|
Col: 41 Expected '===' and instead saw '=='. |
![]() |
|
Col: 56 Missing semicolon. |
![]() |
|
Col: 70 Missing semicolon. |
![]() |
|
W503 line break before binary operator |
![]() |
|
W503 line break before binary operator |
![]() |
|
W503 line break before binary operator |
![]() |
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 2 (+23) |
Checks run (2 succeeded)
Description: |
|
---|
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 3 (+35) |
Checks run (2 succeeded)
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 4 (+35) |
Checks run (2 succeeded)
-
-
reviewboard/static/rb/js/views/reviewDialogView.es6.js (Diff revision 4) Since we're doing
_super.remove
below we don't need this. -
reviewboard/static/rb/js/views/reviewDialogView.es6.js (Diff revision 4) Doing
render()
here will break things. -
reviewboard/static/rb/js/views/reviewDialogView.es6.js (Diff revision 4) This should be
this.$el.append($generalCommentButton)
.
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 5 (+36) |
Checks run (2 succeeded)
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 6 (+55) |
||||
Added Files: |
Checks run (2 succeeded)
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 7 (+61 -2) |
Checks run (2 succeeded)
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 8 (+76 -15) |
Checks run (2 succeeded)
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 9 (+88 -15) |
||||
Added Files: |
Checks run (1 failed, 1 succeeded)
JSHint
-
reviewboard/static/rb/js/views/reviewDialogView.es6.js (Diff revision 9) Col: 15 'commentList' is defined but never used.
-
reviewboard/static/rb/js/views/reviewDialogView.es6.js (Diff revision 9) Col: 15 'tipsSection' is defined but never used.
-
Change Summary:
Addressed issues
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 10 (+88 -15) |
Checks run (2 succeeded)
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 11 (+112 -13) |
Checks run (2 succeeded)
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 12 (+141 -13) |
Checks run (2 succeeded)
-
-
reviewboard/static/rb/js/views/reviewDialogView.es6.js (Diff revision 12) You don't need this becuase of the
_super
call below. -
reviewboard/static/rb/js/views/reviewDialogView.es6.js (Diff revision 12) This should be in its own file. You will have to add the new file to
staticbundles.py
.
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 13 (+139 -13) |
Checks run (2 succeeded)
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 14 (+154 -13) |
Checks run (1 failed, 1 succeeded)
JSHint
-
reviewboard/static/rb/js/views/reviewComposerSidebarView.es6.js (Diff revision 14) Col: 29 Missing semicolon.
-
reviewboard/static/rb/js/views/reviewComposerSidebarView.es6.js (Diff revision 14) Col: 63 Missing semicolon.
-
reviewboard/static/rb/js/views/reviewComposerSidebarView.es6.js (Diff revision 14) Col: 11 Missing semicolon.
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 15 (+154 -13) |
Checks run (2 succeeded)
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 16 (+176 -13) |
Checks run (2 succeeded)
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 17 (+189 -13) |
Checks run (2 succeeded)
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 18 (+190 -13) |
Checks run (2 succeeded)
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 19 (+206 -13) |
Checks run (1 failed, 1 succeeded)
JSHint
-
reviewboard/static/rb/js/views/reviewDialogView.es6.js (Diff revision 19) Col: 35 Missing semicolon.
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 20 (+205 -13) |
Checks run (2 succeeded)
Description: |
|
||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Commit: |
|
||||||||||||||||||||||||||||||||||||||||||||||||
Diff: |
Revision 21 (+209 -13) |
||||||||||||||||||||||||||||||||||||||||||||||||
Added Files: |
Checks run (2 succeeded)
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 22 (+345 -13) |
Checks run (1 failed, 1 succeeded)
JSHint
-
reviewboard/static/rb/js/views/reviewComposerSidebarView.es6.js (Diff revision 22) Col: 7 'DiffCommentView' is defined but never used.
-
reviewboard/static/rb/js/views/reviewComposerSidebarView.es6.js (Diff revision 22) Col: 7 'FileAttachmentCommentView' is defined but never used.
-
reviewboard/static/rb/js/views/reviewComposerSidebarView.es6.js (Diff revision 22) Col: 7 'GeneralCommentView' is defined but never used.
-
reviewboard/static/rb/js/views/reviewComposerSidebarView.es6.js (Diff revision 22) Col: 7 'ScreenshotCommentView' is defined but never used.
-
reviewboard/static/rb/js/views/reviewComposerSidebarView.es6.js (Diff revision 22) Col: 7 'HeaderFooterCommentView' is defined but never used.
-
reviewboard/static/rb/js/views/reviewComposerSidebarView.es6.js (Diff revision 22) Col: 7 'ReviewOutline' is defined but never used.
-
reviewboard/static/rb/js/views/reviewComposerSidebarView.es6.js (Diff revision 22) Col: 3 Missing semicolon.
-
-
-
-
-
-
reviewboard/static/rb/css/pages/reviews.less (Diff revision 22) These are not very semantic styles. Their names indicate what they do, not why they do it or what they are styling. Can you update these with more descriptive names?
e.g. why do we want
.color
? Is it a header? If so then name it.header
. -
-
reviewboard/static/rb/js/views/reviewComposerSidebarView.es6.js (Diff revision 22) This should return
this
. -
reviewboard/static/rb/js/views/reviewComposerSidebarView.es6.js (Diff revision 22) Same comment here re: inline styles.
-
reviewboard/static/rb/js/views/reviewComposerSidebarView.es6.js (Diff revision 22) We try to avoid inline style as much as possible. Is there a reason this can't be added to a
.sidebar-general-comments
rule in the CSS? -
reviewboard/static/rb/js/views/reviewComposerSidebarView.es6.js (Diff revision 22) If it is intentionally a no-op, you do not need to define it since the parent already does. Same elsewhere.
-
reviewboard/static/rb/js/views/reviewComposerSidebarView.es6.js (Diff revision 22) Same comment here re: inline styles.
-
reviewboard/static/rb/js/views/reviewComposerSidebarView.es6.js (Diff revision 22) Our templates are indented a single space, not four.
-
reviewboard/static/rb/js/views/reviewComposerSidebarView.es6.js (Diff revision 22) Space after
)
. Same elsewhere -
reviewboard/static/rb/js/views/reviewComposerSidebarView.es6.js (Diff revision 22) This is also using inline style.
-
reviewboard/static/rb/js/views/reviewComposerSidebarView.es6.js (Diff revision 22) How about:
this.listenTo( reviewDialogView._fileAttachmentCommentsCollection, 'add', comment => this._renderComment($reviewOutline, comment));
-
reviewboard/static/rb/js/views/reviewComposerSidebarView.es6.js (Diff revision 22) Since you're not doing anything with
tipsSection
, you can just do:this.$('#sidebar-tips-section') .append($(this.tipsTemplate({ ... })));
-
reviewboard/static/rb/js/views/reviewComposerSidebarView.es6.js (Diff revision 22) As a convention, we name jQuery objects
$foo
. -
reviewboard/static/rb/js/views/reviewComposerSidebarView.es6.js (Diff revision 22) This should have
$()
wrapped around the template to convert create the DOM nodes to attach to the tree. -
reviewboard/static/rb/js/views/reviewComposerSidebarView.es6.js (Diff revision 22) Since you aren't doing anything with
$buttons
afterwards, you can just do:this.$('#sidebar-tips-button') .append(...);
-
reviewboard/static/rb/js/views/reviewDialogView.es6.js (Diff revision 22) Our templates are indented a single space, not four.
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 23 (+346 -13) |
Checks run (1 failed, 1 succeeded)
JSHint
-
reviewboard/static/rb/js/views/reviewComposerSidebarView.es6.js (Diff revision 23) Col: 7 'DiffCommentView' is defined but never used.
-
reviewboard/static/rb/js/views/reviewComposerSidebarView.es6.js (Diff revision 23) Col: 7 'FileAttachmentCommentView' is defined but never used.
-
reviewboard/static/rb/js/views/reviewComposerSidebarView.es6.js (Diff revision 23) Col: 7 'GeneralCommentView' is defined but never used.
-
reviewboard/static/rb/js/views/reviewComposerSidebarView.es6.js (Diff revision 23) Col: 7 'ScreenshotCommentView' is defined but never used.
-
reviewboard/static/rb/js/views/reviewComposerSidebarView.es6.js (Diff revision 23) Col: 7 'HeaderFooterCommentView' is defined but never used.
-
reviewboard/static/rb/js/views/reviewComposerSidebarView.es6.js (Diff revision 23) Col: 7 'ReviewOutline' is defined but never used.
-
reviewboard/static/rb/js/views/reviewComposerSidebarView.es6.js (Diff revision 23) Col: 3 Missing semicolon.
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 24 (+360 -13) |
Checks run (1 failed, 1 succeeded)
JSHint
-
reviewboard/static/rb/js/views/reviewComposerSidebarView.es6.js (Diff revision 24) Col: 7 'HeaderFooterCommentView' is defined but never used.
-
reviewboard/static/rb/js/views/reviewComposerSidebarView.es6.js (Diff revision 24) Col: 58 Missing semicolon.
-
reviewboard/static/rb/js/views/reviewComposerSidebarView.es6.js (Diff revision 24) Col: 58 Missing semicolon.
-
reviewboard/static/rb/js/views/reviewComposerSidebarView.es6.js (Diff revision 24) Col: 58 Missing semicolon.
-
reviewboard/static/rb/js/views/reviewComposerSidebarView.es6.js (Diff revision 24) Col: 58 Missing semicolon.
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 25 (+360 -13) |
Checks run (1 failed, 1 succeeded)
JSHint
-
reviewboard/static/rb/js/views/reviewComposerSidebarView.es6.js (Diff revision 25) Col: 7 'HeaderFooterCommentView' is defined but never used.
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 26 (+370 -13) |
Checks run (2 succeeded)
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 27 (+378 -14) |
Checks run (2 succeeded)
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 28 (+391 -14) |
Checks run (2 succeeded)
-
-
reviewboard/static/rb/css/pages/reviews.less (Diff revision 28) Space after selector and before opening brace.
-
reviewboard/static/rb/js/views/reviewComposerSidebarView.es6.js (Diff revision 28) Is
text
HTML-escaped? Or do we know its safe HTML? If not we need to use<%- text %>
. -
reviewboard/static/rb/js/views/reviewComposerSidebarView.es6.js (Diff revision 28) Same comment about
<%= foo %>
vs<%- foo %>
. -
-
reviewboard/static/rb/js/views/reviewComposerSidebarView.es6.js (Diff revision 28) Space between
)
and{
-
reviewboard/static/rb/js/views/reviewComposerSidebarView.es6.js (Diff revision 28) Should be indented one space.
-
reviewboard/static/rb/js/views/reviewComposerSidebarView.es6.js (Diff revision 28) Same comment here vs
<%=
vs<%-
. -
reviewboard/static/rb/js/views/reviewComposerSidebarView.es6.js (Diff revision 28) This has to be marked for translation with
gettext()
. Replace this with a template var and pass in the result ofgettext()
when using the template. -
reviewboard/static/rb/js/views/reviewComposerSidebarView.es6.js (Diff revision 28) This has to be marked for translation with
gettext()
. Replace this with a template var and pass in the result ofgettext()
when using the template. -
reviewboard/static/rb/js/views/reviewComposerSidebarView.es6.js (Diff revision 28) Same comment here about
<%=
vs<%-
. -
reviewboard/static/rb/js/views/reviewComposerSidebarView.es6.js (Diff revision 28) Single quotes for strings
-
reviewboard/static/rb/js/views/reviewComposerSidebarView.es6.js (Diff revision 28) Text needs to be marked for translation with
gettext
, e.g.$('<span class="fa fa-plus"></span>') .text(gettext('Add a general comment'))
-
reviewboard/static/rb/js/views/reviewComposerSidebarView.es6.js (Diff revision 28) If you are going to use this for a multi-line string, use
dedent
, e.g.$(dedent` <span class="left-button fa fa-caret-left"></span> <span class="right-button ra fa-caret-right"></span> `);
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 29 (+390 -14) |
Checks run (2 succeeded)
-
-
reviewboard/static/rb/js/views/reviewComposerSidebarView.es6.js (Diff revisions 28 - 29) <%- text %>
-
reviewboard/static/rb/js/views/reviewComposerSidebarView.es6.js (Diff revisions 28 - 29) <br>
and it should be on the next line. -
reviewboard/static/rb/js/views/reviewComposerSidebarView.es6.js (Diff revisions 28 - 29) <%- lines %>
-
reviewboard/static/rb/js/views/reviewComposerSidebarView.es6.js (Diff revisions 28 - 29) Unnecessary -- this is the default impl.
-
reviewboard/static/rb/js/views/reviewComposerSidebarView.es6.js (Diff revisions 28 - 29) <%- text %>
-
reviewboard/static/rb/js/views/reviewComposerSidebarView.es6.js (Diff revisions 28 - 29) <br>
on next line. -
reviewboard/static/rb/js/views/reviewComposerSidebarView.es6.js (Diff revisions 28 - 29) Unnecessary.
-
reviewboard/static/rb/js/views/reviewComposerSidebarView.es6.js (Diff revisions 28 - 29) <%- text %>
-
reviewboard/static/rb/js/views/reviewComposerSidebarView.es6.js (Diff revisions 28 - 29) <br>
on next line. -
reviewboard/static/rb/js/views/reviewComposerSidebarView.es6.js (Diff revisions 28 - 29) Unnecessary.
-
reviewboard/static/rb/js/views/reviewComposerSidebarView.es6.js (Diff revisions 28 - 29) We should avoid
<b>
in favour of<strong>
, which is more semantic (see: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/strong)However, since this is a title, it should be a
<h1>
,<h2>
, etc. element.Also this needs to be
gettext()
-ed. -
reviewboard/static/rb/js/views/reviewComposerSidebarView.es6.js (Diff revisions 28 - 29) I don't know that we need an
id
selector here.class="tip-text"
would be fine. -
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 30 (+385 -14) |
Checks run (2 succeeded)
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 31 (+384 -14) |
Checks run (2 succeeded)
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 32 (+394 -15) |
Checks run (2 succeeded)
Change Summary:
Functionality is complete
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 33 (+394 -15) |
Checks run (2 succeeded)
-
-
-
reviewboard/static/rb/css/pages/reviews.less (Diff revision 33) Comments should end in a period.
However, I think the behaviour can be inferred from the name.
-
reviewboard/static/rb/css/pages/reviews.less (Diff revision 33) Comments should end in a period.
Again, I don't know that this is necessary.
-
reviewboard/static/rb/js/views/reviewComposerSidebarView.es6.js (Diff revision 33) This file needs to be wrapped in an IIFE to not pollute global scope, e.g.
(function() { const BaseCommentView = Backbone.View.extend({...}); // .. RB.ReviewComposerSidebar = Backbone.View.extend({...}); })();
This keeps all the variables in a function scope, so they don't escape into global scope (i.e, onto
window
).
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 34 (+439 -15) |
Checks run (2 succeeded)
-
-
-
reviewboard/static/rb/css/pages/reviews.less (Diff revision 34) .sidebar-tips-button
before.sidebar-tips-section
. -
reviewboard/static/rb/js/views/reviewComposerSidebarView.es6.js (Diff revision 34) No blank line here.
-
reviewboard/static/rb/js/views/reviewComposerSidebarView.es6.js (Diff revision 34) No blank line here.
-
reviewboard/static/rb/js/views/reviewComposerSidebarView.es6.js (Diff revision 34) Move this to right before the block it is defined in.
-
reviewboard/static/rb/js/views/reviewComposerSidebarView.es6.js (Diff revision 34) No blank line here.
-
reviewboard/static/rb/js/views/reviewComposerSidebarView.es6.js (Diff revision 34) This does not interpolate variables, so it can just be a string literal.
-
reviewboard/static/rb/js/views/reviewComposerSidebarView.es6.js (Diff revision 34) Instead of passing
tips
andcurrent
into the template, you can passtip
astips[current]
and use that instead. -
reviewboard/static/rb/js/views/reviewDialogView.es6.js (Diff revision 34) There is an extra
"
, right beforeclass
-
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 35 (+431 -15) |
Checks run (2 succeeded)
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 36 (+608 -16) |
Checks run (1 failed, 1 succeeded)
JSHint
-
reviewboard/static/rb/js/views/reviewComposerSidebarView.es6.js (Diff revision 36) Col: 22 Missing semicolon.
-
reviewboard/static/rb/js/views/tests/reviewComposerSidebarViewTests.js (Diff revision 36) Col: 5 'emptyDiffCommentsPayload' is defined but never used.
-
reviewboard/static/rb/js/views/tests/reviewComposerSidebarViewTests.js (Diff revision 36) Col: 5 'emptyFileAttachmentCommentsPayload' is defined but never used.
-
reviewboard/static/rb/js/views/tests/reviewComposerSidebarViewTests.js (Diff revision 36) Col: 5 'emptyGeneralCommentsPayload' is defined but never used.
-
reviewboard/static/rb/js/views/tests/reviewComposerSidebarViewTests.js (Diff revision 36) Col: 5 'emptyScreenshotCommentsPayload' is defined but never used.
-
reviewboard/static/rb/js/views/tests/reviewComposerSidebarViewTests.js (Diff revision 36) Col: 5 'diffCommentPayload' is defined but never used.
-
reviewboard/static/rb/js/views/tests/reviewComposerSidebarViewTests.js (Diff revision 36) Col: 5 'fileAttachmentCommentPayload' is defined but never used.
-
reviewboard/static/rb/js/views/tests/reviewComposerSidebarViewTests.js (Diff revision 36) Col: 5 'generalCommentPayload' is defined but never used.
-
reviewboard/static/rb/js/views/tests/reviewComposerSidebarViewTests.js (Diff revision 36) Col: 5 'screenshotCommentPayload' is defined but never used.
-
reviewboard/static/rb/js/views/tests/reviewComposerSidebarViewTests.js (Diff revision 36) Col: 5 'origGeneralCommentsEnabled' is defined but never used.
-
reviewboard/static/rb/js/views/tests/reviewComposerSidebarViewTests.js (Diff revision 36) Col: 5 'dlg' is defined but never used.
-
reviewboard/static/rb/js/views/tests/reviewComposerSidebarViewTests.js (Diff revision 36) Col: 10 'createReviewDialog' is defined but never used.
Change Summary:
Resolved issues
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 37 (+607 -16) |
Checks run (2 succeeded)
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 38 (+692 -16) |
Checks run (2 succeeded)
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 39 (+1497 -16) |
Checks run (2 succeeded)
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 40 (+1558 -16) |
Checks run (1 failed, 1 succeeded)
JSHint
-
reviewboard/static/rb/js/views/tests/reviewComposerSidebarViewTests.js (Diff revision 40) Col: 21 'ajaxData' is defined but never used.
-
reviewboard/static/rb/js/views/tests/reviewComposerSidebarViewTests.js (Diff revision 40) Col: 96 Missing semicolon.
-
reviewboard/static/rb/js/views/tests/reviewComposerSidebarViewTests.js (Diff revision 40) Col: 70 Missing semicolon.
-
reviewboard/static/rb/js/views/tests/reviewComposerSidebarViewTests.js (Diff revision 40) Col: 41 Expected '===' and instead saw '=='.
-
reviewboard/static/rb/js/views/tests/reviewComposerSidebarViewTests.js (Diff revision 40) Col: 56 Missing semicolon.
-
reviewboard/static/rb/js/views/tests/reviewComposerSidebarViewTests.js (Diff revision 40) Col: 70 Missing semicolon.
Change Summary:
Resolved raised issues
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 41 (+1552 -16) |
Checks run (2 succeeded)
Summary: |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description: |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||
Testing Done: |
|
Change Summary:
Addressed issues
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 42 (+1552 -16) |
Checks run (2 succeeded)
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 43 (+1649 -593) |
Checks run (1 failed, 1 succeeded)
flake8
-
reviewboard/webapi/resources/validate_diff.py (Diff revision 43) W503 line break before binary operator
-
reviewboard/webapi/resources/validate_diff.py (Diff revision 43) W503 line break before binary operator
-
reviewboard/webapi/resources/validate_diff.py (Diff revision 43) W503 line break before binary operator
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 44 (+1552 -16) |
Checks run (2 succeeded)
Change Summary:
Minor change forgot to change source for revision in template
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 45 (+1552 -16) |