-
Notifications
You must be signed in to change notification settings - Fork 3k
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-02-07] [$500] Chat - When user goes offline, the download button do not disappear for other file types #35200
Comments
Job added to Upwork: https://www.upwork.com/jobs/~01c2f068b75b4b0950 |
Triggered auto assignment to @garrettmknight ( |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @ishpaul777 ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.Chat - When user goes offline, the download button do not disappear for other file types What is the root cause of that problem?We don't have logic to make download button disappear inside What changes do you think we should make in order to solve the problem?We need to pass App/src/components/AnchorForAttachmentsOnly/BaseAnchorForAttachmentsOnly.tsx Lines 41 to 44 in 8cc80e6
To: if (isDownloading || isOffline) {
return;
}
To: shouldShowDownloadIcon={!isOffline}
Note: Even if we decide to fix it in Also, we already handle App/src/components/AttachmentModal.js Line 447 in 919aadb
App/src/components/AttachmentModal.js Line 474 in 919aadb
App/src/pages/wallet/WalletStatementPage.js Line 104 in 919aadb
We can also show default cursor when user is offline, we can do it by overriding the cursor style or by editing ResultAlternativeWe can only disable download without hiding the download icon. We can wrap it with |
ProposalPlease re-state the problem that we are trying to solve in this issue.When user goes offline, the download button do not disappear for other file types What is the root cause of that problem?we dont disable download for the attachment view when offline here: App/src/components/AnchorForAttachmentsOnly/BaseAnchorForAttachmentsOnly.tsx Lines 55 to 61 in 9f6179a
What changes do you think we should make in order to solve the problem?we need to use <AttachmentView
// @ts-expect-error TODO: Remove this once AttachmentView (https://github.com/Expensify/App/issues/25150) is migrated to TypeScript.
source={sourceURLWithAuth}
file={{name: displayName}}
shouldShowDownloadIcon={!isOffline}
shouldShowLoadingSpinnerIcon={isDownloading && !isOffline}
/> Alternatively:we can update the attachmentView itself so that it doesnt show the icon whenever the connection is offline we need to change this line to {!shouldShowLoadingSpinnerIcon && shouldShowDownloadIcon && !isOffline && ( and this one as well to: {shouldShowLoadingSpinnerIcon && !isOffline && ( |
Proposal UpdatedAdded code snippets. |
ProposalPlease re-state the problem that we are trying to solve in this issue.The download button does not disappear when the user goes offline What is the root cause of that problem?We do not hide/disable download button when the network is offline What changes do you think we should make in order to solve the problem?This problem happens in many places that we need to fix all
What alternative solutions did you explore? (Optional)NA |
Proposal UpdatedAdded a note if we decide to fix it in |
Thank you everyone for proposal, its seems all cases are handled except for Message attachemnents. @Krishna2323's Proposal looks good, just a quick question should the cursor still be pointer, if the component is not interactable when offline? Screen.Recording.2024-01-26.at.7.22.23.PM.mov |
@ishpaul777, if we want, we can override the hand cursor by passing extra style or changing the role on |
Cool, Can you please update you proposal to add that.. |
Done. |
Thanks! @Krishna2323 Proposal LGTM! #35200 (comment) 🎀 👀 🎀 C+ reviewed |
Triggered auto assignment to @bondydaa, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
📣 @ishpaul777 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app! |
📣 @Krishna2323 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
@Krishna2323 all you - let us know when your PR will be up! |
PR will be up today. |
@ishpaul777, PR ready for review. |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.34-1 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-02-07. 🎊 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:
|
This was a issue since the anchor render introduced at first 2 years ago - #10144 Not a impactful bug so i dont think we need regression test for this. |
Paid out, closing. |
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.32-2
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:
Pre-requisite: the user must be logged in and have sent an attachment that is not an image or PDF, such as .mp4 or .doc files
Expected Result:
The download button for other type of files should disappear, as it does for images and PDF
Actual Result:
The download button does not disappear when the user goes offline
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6355191_1706220113373.Twhp0840_1_.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: