Skip to content
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

New Attachment Upload UX with Real-Time Previews #44889

Merged
merged 27 commits into from
Jul 31, 2024
Merged
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
bf4c208
ReportUtils: simplify optimistic comment constructor logic
kidroca Jun 10, 2024
ccfa861
ReportUtils: extract attachment HTML generation to a separate function
kidroca Jun 10, 2024
c7fdc5a
ReportUtils: rename getAttachmentHtml to getUploadingAttachmentHtml
kidroca Jun 10, 2024
f5fcb32
Enhance attachment handling in getUploadingAttachmentHtml function
kidroca Jun 21, 2024
605990b
fix: prevent error when custom attachment source attribute is undefined
kidroca Jun 21, 2024
b2b1544
ReportUtils: improve attachment HTML generation logic
kidroca Jun 21, 2024
5d8d376
VideoRenderer: correct video source URL resolution logic
kidroca Jun 21, 2024
cce5e7e
ReportUtils: improve attachment handling for non-media files
kidroca Jul 5, 2024
feed1af
ReportUtils: prevent extra line breaks when comment text is empty
kidroca Jul 5, 2024
75756e5
ReportUtils: lint fix
kidroca Jul 8, 2024
d017246
ReportUtils: fix type errors
kidroca Jul 8, 2024
72077d4
CONST: add optimistic source attribute for attachments
kidroca Jul 10, 2024
0e34971
libs/isReportMessageAttachment: improve attachment message check logi…
kidroca Jul 10, 2024
556f795
AttachmentCommentFragment: update attachment uploading detection
kidroca Jul 10, 2024
40d07c4
ContextMenuActions: update attachment detection logic
kidroca Jul 10, 2024
b7a0608
ContextMenuActions: prettier fix
kidroca Jul 12, 2024
d28d2e0
isReportMessageAttachment: Update to pass unit tests
kidroca Jul 12, 2024
27ca9a8
Remove `uploading-attachment` custom model from BaseHTMLEngineProvider
kidroca Jul 12, 2024
feeb9c4
ReportUtils: Enhance data attribute generation
kidroca Jul 16, 2024
2903070
Merge branch 'main' into kidroca/feat/attachment-upload-ux
kidroca Jul 19, 2024
58c4237
Merge branch 'main' into kidroca/feat/attachment-upload-ux
kidroca Jul 26, 2024
715ae21
🐛 fix(AnchorForAttachmentsOnly): update download icon visibility logic
kidroca Jul 26, 2024
4008f07
🐛 fix(components/AnchorForAttachmentsOnly): add sourceID check to dow…
kidroca Jul 29, 2024
cab7749
♻️ refactor(components/Attachments): improve attachment file name ext…
kidroca Jul 29, 2024
955009b
🐛 fix(components/AttachmentModal): prevent downloading local file sou…
kidroca Jul 29, 2024
c147141
🐛 fix(report/ContextMenu): hide download option for uploading files
kidroca Jul 30, 2024
c2c7ec9
🐛 fix(libs/ReportUtils): revert translationKey assignment for attachm…
kidroca Jul 30, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
ReportUtils: improve attachment handling for non-media files
Updated the fallback case for handling non-media files in `src/libs/ReportUtils.ts`. Instead of using a generic uploading message, we now present a link to the file for better user experience.
  • Loading branch information
kidroca committed Jul 12, 2024
commit cce5e7e95f927ef328f3c75c4068dee8a81a9d9c
4 changes: 2 additions & 2 deletions src/libs/ReportUtils.ts
Original file line number Diff line number Diff line change
@@ -3708,8 +3708,8 @@ function getUploadingAttachmentHtml(file?: FileObject): string {
} else if (file.type?.startsWith('video')) {
return `<video src="${file.source}" data-optimistic-src="${file.source}">${file.name}</video>`;
} else {
// For all other types, a generic preview or message is presented. If applicable, a document preview is generated on the backend.
return CONST.ATTACHMENT_UPLOADING_MESSAGE_HTML;
// For all other types, we present a generic preview
return `<a href="${file.source}" data-expensify-source="${file.source}">${file.name}</a>`;
}
}