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

[$100] Attachment - Chat blinks when txt attachment is uploaded #48697

Open
3 of 6 tasks
IuliiaHerets opened this issue Sep 6, 2024 · 31 comments
Open
3 of 6 tasks

[$100] Attachment - Chat blinks when txt attachment is uploaded #48697

IuliiaHerets opened this issue Sep 6, 2024 · 31 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2

Comments

@IuliiaHerets
Copy link

IuliiaHerets commented Sep 6, 2024

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: 9.0.30-7
Reproducible in staging?: Y
Reproducible in production?: Y
Issue was found when executing this PR: #47778
Issue reported by: Applause Internal Team

Action Performed:

  1. Log in with a Gmail account
  2. Open any 1:1 chat
  3. Send a txt attachment

Expected Result:

It shouldn't blink.

Actual Result:

Chat blinks when txt attachment is uploaded.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug6594960_1725596733523.OIMT0425.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021833566073242365431
  • Upwork Job ID: 1833566073242365431
  • Last Price Increase: 2024-09-27
  • Automatic offers:
    • nkdengineer | Contributor | 104162747
Issue OwnerCurrent Issue Owner: @getusha
@IuliiaHerets IuliiaHerets added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Sep 6, 2024
Copy link

melvin-bot bot commented Sep 6, 2024

Triggered auto assignment to @isabelastisser (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.

@IuliiaHerets
Copy link
Author

@isabelastisser FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors

@melvin-bot melvin-bot bot added the Overdue label Sep 9, 2024
@isabelastisser
Copy link
Contributor

review by EOD

@melvin-bot melvin-bot bot removed the Overdue label Sep 9, 2024
@isabelastisser isabelastisser added External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors labels Sep 10, 2024
@melvin-bot melvin-bot bot changed the title Attachment - Chat blinks when txt attachment is uploaded [$250] Attachment - Chat blinks when txt attachment is uploaded Sep 10, 2024
Copy link

melvin-bot bot commented Sep 10, 2024

Job added to Upwork: https://www.upwork.com/jobs/~021833566073242365431

Copy link

melvin-bot bot commented Sep 10, 2024

Triggered auto assignment to Contributor-plus team member for initial proposal review - @getusha (External)

@nkdengineer
Copy link
Contributor

Proposal

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

Chat blinks when txt attachment is uploaded.

What is the root cause of that problem?

We get the download data via withOnyx. It's an old HOC and can affect some weird lifecycle component bugs. As in this case, BaseAnchorForAttachmentsOnly disappears and appears again after the API is complete.

export default withOnyx<BaseAnchorForAttachmentsOnlyProps, BaseAnchorForAttachmentsOnlyOnyxProps>({
download: {
key: ({source}) => {
const sourceID = (source?.match(CONST.REGEX.ATTACHMENT_ID) ?? [])[1];

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

We should remove withOnyx in this component and use useOnyx to get the download data

const [download] = useOnyx(`${ONYXKEYS.COLLECTION.DOWNLOAD}${sourceID}`);

export default withOnyx<BaseAnchorForAttachmentsOnlyProps, BaseAnchorForAttachmentsOnlyOnyxProps>({
download: {
key: ({source}) => {
const sourceID = (source?.match(CONST.REGEX.ATTACHMENT_ID) ?? [])[1];

What alternative solutions did you explore? (Optional)

NA

Result

Screen.Recording.2024-09-11.at.12.34.21.mov

@isabelastisser
Copy link
Contributor

@getusha, can you please review the proposal above? thanks!

Copy link

melvin-bot bot commented Sep 13, 2024

@isabelastisser, @getusha Whoops! This issue is 2 days overdue. Let's get this updated quick!

@melvin-bot melvin-bot bot added the Overdue label Sep 13, 2024
@isabelastisser
Copy link
Contributor

Hey @getusha, any updates?

@getusha
Copy link
Contributor

getusha commented Sep 15, 2024

@nkdengineer what about this line?

const sourceID = (source?.match(CONST.REGEX.ATTACHMENT_ID) ?? [])[1];

seems like we are not directly using the value

@melvin-bot melvin-bot bot removed the Overdue label Sep 15, 2024
@nkdengineer
Copy link
Contributor

@getusha What do you mean? When we remove withOnyx, we also remove this line and we already get the sourceID in the component.

@getusha
Copy link
Contributor

getusha commented Sep 15, 2024

oh yeah you're right

@getusha
Copy link
Contributor

getusha commented Sep 16, 2024

@nkdengineer could you test this on latest main? seems like uploading txt file isn't working on android & ios mweb

@nkdengineer
Copy link
Contributor

@getusha I still able to upload the txt file for Android app and web on the latest main.

Screen.Recording.2024-09-16.at.16.45.31.mov
Screen.Recording.2024-09-16.at.16.44.31.mov

Copy link

melvin-bot bot commented Sep 17, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@isabelastisser
Copy link
Contributor

@getusha, can you please follow up on the comment above and provide an update? Thanks!

Copy link

melvin-bot bot commented Sep 20, 2024

@isabelastisser @getusha this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

@isabelastisser
Copy link
Contributor

isabelastisser commented Sep 23, 2024

Bump @getusha for an update. Thanks!

@melvin-bot melvin-bot bot added the Overdue label Sep 23, 2024
@getusha
Copy link
Contributor

getusha commented Sep 24, 2024

Reviewing

@melvin-bot melvin-bot bot removed the Overdue label Sep 24, 2024
@getusha
Copy link
Contributor

getusha commented Sep 24, 2024

I was able to reproduce this, i think we should adjust the price of this issue to $100 since withOnyx to useOnyx migration issues are priced that range. @nkdengineer's proposal looks good to me
🎀 👀 🎀 C+ Reviewed.

Copy link

melvin-bot bot commented Sep 24, 2024

Triggered auto assignment to @MonilBhavsar, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@nkdengineer
Copy link
Contributor

@getusha Thanks for your review. Here is my opinion: because this bug isn't a normal migration task, it takes more effort to find the RCA of the issue. Then let us keep the price.

@nkdengineer
Copy link
Contributor

@MonilBhavsar Please look at this comment #48697 (comment) to move forward with this issue, thanks.

@melvin-bot melvin-bot bot added the Overdue label Sep 27, 2024
@MonilBhavsar
Copy link
Contributor

Let's do it 👍

@MonilBhavsar MonilBhavsar changed the title [$250] Attachment - Chat blinks when txt attachment is uploaded [$100] Attachment - Chat blinks when txt attachment is uploaded Sep 27, 2024
Copy link

melvin-bot bot commented Sep 27, 2024

Upwork job price has been updated to $100

@MonilBhavsar
Copy link
Contributor

I have updated the price cc @isabelastisser

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Sep 27, 2024
Copy link

melvin-bot bot commented Sep 27, 2024

📣 @nkdengineer 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

Copy link

melvin-bot bot commented Sep 30, 2024

@isabelastisser, @MonilBhavsar, @getusha, @nkdengineer Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@melvin-bot melvin-bot bot added Overdue Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 Overdue labels Sep 30, 2024
@nkdengineer
Copy link
Contributor

@getusha this PR is ready for review

@isabelastisser
Copy link
Contributor

@getusha, can you please provide an update? Thanks!

@getusha
Copy link
Contributor

getusha commented Oct 3, 2024

Reviewing the PR, will complete it in short.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2
Projects
Status: Done
Development

No branches or pull requests

5 participants