-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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 2023-06-12] [$1000] Console error on clicking on download icon on deleted message #19413
Comments
Triggered auto assignment to @joekaufmanexpensify ( |
Bug0 Triage Checklist (Main S/O)
|
📣 @bogoroh! 📣
|
Contributor details |
|
Contributor details |
✅ Contributor details stored successfully. Thank you for contributing to Expensify! |
ProposalPlease re-state the problem that we are trying to solve in this issue.Console error on trying to download the deleted attachment What is the root cause of that problem?On deleting the attachment we are cleaning the App/src/pages/home/report/ContextMenu/ContextMenuActions.js Lines 94 to 99 in 846d593
What changes do you think we should make in order to solve the problem?We should not show the delete option in the context actions as the image url is being removed from the
|
ProposalPlease re-state the problem that we are trying to solve in this issue.Console error on clicking on download icon on deleted message What is the root cause of that problem?When we deleted the attachment thread message, we remove the text and html. So when we tried to download the deleted attachment, it will be crashed since
What changes do you think we should make in order to solve the problem?Since const isAttachment = ReportUtils.isReportMessageAttachment(message);
// Optional: we can also update isReportMessageAttachment
export default function isReportMessageAttachment({text, html, isDeletedParentAction}) {
if (isDeletedParentAction || !text || !html) {
return false;
}
const regex = new RegExp(` ${CONST.ATTACHMENT_SOURCE_ATTRIBUTE}="(.*)"`, 'i');
return text === CONST.ATTACHMENT_MESSAGE_TEXT && !!html.match(regex);
} What alternative solutions did you explore? (Optional)We can also still allow the download button with deleted attachment, but we should add an early return and showing an error for user to let them know, this attachment is no longer exist, they can't download them: // inside onPress function
const {originalFileName, sourceURL} = attachmentDetails;
if (!sourceURL) {
Grow.show(' this attachment is no longer exist'....);
hideContextMenu(true, ReportActionComposeFocusManager.focus);
} |
ProposalPlease re-state the problem that we are trying to solve in this issue.Console error on trying to download the deleted attachment What is the root cause of that problem?When click the download on deleting the attachment, sourceURL will be What changes do you think we should make in order to solve the problem?In fact, the tooltip part should not be shown for deleted attachments and deleted messages like Slack and other chatting apps.
We can implement that functionality based on whether the message or attachment is deleted. |
I was able to reproduce this on web. However, the bug here isn't the console error IMO. It's that we show a download icon after deleting the image. We shouldn't show this. Also, this doesn't just apply to workspaces. It applies to any type of message in the app. Cleaned up the reproduction steps to reflect this. |
Job added to Upwork: https://www.upwork.com/jobs/~01f8f88bf5b41b887d |
Current assignee @joekaufmanexpensify is eligible for the External assigner, not assigning anyone new. |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @0xmiroslav ( |
Triggered auto assignment to @bondydaa ( |
@0xmiroslav could you please review the above proposals when you have a chance? |
reviewing now |
It doesn't make sense at all to show these icons since deleted attachment is not downloadable, copiable or deletable. |
📣 @victornnaji! 📣
|
I think no problem with it. |
I merged the PR today so should get deployed soon, maybe tomorrow or next week. i haven't kept up with our deploy status this week. |
@jliexpensify I'm back from OOO, so removing your assignment. Thanks for covering! |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.23-7 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 2023-06-12. 🎊 After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.
As a reminder, here are the bonuses/penalties that should be applied for any External 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:
|
@0xmiroslav Could you please complete your steps for the C+ checklist? Then, we can issue payment here. |
No PRs caused regression but this case was missed while implementing thread feature. I think regression test needs to be migrated into #20074 which handles all context menu actions, not only download icon. |
@0xmiroslav Isn't that issue just for regular messages though? Vs this being images specifically. I agree they are related, but it feels like a slightly different case. Or do you mean just have the image case as a 1b regression test to the 1a in the above linked issue? |
@joekaufmanexpensify that issue about parent [Deleted message] in thread. Same as this GH. |
It's not the same exact case though, no? Since this issue is specifically with images and the download button. And that one seems to be just text messages generally, and then other buttons on the clipboard menu. But LMK if that's not correct! |
So comprehensive regression test step will be:
|
@bogoroh was assigned to this issue on May 29th at 10:49am ET. The PR was merged on June 1st at 12:50pm ET. This is slightly longer than 72 hours. However, @0xmiroslav approved the PR's changes on May 30th (which was considerably less than 72 hours.) We then approved the PR and merged it (without requesting any other changes). @bondydaa and I chatted, and since the delay that pushed this past the 72 hour mark was internal, this still qualifies for a speed bonus. So we need to issue these payments:
|
Cool those steps makes sense. I commented them on the other issue to save them the work: #20074 (comment) |
BZ checklist is complete, all set to issue payment here! |
@bogoroh $1,500 sent and contract ended! |
@priya-zha $250 sent and contract ended! |
@0xmiroslav $1,500 sent and contract ended! |
Upwork job closed. |
Bug is fixed, BZ checklist complete, and all payment issued. Closing as this is all set. Thanks everyone! |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Action Performed:
Expected Result:
We shouldn't show download option after deleting a message.
Actual Result:
We show option to download the image after the image is deleted.
Workaround:
Can the user still use Expensify without this being fixed? Have you informed them of the workaround?
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.3.16.7
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
Notes/Photos/Videos: Any additional supporting documentation
error-2023-05-19_15.23.30.mp4
Recording.720.mp4
Expensify/Expensify Issue URL:
Issue reported by: @priya-zha
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1684489220942129
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: