-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
[HOLD for payment 2024-01-24] [$500] Attachment - Attachment download option not available in offline but receipt download available #33939
Comments
Job added to Upwork: https://www.upwork.com/jobs/~010f6117214034f596 |
Triggered auto assignment to @jliexpensify ( |
Bug0 Triage Checklist (Main S/O)
|
Triggered auto assignment to Contributor-plus team member for initial proposal review - @alitoshmatov ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.Download option is visible in offline mode inisde the receipt attachment What is the root cause of that problem?the download option inside the threeDotMenu is always pushed regardless of whether the network is offline or not: App/src/components/AttachmentModal.js Lines 383 to 387 in 9f5c3ec
What changes do you think we should make in order to solve the problem?we should add an if condition that the network is if (!isOffline) {
menuItems.push({
icon: Expensicons.Download,
text: props.translate('common.download'),
onSelected: () => downloadAttachment(source),
});
} AlternativelyOR instead, we can already use the value of .. so to preserve consistency we can use it with threedotmenu download option as well : in order to use then use if (shouldShowDownloadButton){
menuItems.push({
icon: Expensicons.Download,
text: props.translate('common.download'),
onSelected: () => downloadAttachment(source),
});
} |
Pinged Dylan here to add to Wave 5 - https://expensify.slack.com/archives/C05DWUDHVK7/p1704411372335989 |
ProposalPlease re-state the problem that we are trying to solve in this issue.Attachment download option not available in offline but receipt download available and there is inconsistency in behaviour. What is the root cause of that problem?We always add the download option for receipt image. App/src/components/AttachmentModal.js Line 391 in 6fad557
What changes do you think we should make in order to solve the problem?We should check if the network is offline and the receipt is a local file or not. We don't need to check this for attachment because when we click on this attachment to open preview, it's already uploaded.
What alternative solutions did you explore? (Optional)NA |
@alitoshmatov bump for reviews please! Essentially, if it's possible to be downloading something whilst offline, we always want to be showing the download icon. Thanks! |
@dukenv0307 Can you explain how would you check if file is available locally? |
@alitoshmatov I mentioned it in the code change of my proposal, Or we can use the same logic as we do here Line 69 in 463b7bc
|
@dukenv0307 They are not working. We also have a case where if receipt is uploaded in offline mode it is downloadable but after refreshing the page the file is not downloadable and it is redirecting to invalid file url. I think the best approach here is to not to show download button when in offline. Screen.Recording.2024-01-08.at.17.25.28.mov |
We can go with @abzokhattab 's proposal We should not show download option when network is offline. C+ reviewed 🎀 👀 🎀 |
Triggered auto assignment to @tgolen, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
@alitoshmatov Actually, we're using a preference force offline for dev testing. In production, if we're offline we cannot reload the App so this case is invalid in production. |
Okay will handle this condition in the PR |
📣 @alitoshmatov 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app! |
📣 @abzokhattab 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.25-10 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue: If no regressions arise, payment will be issued on 2024-01-24. 🎊 For reference, here are some details about the assignees on this issue:
|
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
|
Bump @alitoshmatov to complete the checklist please! Payment Summary
|
|
Paid and job closed! |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: 1.4.21-1
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:
Expected Result:
In offline, download option must be available or not available but behaviour must be consistent throughout the app.
Actual Result:
Attachment download option not available in offline but receipt download available and there is inconsistency in behaviour.
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6331988_1704361873327.67.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: