Skip to content
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-11-05] [$250] Chat - File does not appear with strikethrough style when uploaded offline and deleted #46616

Closed
6 tasks done
m-natarajan opened this issue Jul 31, 2024 · 72 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Design Engineering External Added to denote the issue can be worked on by a contributor

Comments

@m-natarajan
Copy link

m-natarajan commented Jul 31, 2024

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: 9.0.15-4
Reproducible in staging?: y
Reproducible in production?: no, production has different behavior
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:

  1. Go to staging.new.expensify.com
  2. Go to any chat.
  3. Go offline.
  4. Upload a file.
  5. Right click on the file.
  6. Click Delete comment.

Expected Result:

The file will appear with strikethrough style when deleted offline (production behavior).

Actual Result:

The file does not appear with strikethrough style when deleted offline.

Workaround:

unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6558583_1722458558630.offline_upload.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @OfstadC
Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01f435ef631a03057d
  • Upwork Job ID: 1825625197125448253
  • Last Price Increase: 2024-08-19
  • Automatic offers:
    • Krishna2323 | Contributor | 103626009
@m-natarajan m-natarajan added DeployBlockerCash This issue or pull request should block deployment Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. DeployBlocker Indicates it should block deploying the API labels Jul 31, 2024
Copy link

melvin-bot bot commented Jul 31, 2024

Triggered auto assignment to @OfstadC (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

Copy link

melvin-bot bot commented Jul 31, 2024

Triggered auto assignment to @neil-marcellini (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels Jul 31, 2024
Copy link
Contributor

👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

@m-natarajan
Copy link
Author

We think that this bug might be related to #vip-vsb

@roryabraham roryabraham removed the DeployBlocker Indicates it should block deploying the API label Jul 31, 2024
@roryabraham
Copy link
Contributor

cc @kidroca I think this might be related to #44889

Copy link

melvin-bot bot commented Jul 31, 2024

Triggered auto assignment to @dubielzyk-expensify (Design), see these Stack Overflow questions for more details.

@roryabraham
Copy link
Contributor

not sure this needs to be a blocker

@roryabraham
Copy link
Contributor

Curious for design input ... what should we display when you upload an image and then delete it, all offline? What should be the "strikethrough" equivalent for images?

@dubielzyk-expensify
Copy link
Contributor

dubielzyk-expensify commented Jul 31, 2024

Good question. There's a few things we could do:
A) Delete it altogether and not show it
B) Put some sort of visual treatment over it similar to what we do with the offline thumbnail. So something like the mock to the complete right:
CleanShot 2024-08-01 at 09 54 00@2x

I'm leaning B so that we're consistent with the other offline behaviours of strikethroughs etc.

@Krishna2323
Copy link
Contributor

Krishna2323 commented Aug 1, 2024

Proposal

Please re-state the problem that we are trying to solve in this issue.

Chat - File does not appear with strikethrough style when uploaded offline and deleted

What is the root cause of that problem?

We aren't handling deleted state for attachments.

What changes do you think we should make in order to solve the problem?

  • In AnchorRenderer we have the parentStyle which is being used to check if the action is deleted or not, we can pass hasStrikethroughStyle to AnchorForAttachmentsOnly and then to DefaultAttachmentView.

    const hasStrikethroughStyle = 'textDecorationLine' in parentStyle && parentStyle.textDecorationLine === 'line-through';
    const textDecorationLineStyle = hasStrikethroughStyle ? styles.underlineLineThrough : {};

  • In DefaultAttachmentView we can use the prop isDeleted (hasStrikethroughStyle) to apply the line through styles. isDeleted && styles.lineThrough

    <Text style={[styles.textStrong, styles.flexShrink1, styles.breakAll, styles.flexWrap, styles.mw100]}>{fileName}</Text>

  • We can also do the same for image and video renderers. In ImageRenderer we can create a variable isDeleted just like we created that for hasStrikethroughStyle in AnchorRenderer. Then we can pass isDeleted to ThumbnailImage and use that prop in ThumbnailImage to render delete icon when true.

  • We also need to remove isUploading check from AttachmentCommentFragment otherwise the stylings will be only applied when attachment is uploaded and deleted in offline mode.

const htmlContent = styleAsDeleted && isUploading ? `<del>${html}</del>` : html;

Note: Test branch only fixes for attachments and images. We should also check for other components in AttachmentView and should also apply the change for videos if required.

What alternative solutions did you explore? (Optional)

Monosnap.screencast.2024-08-20.02-26-09.copy.mp4

@Krishna2323
Copy link
Contributor

@roryabraham, I don't think this is a regression. The same can be reproduced on production, only difference is that we were showing uploading attachment... text before and now we have a preview for attachments in offline mode also.

production_deleted_attachment.mp4

@roryabraham
Copy link
Contributor

I'm going to demote this to NAB

@roryabraham roryabraham added Daily KSv2 and removed DeployBlockerCash This issue or pull request should block deployment Hourly KSv2 labels Aug 1, 2024
@OfstadC
Copy link
Contributor

OfstadC commented Aug 1, 2024

Reassigning as i'm out tomorrow and Monday

Copy link

melvin-bot bot commented Sep 12, 2024

Triggered auto assignment to @OfstadC (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Sep 12, 2024
@kevinksullivan kevinksullivan self-assigned this Sep 12, 2024
@melvin-bot melvin-bot bot added Weekly KSv2 and removed Daily KSv2 labels Sep 14, 2024
@OfstadC
Copy link
Contributor

OfstadC commented Sep 27, 2024

Looks like there is still active discussion on the PR - so things are still moving along here?

@mananjadhav
Copy link
Collaborator

@neil-marcellini Can you confirm #47971 (comment) ?

@OfstadC
Copy link
Contributor

OfstadC commented Oct 14, 2024

Looks like the PR is still moving along 😄

@mananjadhav
Copy link
Collaborator

Yes I am halfway through the code review (mostly final) and finish the checklist soon.

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Oct 29, 2024
@melvin-bot melvin-bot bot changed the title [$250] Chat - File does not appear with strikethrough style when uploaded offline and deleted [HOLD for payment 2024-11-05] [$250] Chat - File does not appear with strikethrough style when uploaded offline and deleted Oct 29, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Oct 29, 2024
Copy link

melvin-bot bot commented Oct 29, 2024

Reviewing label has been removed, please complete the "BugZero Checklist".

Copy link

melvin-bot bot commented Oct 29, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.54-11 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-11-05. 🎊

For reference, here are some details about the assignees on this issue:

Copy link

melvin-bot bot commented Oct 29, 2024

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:

  • [@mananjadhav] The PR that introduced the bug has been identified. Link to the PR:
  • [@mananjadhav] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
  • [@mananjadhav] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
  • [@mananjadhav] Determine if we should create a regression test for this bug.
  • [@mananjadhav] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
  • [@OfstadC] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@OfstadC
Copy link
Contributor

OfstadC commented Nov 1, 2024

@mananjadhav please complete the checklist before November 5th so I can issue payment - Thank you! 😃

@mananjadhav
Copy link
Collaborator

I would treat this more of a feature request. But I think we should add a regression test for this one.

@OfstadC here's the regression test proposal:

  1. Go to any chat
  2. Upload a file (format: .txt/.html/.zip/)
  3. Upload image & video
  4. Go offline
  5. Right click on the file
  6. Click Delete comment
  7. Verify an overlay with trash icon is shown for deleted video & image and the filename is crossed for the other file. (format: .txt/.html/.zip/)
  8. Stay offline and repeat step 2 to 7

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Nov 4, 2024
@OfstadC
Copy link
Contributor

OfstadC commented Nov 4, 2024

https://github.com/Expensify/Expensify/issues/441632
Will issue payment tomorrow 😃

@mananjadhav
Copy link
Collaborator

Thanks for the update @OfstadC. I'll need a payment summary for this one as I'll request this on NewDot.

@OfstadC
Copy link
Contributor

OfstadC commented Nov 5, 2024

Payment Summary

@OfstadC OfstadC closed this as completed Nov 5, 2024
Copy link

melvin-bot bot commented Nov 5, 2024

@OfstadC @neil-marcellini @dubielzyk-expensify Be sure to fill out the Contact List!

@garrettmknight
Copy link
Contributor

$250 approved for @mananjadhav

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Design Engineering External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests