-
Notifications
You must be signed in to change notification settings - Fork 291
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: file asset v2 [WPB-16104] #18749
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #18749 +/- ##
==========================================
- Coverage 45.65% 45.59% -0.06%
==========================================
Files 968 974 +6
Lines 27937 27977 +40
Branches 6302 6312 +10
==========================================
+ Hits 12754 12757 +3
- Misses 13594 13628 +34
- Partials 1589 1592 +3 |
const formattedName = transferNames[transferState as keyof typeof transferNames] ?? name; | ||
|
||
return { | ||
name: formattedName, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think You can return directly, because You not reusing this :) And we don't want to support canceled? WE don't display anything if it's canceled ?
const formattedName = transferNames[transferState as keyof typeof transferNames] ?? name; | |
return { | |
name: formattedName, | |
return { | |
name: transferNames[transferState as keyof typeof transferNames] ?? name, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it's necessary - if someone cancels they know what they're doing, and they don't need additional "feedback" on the screen.
Currently, we don't have it, so I'll leave it as it is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And when it comes to having the variable or not, it's a matter of preference I think - let me leave it like that, for more "complex" syntax, I rather have it separated
...nts/MessagesList/Message/ContentMessage/asset/FileAsset/getFileAssetStatus/getAssetStatus.ts
Outdated
Show resolved
Hide resolved
...nts/MessagesList/Message/ContentMessage/asset/FileAsset/getFileAssetStatus/getAssetStatus.ts
Outdated
Show resolved
Hide resolved
AssetTransferState.UPLOAD_PENDING, | ||
AssetTransferState.UPLOADING, | ||
AssetTransferState.DOWNLOADING, | ||
].includes(assetStatus as AssetTransferState); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm... smth wrong is here.. assetStatus should be AssetTransferState, So You don't have to assert this type as, could You check this ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh yeah, the condition above was wrong, it's fixed now
|
Description
New file asset based on the #18692. The logic mostly remained the same as it was before.
Demo
Uploaded:
Uploading:
Error:
File sharing restricted:
Checklist