Port FileAttachment, DraftFileAttachment models and DraftResourceChildModelMixin to TS/spina.
Review Request #13180 — Created Aug. 1, 2023 and submitted
Information | |
---|---|
maubin | |
Review Board | |
release-6.x | |
Reviewers | |
reviewboard | |
This ports the file attachment and draft file attachment models to TypeScript
and spina. We enable extra data support on the models, which we don't use
for any particular reason right now but might need to use in the future. This
also ports the draft resource child model mixin to TypeScript/spina.
- Tested uploading new file attachments.
- Tested dragging and dropping to upload new file attachments.
- Tested viewing file attachments.
- Saw that published file attachments appear correctly.
- Tested dragging and dropping an image file into a review reply.
- Tested deleting file attachments.
- Tested updating file attachments.
- Tested posting review request drafts with file attachments.
- Ran JS unit tests.
Summary | |
---|---|
Description | From | Last Updated |
---|---|---|
Missing semicolon. Column: 69 Error code: W033 |
![]() |
|
Missing semicolon. Column: 43 Error code: W033 |
![]() |
|
Add a blank line in here. |
|
|
The only thing necessary here should be rspNamespace. |
|
|
Add a blank line in here. |
|
|
This needs a doc comment. |
|
|
Add a blank line in here. |
|
|
This file should be deleted. |
|
|
This needs a trailing comma. |
|
|
This needs a trailing comma. |
|
|
.. before . |
|
|
This should use single quotes. |
|

Change Summary:
- Ported DraftFileAttachmentModel and DraftResourceChildModelMixin too
Commits: |
|
||||||
---|---|---|---|---|---|---|---|
Diff: |
Revision 2 (+666 -200) |
Checks run (1 failed, 1 succeeded)
JSHint
-
reviewboard/static/rb/js/resources/models/draftReviewRequestModel.es6.js (Diff revision 2) Show all issues -
reviewboard/static/rb/js/views/uploadAttachmentView.es6.js (Diff revision 2) Missing semicolon. Column: 43 Error code: W033

Summary: |
|
|||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description: |
|
|||||||||||||||||||||||||||
Testing Done: |
|
|||||||||||||||||||||||||||
Commits: |
|
|||||||||||||||||||||||||||
Diff: |
Revision 3 (+560 -220) |
Checks run (2 succeeded)
-
Looks great! I've got a handful of comments but they're all pretty tiny things.
-
-
-
reviewboard/static/rb/js/common/resources/models/fileAttachmentModel.ts (Diff revision 3) Add a blank line in here.
-
reviewboard/static/rb/js/common/resources/models/fileAttachmentModel.ts (Diff revision 3) This needs a doc comment.
-
-
reviewboard/static/rb/js/resources/models/fileAttachmentModel.es6.js (Diff revision 3) This file should be deleted.
-
reviewboard/static/rb/js/reviews/models/reviewRequestEditorModel.ts (Diff revision 3) This needs a trailing comma.
-
reviewboard/static/rb/js/reviews/models/reviewRequestEditorModel.ts (Diff revision 3) This needs a trailing comma.

Commits: |
|
||||||
---|---|---|---|---|---|---|---|
Diff: |
Revision 4 (+418 -230) |
Checks run (2 succeeded)
-
This looks basically ready to go. I just landed the change to fix up imports, so you'll probably need to fix a few conflicts when rebasing.

Change Summary:
- Rebased and made sure all the imports were good.
Commits: |
|
|||||||||
---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 5 (+406 -226) |
Checks run (2 succeeded)
-
-
reviewboard/static/rb/js/common/resources/models/fileAttachmentModel.ts (Diff revision 5) .. before .
-

Commits: |
|
|||||||||
---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 6 (+406 -226) |