fix: Prevent previewing large files before upload and show appropriate message#72347
Conversation
| const getHighResolutionInfoWrapperStyle: GetHighResolutionInfoWrapperStyle = (isUploaded) => ({ | ||
| ...spacing.ph5, | ||
| ...spacing.pt5, | ||
| ...(isUploaded ? spacing.pb5 : spacing.mbn1), |
There was a problem hiding this comment.
What are these style changes for?
There was a problem hiding this comment.
@Ollyws The text was cut off at the bottom with mbn1 on all platforms.
|
Looking good from a visual perspective. cc @Expensify/design for extra eyes |
Reviewer Checklist
Screenshots/Videos |
|
Yeah good catch! Glad you caught that. Must've not clicked into Hybrid iOS. Should look like the others. |
|
@shawnborton Thanks for clarifying! But I’m not entirely sure I follow what you meant about the padding/negative space, could you please share a mock of how it should look? |
|
@samranahm can you please take a look? |
|
Ahh, that totally make sense now. Resolving it ASAP |
@shawnborton for visibility please |
|
Much better, thank you! |
|
@luacmartins All yours |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/luacmartins in version: 9.2.32-0 🚀
|
|
🚀 Deployed to production by https://github.com/mountiny in version: 9.2.32-6 🚀
|









Explanation of Change
Fixed Issues
$ #71598
PROPOSAL: #71598 (comment)
Tests
Open a chat and click + to send attachment
Choose Send attachment and select a large size image (you can use link bellow to download one)
Verify images does not show in preview before upload and correct message is displayed
"This image is too large to preview before uploading."
Offline tests
QA Steps
Same as tests
// TODO: These must be filled out, or the issue title must include "[No QA]."
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))npm run compress-svg)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.Native.mp4
Android: mWeb Chrome
Android.mWeb.chrome.mp4
iOS: Native
IOS.Native.mp4
iOS: mWeb Safari
IOS.mWeb.safari.mp4
MacOS: Chrome / Safari
macOS.chrome.mp4
MacOS: Desktop
Desktop.mp4