Convert comment block views to TypeScript/spina.
Review Request #13527 — Created Feb. 6, 2024 and submitted
This change converts the comment block view classes to TypeScript.
- Ran js-tests.
- Smoke tested commenting on diffs and various Review UIs.
Summary | ID |
---|---|
b24b677ea58c0b35a7a0c9acd67924a6f203414f |
Description | From | Last Updated |
---|---|---|
I notice there's a lot of places in the old code where we could pull out things like this.model and … |
maubin | |
To keep this formatted similarly to other classes and deal with the indent, you could do: export class DiffCommentBlockView extends … |
chipx86 | |
This could be moved into static modelEvents = { ... }. If not that, then this should be changed to … |
chipx86 | |
These are missing docs. |
chipx86 | |
Missing Version Added. |
chipx86 | |
These are missing docs. |
chipx86 | |
These should be moved into modelEvents. |
chipx86 | |
Let's pull #moveState into a local variable. No sense in looking it up 8 times. |
chipx86 | |
Could use an f-string here. |
chipx86 | |
Could use f-strings here. |
chipx86 |
-
-
reviewboard/static/rb/js/reviews/views/diffCommentBlockView.ts (Diff revision 1) To keep this formatted similarly to other classes and deal with the indent, you could do:
export class DiffCommentBlockView extends TextBasedCommentBlockView< DiffCommentBlock > { ... }
-
reviewboard/static/rb/js/reviews/views/abstractCommentBlockView.ts (Diff revision 1) This could be moved into
static modelEvents = { ... }
.If not that, then this should be changed to use
.listenTo()
instead of.on()
. -
reviewboard/static/rb/js/reviews/views/regionCommentBlockView.ts (Diff revision 1) These are missing docs.
-
reviewboard/static/rb/js/reviews/views/regionCommentBlockView.ts (Diff revision 1) Missing
Version Added
. -
reviewboard/static/rb/js/reviews/views/regionCommentBlockView.ts (Diff revision 1) These are missing docs.
-
reviewboard/static/rb/js/reviews/views/regionCommentBlockView.ts (Diff revision 1) These should be moved into
modelEvents
. -
reviewboard/static/rb/js/reviews/views/regionCommentBlockView.ts (Diff revision 1) Let's pull
#moveState
into a local variable. No sense in looking it up 8 times. -
reviewboard/static/rb/js/reviews/views/textBasedCommentBlockView.ts (Diff revision 1) Could use an f-string here.
-
reviewboard/static/rb/js/reviews/views/textBasedCommentBlockView.ts (Diff revision 1) Could use f-strings here.
Commits: |
|
|||||||
---|---|---|---|---|---|---|---|---|
Diff: |
Revision 2 (+746 -416) |