Fix - Attachment page keeps on loading infinitely.#39290
Conversation
|
@shawnborton I want You to confirm some graphics staff before I proceed. |
cc @Expensify/design (particularly @dannymcclain ) but I think we already have a pattern for this, right? We just show a little broken cloud image, not the full text empty state like you are showing. Can you test this as it already exists today and report back? |
|
@shawnborton agree 100%. Here's the mock we used when establishing that pattern—I just can't remember if we decided to go with the |
|
Dope, I knew we had somethin' - thanks for sharing! |
|
@shawnborton Here is how it looks for preview and attachement view for web and also mobile. Need confirmation from U before finalizing. |
|
Looks good to me, and just to confirm, the only behavior you changed was in the actual attachment modal view itself right? |
|
Just going back to this question here:
Do we actually need to implement anything new here, or do we already have the patterns that Danny shared implemented? |
yep.
What danny refered is the one U guys implemented for preview of loading failed receipt so technically I had to do similar thing for attachement preview but graphically it is the same as U saw it in the snapshot it's just OfflineCloud Icon centered in the preview box and I think U are ok with what u saw in the snapshots. |
|
Ok Thx. And also when I make the PR ready I will notify U guys to take a look at the final snapshots 👍 |
|
@shawnborton @dannymcclain I have updated the icon color and also bg as indicated in your snapshots and now it looks like this, do you approve??? 2024-04-05.22-48-34.mp4 |
|
I think that looks right to me, but let's see what @dannymcclain thinks |
|
Yeah I think that looks good 👍 |
|
Mostly looks good and the issue is fixed. Just a small improvement we can make when uploading the attachment offline. Screen.Recording.2024-04-30.at.16.00.35.mp4As you can see in the video, the offline caption is showing for a moment before it shows the image. What currently happens in the production is it's showing the loading indicator. The bevahior in the production looks fine, but showing the offline caption is weird to me. So probably we can either not show the offline caption or show the loading indicator. We might need a designer's opinion on the expected behavior @shawnborton |
|
Yeah, good catch on that - I agree the quick flash is weird, so perhaps we just show the loading indicator there for that quick moment or nothing at all. |
|
👋 Just wondering if this PR fixes this issue: #16694 CC: @Beamanator |
|
@mollfpr last bug is fixed. You can proceed. |
|
Thanks @FitseTLT! I will review and test shortly. |
Reviewer Checklist
Screenshots/VideosAndroid: Native39290.Android.movAndroid: mWeb Chrome39290.mWeb-Chrome.mp4iOS: Native39290.iOS.moviOS: mWeb Safari39290.mWeb-Safari.movMacOS: Chrome / Safari39290.Web.mp4MacOS: Desktop39290.Desktop.mp4 |
|
@mollfpr @FitseTLT can you answer this, please? #39290 (comment) |
|
@trjExpensify Sorry I miss the comment, I'll check it now. |
|
@marcochavezf Can we merge this? |
|
Yesterday, the PR reviewer check was stuck, but now it's passing. Merging |
|
✋ 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/marcochavezf in version: 1.4.74-0 🚀
|
|
🚀 Deployed to production by https://github.com/chiragsalian in version: 1.4.74-6 🚀
|
| /> | ||
| {(isLoading || zoomScale === 0) && <FullscreenLoadingIndicator style={[styles.opacity1, styles.bgTransparent]} />} | ||
| {((isLoading && !isOffline) || (!isLoading && zoomScale === 0)) && <FullscreenLoadingIndicator style={[styles.opacity1, styles.bgTransparent]} />} | ||
| {isLoading && <AttachmentOfflineIndicator />} |
There was a problem hiding this comment.
We should have also checked if the file is a localfile in case of offline upload, this caused #42657
There was a problem hiding this comment.
We should have also checked if cached image is preloading when offline. #75095 (comment)








Details
Fixed Issues
$ #35502
PROPOSAL: #35502 (comment)
Tests
Alternatively for platforms where it is hard to clear the cache, easier way to test would be: send attachments from one user to another and on the receiving side without opening the chat (as the image will load if you open it) when you see the attachment message is received (of course by seeing the boldness) disconnect your device's connection and open the chat 👍
Offline tests
same here
QA Steps
same here
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.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
nat.mp4
Android: mWeb Chrome
2024-04-11.15-50-48.mp4
iOS: Native
2024-04-15.14-50-46.mp4
iOS: mWeb Safari
ios.web.mp4
MacOS: Chrome / Safari
web.mp4
MacOS: Desktop
desk.mp4