You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[$500] Chat - Loading animation not shown when open 1:1 Conversation with uncached attachments #32699
Version Number: v1.4.9-0 Reproducible in staging?: Y Reproducible in production?: Y If this was caught during regression testing, add the test name, ID and link from TestRail: Email or phone of affected tester (no customers): Logs:https://stackoverflow.com/c/expensify/questions/4856 Expensify/Expensify Issue URL: Issue reported by: Applause-Internal team Slack conversation: @
Action Performed:
Precondition: user should be signed in
Open the app
Send several type attachments from the other account on main device
Disable internet connection
Open the 1:1 Conversation (attachments should be uncached)
Expected Result:
The attachment previews should be empty with infinite loading indicator because the attachment were uncached and user is offline.
Actual Result:
The attachments should appear in an infinite loading state, indicating they cannot be fetched without an internet connection
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
changed the title [-]Chat - Loading animation not shown when open 1:1 Conversation with uncached attachments[/-][+][$500] Chat - Loading animation not shown when open 1:1 Conversation with uncached attachments[/+]on Dec 7, 2023
This callback will be invoked when load either succeeds or fails
so when the images load fails, isLoading is false -> there's no loading indicator
What changes do you think we should make in order to solve the problem?
Solution 1: Show the loading for all error images
We should move this logic to imageLoadedSuccessfully
then trigger onLoad when network.isOffline is false
useEffect(() => {
// If an onLoad callback was specified then manually call it and pass
// the natural image dimensions to match the native API
if (onLoad == null || isOffline) {
return;
}
RNImage.getSize(source.uri, (width, height) => {
onLoad({nativeEvent: {width, height}});
});
}, [onLoad, source, isOffline]);
And update other components that faces this issue as well
Solution 2: Show the loading for the error images while offline
Do the same as the solution 1, but in onError we should add the logic to handle error image
const onError = () => {
Log.hmmm('Unable to fetch image to calculate size', {url});
if(isOffline){
return;
}
setIsLoading(false);
setIsImageCached(true);
};
Activity
melvin-bot commentedon Dec 7, 2023
Triggered auto assignment to @JmillsExpensify (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.[-]Chat - Loading animation not shown when open 1:1 Conversation with uncached attachments[/-][+][$500] Chat - Loading animation not shown when open 1:1 Conversation with uncached attachments[/+]melvin-bot commentedon Dec 7, 2023
Job added to Upwork: https://www.upwork.com/jobs/~01d5ec534790c61159
melvin-bot commentedon Dec 7, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)melvin-bot commentedon Dec 7, 2023
Triggered auto assignment to Contributor-plus team member for initial proposal review - @getusha (
External)ikevin127 commentedon Dec 7, 2023
tienifr commentedon Dec 8, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue
Chat - Loading animation not shown when open 1:1 Conversation with uncached attachments
What is the root cause of that problem?
We're using
isLoadingandisImageCachedto show the loadingApp/src/components/ImageWithSizeCalculation.tsx
Line 85 in dc04524
but we update these states in
onLoadEndcallbackApp/src/components/ImageWithSizeCalculation.tsx
Line 78 in dc04524
This callback will be invoked when load either succeeds or fails
so when the images load fails,
isLoadingis false -> there's no loading indicatorWhat changes do you think we should make in order to solve the problem?
Solution 1: Show the loading for all error images
We should move this logic to
imageLoadedSuccessfullythen trigger onLoad when network.isOffline is false
And update other components that faces this issue as well
Solution 2: Show the loading for the error images while offline
Do the same as the solution 1, but in
onErrorwe should add the logic to handle error imageResult
Screen.Recording.2023-12-08.at.11.46.02.mov
ikevin127 commentedon Dec 8, 2023
Cannot reproduce the issue following the given steps.
104 remaining items
MelvinBot commentedon Aug 14, 2024
This has been labelled "Needs Reproduction". Follow the steps here: https://stackoverflowteams.com/c/expensify/questions/16989
mallenexpensify commentedon Aug 14, 2024
Assigned myself as the owner and bumping to weekly pending when payment due on the below
getusha commentedon Aug 19, 2024
@mallenexpensify could you end the UW contract? ty!
mallenexpensify commentedon Aug 19, 2024
Done, contract ended @getusha
getusha commentedon Aug 24, 2024
@mallenexpensify the contract ended but strangely i didn't receive the payment
mallenexpensify commentedon Aug 26, 2024
All set @getusha , sorry about that

Updated the payment post above too.