Skip to content

[HOLD for payment 2024-06-11] [$250] Chat - Emoji is deleted if entered quickly after some text #41778

Closed

Description

@izarutskaya

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

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on May 7, 2024
  2. melvin-bot commented on May 7, 2024

    @melvin-bot

    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.

  3. izarutskaya commented on May 7, 2024

    @izarutskaya
    Author

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

  4. trjExpensify commented on May 7, 2024

    @trjExpensify
    Contributor

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

  5. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on May 7, 2024
  6. changed the title [-]Chat - Emoji is deleted if entered quickly after some text[/-] [+][$250] Chat - Emoji is deleted if entered quickly after some text[/+] on May 7, 2024
  7. melvin-bot commented on May 7, 2024

    @melvin-bot
  8. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on May 7, 2024
  9. melvin-bot commented on May 7, 2024

    @melvin-bot

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

  10. roitman-g commented on May 9, 2024

    @roitman-g
    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

  11. melvin-bot commented on May 10, 2024

    @melvin-bot

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

  12. 35 remaining items

  13. hungvu193 commented on Jun 11, 2024

    @hungvu193
    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 👎 ?
  14. trjExpensify commented on Jun 11, 2024

    @trjExpensify
    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?

  15. hungvu193 commented on Jun 11, 2024

    @hungvu193
    Contributor

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

  16. roitman-g commented on Jun 12, 2024

    @roitman-g
    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?

  17. trjExpensify commented on Jun 13, 2024

    @trjExpensify
    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? 😕

  18. iwiznia commented on Jun 17, 2024

    @iwiznia
    Contributor

    Anything else to do here?

  19. trjExpensify commented on Jun 18, 2024

    @trjExpensify
    Contributor

    @roitman-g can you confirm on this?

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

  20. roitman-g commented on Jun 19, 2024

    @roitman-g
    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?

  21. trjExpensify commented on Jun 19, 2024

    @trjExpensify
    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.

  22. trjExpensify commented on Jun 20, 2024

    @trjExpensify
    Contributor

    Paid, closing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions