Port FileAttachmentThumbnailView to TS/spina.
Review Request #13221 — Created Aug. 17, 2023 and submitted
This ports the
FileAttachmentThumbnail
view to TS/spina. The view is also
renamed toFileAttachmentThumbnailView
to follow our naming conventions.
- Ran JS unit tests.
- Tested using/viewing file attachment thumbnails on the review request,
in change descriptions, and in file review UIs. - Tested uploading/deleting files.
- Tested all the file actions.
Summary | ID |
---|---|
97cabc4ead7868101913165447726bed63586c9f |
Description | From | Last Updated |
---|---|---|
The summary and description need to be separated by a blank line. |
chipx86 | |
I don't know that we've standardized this yet for TypeScript, but we should probably have required fields before optional fields. … |
chipx86 | |
While here, can you turn this (and others) into a dedent, so we can save on the join? |
chipx86 | |
Worth mentioning, we'll do a $() for every one of these when constructing the object (since these are instance attributes, … |
chipx86 | |
Let's organize _ before #, since _ is semi-public and # is semi-private. We haven't done this elsewhere, but we … |
chipx86 | |
onInitialRender() shouldn't return anything. If it did, we'd actually want to use this instead of the class name as the … |
chipx86 | |
Missing a trailing comma. |
chipx86 | |
Missing a trailing comma. |
chipx86 | |
ESLint will complain about the ordering here. This should be in alphabetical order. |
chipx86 | |
Let's define the types for these here. |
david | |
Since we're touching this, can we change var to const, add a trailing comma on canEdit, and sort the object … |
david | |
These default values can all be specified in the instance definitions. |
david | |
Parens around val aren't necessary here. |
david | |
If you pull, you can now add: import { suite } from '@beanbag/jasmine-suites'; |
david | |
Just realized, since we renamed FileAttachmentThumbnail to FileAttachmentThumbnailView, we should at least document the name in a Version Changed, and … |
chipx86 | |
There's a section header for this: /** * ... * * Deprecated: * 6.0 */ When we finally have generated … |
chipx86 |
- Change Summary:
-
Missed one
gettext
call. - Commits:
-
Summary ID 23436cb340f24bd4721fb5936ac39a0f5b45a15c a3e9c65842ab47358ba06082e5a002922704d9eb - Diff:
-
Revision 2 (+428 -220)
Checks run (2 succeeded)
-
-
-
I don't know that we've standardized this yet for TypeScript, but we should probably have required fields before optional fields. This better matches the requirements imposed in Python for dataclasses, and how we often document things.
-
-
Worth mentioning, we'll do a
$()
for every one of these when constructing the object (since these are instance attributes, not class attributes -- silly ES6 classes).This is fine if we want that as the default, but since these are set in
render
, it might be a better failure to leave these asundefined
, at least in some cases? -
Let's organize
_
before#
, since_
is semi-public and#
is semi-private.We haven't done this elsewhere, but we should probably also mark the
_
ones with theprivate
keyword, unless we need them in tests. -
onInitialRender()
shouldn't return anything.If it did, we'd actually want to use
this
instead of the class name as the type. -
-
-
- Testing Done:
-
- Ran JS unit tests.
- Tested using/viewing file attachment thumbnails on the review request,
in change descriptions, and in file review UIs.
- Tested uploading/deleting files.
+ - Tested all the file actions.
- Commits:
-
Summary ID a3e9c65842ab47358ba06082e5a002922704d9eb c3ac9057ac767bbb37a0a621f441cc2b9fda0a51 - Diff:
-
Revision 3 (+516 -300)
Checks run (2 succeeded)
- Commits:
-
Summary ID c3ac9057ac767bbb37a0a621f441cc2b9fda0a51 1706815d3113af0b74b3aff33dec2ef7cb88af01 - Diff:
-
Revision 4 (+524 -308)
Checks run (2 succeeded)
- Commits:
-
Summary ID 1706815d3113af0b74b3aff33dec2ef7cb88af01 bd02c9654336262ab3d24a7e2922baac6db198d4 - Diff:
-
Revision 5 (+596 -364)
Checks run (2 succeeded)
- Change Summary:
-
- Specifies default values in the instance definitions.
- Imports
suite
from@beanbag/jasmine-suite
. - Tried to fix any ESLint/TS warnings/errors that I'm able to.
- Commits:
-
Summary ID bd02c9654336262ab3d24a7e2922baac6db198d4 953c6482f26f9c94ae9da89f757eed44ed296bed - Diff:
-
Revision 6 (+612 -388)
Checks run (2 succeeded)
- Commits:
-
Summary ID 953c6482f26f9c94ae9da89f757eed44ed296bed 76fe42c47806c23e403efba6dc3e898dbe967fba - Diff:
-
Revision 7 (+612 -388)
Checks run (2 succeeded)
-
Change looks ready to go. Just one thing I want to make sure we have an answer for.
-
Just realized, since we renamed
FileAttachmentThumbnail
toFileAttachmentThumbnailView
, we should at least document the name in aVersion Changed
, and if there's any reason extensions ever needed to refer to this by name (I don't think so but maybe?) then we'd want an alias from the old name to new name.
- Commits:
-
Summary ID 76fe42c47806c23e403efba6dc3e898dbe967fba f64afba649abfd8640dad8d1823c09b46831fb82 - Diff:
-
Revision 8 (+644 -388)
Checks run (2 succeeded)
- Commits:
-
Summary ID f64afba649abfd8640dad8d1823c09b46831fb82 97cabc4ead7868101913165447726bed63586c9f - Diff:
-
Revision 9 (+646 -388)