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-06-11] [$250] Chat - Emoji is deleted if entered quickly after some text #41778

Closed
1 of 6 tasks
izarutskaya opened this issue May 7, 2024 · 37 comments
Closed
1 of 6 tasks
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor

Comments

@izarutskaya
Copy link

izarutskaya commented May 7, 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: v1.4.71-0
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/4544514
Email or phone of affected tester (no customers): vdargentotest+ios050724@gmail.com
Logs: https://stackoverflow.com/c/expensify/questions/4856
Issue reported by: Applause-Internal team

Action Performed:

Pre-requisite: user must be logged in.

  1. Go to any chat.
  2. Tap on the compose box.
  3. Enter any text but do not send the message.
  4. Tap on the emoji picker and quickly select any emoji. (Note: don't add a space between the word and the emoji)
  5. Verify it appears for a moment on the compose box, but suddenly disappears.

Expected Result:

The selected emoji should remain on the compose box.

Actual Result:

The selected emoji is displayed for a moment, but suddenly disappears.

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

Bug6473896_1715096211593.Tjqj0461_1_.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01f96963f235e9c546
  • Upwork Job ID: 1787904276326506496
  • Last Price Increase: 2024-05-07
  • Automatic offers:
    • hungvu193 | Reviewer | 0
Issue OwnerCurrent Issue Owner: @trjExpensify
@izarutskaya izarutskaya added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels May 7, 2024
Copy link

melvin-bot bot commented May 7, 2024

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

@izarutskaya
Copy link
Author

We think this issue might be related to the #vip-vsb.

@trjExpensify
Copy link
Contributor

I can reproduce this. You have to add the emoji to the end of the text with no space for it to disappear.

@trjExpensify trjExpensify added the External Added to denote the issue can be worked on by a contributor label May 7, 2024
@melvin-bot melvin-bot bot changed the title Chat - Emoji is deleted if entered quickly after some text [$250] Chat - Emoji is deleted if entered quickly after some text May 7, 2024
Copy link

melvin-bot bot commented May 7, 2024

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label May 7, 2024
Copy link

melvin-bot bot commented May 7, 2024

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

@roitman-g
Copy link
Contributor

Proposal

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

When you enter some text (it can also be space in the end) and then insert an emoji in less than a second after finishing typing, the emoji is being removed. This also can be reproduced in any other platform, just be quick.

What is the root cause of that problem?

In "ComposerWithSuggestions" component "updateComment" function a comment update with regular text is saved with the debounced function, while comment update with emoji is not. So what happens is first the comment with the emoji is being saved and then the debounced function is being invoked with the old value, reverting the comment to the previous non-emoji state.

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

There are two way to solve this issue.

  1. Either adding debouncedSaveReportComment.flush() line of code when updating the comment with the emoji in "updateComment" function. This will invoke the debounced function before the emoji insertion.
  2. Or save emoji with debounced function. So updateComment(ComposerUtils.insertText(commentRef.current, selection, text), true); in "replaceSelectionWithText" function. This will update the debounced function and invoke it with the correct value.

What alternative solutions did you explore? (Optional)

N/A

Copy link

melvin-bot bot commented May 10, 2024

@trjExpensify, @hungvu193 Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@melvin-bot melvin-bot bot added the Overdue label May 10, 2024
@hungvu193
Copy link
Contributor

I'll review it tmr

@melvin-bot melvin-bot bot removed the Overdue label May 11, 2024
@hungvu193
Copy link
Contributor

Thanks @roitman-g, your proposal makes sense to me, do you know which PR cause this issue?

@roitman-g
Copy link
Contributor

Thanks @roitman-g, your proposal makes sense to me, do you know which PR cause this issue?

I am not sure, the bug was probably introduced the same time the emoji insertion functionality and debounced comment caching was first written. But it is very difficult to follow the commits back to that place, since these lines were overwritten by many different commits both for the debounced save draft and emoji insertion.

@hungvu193
Copy link
Contributor

@roitman-g 's proposal here looks good to me. I'd prefer the first solution. 🎀 👀 🎀 C+ reviewed

Copy link

melvin-bot bot commented May 14, 2024

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

@iwiznia
Copy link
Contributor

iwiznia commented May 14, 2024

Hmmmm curious why you think first solution is better than the 2nd one @hungvu193, it seems to me like comment with or without emoji should be saved debounced so that any comment works the same way....
Also @roitman-g which one do you think is better and why?

@hungvu193
Copy link
Contributor

Yeah, it's just my opinion because we can't enter many emojis at the same time so we don't need to debounce it like we did with comments

@roitman-g
Copy link
Contributor

I would go with the second, it seems simpler. What if the app is changed so that many emojis can be inserted or any other feature with some other multiple selections is added.

@iwiznia
Copy link
Contributor

iwiznia commented May 15, 2024

You can paste a message with many emojis, no?
But also I agree is simpler and makes it work the same no matter what you write.
Let's go with the second one.

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

melvin-bot bot commented May 15, 2024

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

Offer link
Upwork job

@melvin-bot melvin-bot bot added the Weekly KSv2 label May 18, 2024
@roitman-g
Copy link
Contributor

PR is ready for review

@hungvu193
Copy link
Contributor

PR was approved, waiting for merge freeze over.

@hungvu193
Copy link
Contributor

Same

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Jun 4, 2024
@melvin-bot melvin-bot bot changed the title [$250] Chat - Emoji is deleted if entered quickly after some text [HOLD for payment 2024-06-11] [$250] Chat - Emoji is deleted if entered quickly after some text Jun 4, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jun 4, 2024
Copy link

melvin-bot bot commented Jun 4, 2024

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

Copy link

melvin-bot bot commented Jun 4, 2024

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

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

Copy link

melvin-bot bot commented Jun 4, 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:

  • [@hungvu193] The PR that introduced the bug has been identified. Link to the PR:
  • [@hungvu193] 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:
  • [@hungvu193] 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:
  • [@hungvu193] Determine if we should create a regression test for this bug.
  • [@hungvu193] 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.
  • [@trjExpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Jun 10, 2024
@hungvu193 hungvu193 mentioned this issue Jun 11, 2024
57 tasks
@hungvu193
Copy link
Contributor

  • The PR that introduced the bug has been identified. Link to the PR: Performance: chat input #25758
  • 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: https://github.com/Expensify/App/pull/25758/files#r1634693264
  • 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: N/A
  • Determine if we should create a regression test for this bug: Yes
  • 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.

Regression test:

  1. Open any chat.
  2. Type some text.
  3. Quickly insert some emoji with the help of the app's emoji picker.
  4. Verify the emoji is not deleted after that.
    Do we 👍 or 👎 ?

@trjExpensify
Copy link
Contributor

Thanks, @hungvu193! I don't think we need a standalone regression test for this, it was caught while executing an existing one as per the OP link.

Payment summary as follows:

Hans is paid. @roitman-g, can you send me your Upwork profile please?

@hungvu193
Copy link
Contributor

@trjExpensify can you check upwork again? I think contract was ended without payment
image

@roitman-g
Copy link
Contributor

Thanks, @hungvu193! I don't think we need a standalone regression test for this, it was caught while executing an existing one as per the OP link.

Payment summary as follows:

Hans is paid. @roitman-g, can you send me your Upwork profile please?

May I use this upwork account for this - https://www.upwork.com/freelancers/~0197cfa7f554b66970?

@trjExpensify
Copy link
Contributor

@hungvu193 looks paid to me:

image

May I use this upwork account for this - https://www.upwork.com/freelancers/~0197cfa7f554b66970?

Yeah @roitman-g, if that's your Upwork profile? 😕

@melvin-bot melvin-bot bot added the Overdue label Jun 17, 2024
@iwiznia
Copy link
Contributor

iwiznia commented Jun 17, 2024

Anything else to do here?

@iwiznia iwiznia removed the Overdue label Jun 18, 2024
@melvin-bot melvin-bot bot added the Overdue label Jun 18, 2024
@trjExpensify
Copy link
Contributor

@roitman-g can you confirm on this?

Yeah @roitman-g, if that's your Upwork profile? 😕

@melvin-bot melvin-bot bot removed the Overdue label Jun 18, 2024
@roitman-g
Copy link
Contributor

@roitman-g can you confirm on this?

Yeah @roitman-g, if that's your Upwork profile? 😕

It is not mine, it is my brother's, I need to prepare my documents to verify my upwork. If it needs to be my upwork, can I send it in the next two weeks?

@trjExpensify
Copy link
Contributor

Sounds good, @roitman-g. I've sent an offer to that Upwork profile. Please accept and then I'll pay and close this issue out.

@trjExpensify
Copy link
Contributor

Paid, closing!

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 External Added to denote the issue can be worked on by a contributor
Projects
No open projects
Archived in project
Development

No branches or pull requests

5 participants