refactor: Improve and simplify attachment and file validation#70740
refactor: Improve and simplify attachment and file validation#70740chrispader wants to merge 50 commits intoExpensify:mainfrom
Conversation
144cac3 to
cfa1db5
Compare
cfa1db5 to
a058146
Compare
|
Nice! thanks! |
|
@cristipaval Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ff9c18c7f4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
No product review needed |
Screenshots🔲 iOS / native🔲 iOS / Safari🔲 MacOS / Chrome🔲 Android / Chrome🔲 Android / native |
src/pages/inbox/report/ReportActionCompose/useAttachmentUploadValidation.ts
Show resolved
Hide resolved
|
@parasharrajat seems like ready for your review again |
|
@parasharrajat as mentioned in #84423 (comment), this PR is going to fix some of the issues that you mentioned in #84423 and that are also reproducible on main. Here' is a recording of the same flow, that was failing in #84423, but works just fine in this PR: Screen.Recording.2026-03-09.at.12.45.10.mov |
|
BUG: Web: Are able to load corrupted PDF |
|
BUG: Web: Add attachment modal show forever loader when we are uploading 104 MB vid. So it seems that vid shows after some time, may it was downsizing but when I sent this as a comment. we receive backend error. |
|
BUG: web: I am able to send json/video file as a receipt via drag and drop. |
|
Overall, it seems that validations are not working across attachment and receipts. |
|
@parasharrajat i'm checking again! |
|
@parasharrajat i made a bunch of changes and now the validation works smoothly. Note that the In a follow-up, we might want to integrate this error message into the collected errors in Here's a screen recording including multiple PDFs, images, HEIC files, large images to resize, videos: validation.webm |
@mountiny @parasharrajat
Explanation of Change
This extracts some of the changes to attachment validation made in #69523.
Fixed Issues
$ #53493
PROPOSAL:
Tests
Offline tests
None needed.
QA Steps
Same as in Tests.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop