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

Web - Chat - Emoji is entered twice when entering via Windows OS keyboard #35339

Closed
1 of 6 tasks
kbecciv opened this issue Jan 29, 2024 · 15 comments
Closed
1 of 6 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering

Comments

@kbecciv
Copy link

kbecciv commented Jan 29, 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.33-1
Reproducible in staging?: y
Reproducible in production?: n
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 any chat.
  2. Open Windows OS emoji keyboard via Windows key + "."
  3. Select any emoji.

Expected Result:

Each selection enters emoji once.

Actual Result:

Each selection enters emoji twice.

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

Add any screenshot/video evidence

Bug6360193_1706568193774.bandicam_2024-01-30_06-08-38-851.mp4

View all open jobs on GitHub

@kbecciv kbecciv added the DeployBlockerCash This issue or pull request should block deployment label Jan 29, 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.

Copy link

melvin-bot bot commented Jan 29, 2024

Triggered auto assignment to @jasperhuangg (Engineering), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

@kbecciv
Copy link
Author

kbecciv commented Jan 29, 2024

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

@jasperhuangg
Copy link
Contributor

Unfortunately I don't have a PC that can reproduce this issue–it seems relatively minor and not worth blocking deploy on.

@jasperhuangg jasperhuangg added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. and removed DeployBlockerCash This issue or pull request should block deployment Hourly KSv2 labels Jan 30, 2024
Copy link

melvin-bot bot commented Jan 30, 2024

Triggered auto assignment to @sophiepintoraetz (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@situchan
Copy link
Contributor

I have Windows and reproduced.
@aswin-s can you please check this? This came from #30955

The root cause is that onChangeText is called twice. We should prevent 2nd call.

@aswin-s
Copy link
Contributor

aswin-s commented Jan 31, 2024

@situchan. Sure I'll have a look at this.

@aswin-s
Copy link
Contributor

aswin-s commented Jan 31, 2024

@situchan Here is what I found.

Seems like a quirk with Windows emoji picker. If we append any character to the emoji (whitespace in this case), it triggers a second onChange with the same emoji added again. Also this happens only when the emoji picker is set to stay open. If we change the setting to auto close, it doesn't happen any more.

Also a quick web search reveals some other apps like Discord, Youtube comments also facing same issue. Infact I could reproduce it myself in YouTube comments section.

One way to fix this would be to add a debounce to prevent the duplicate onChange event trigger. The wait time needs to be only as small as 1ms to fix the issue without interfering with regular onChange events.

 const onChangeText = useCallback(
        (commentValue) => {
            const debounced = _.debounce(updateComment, 1, true)
            debounced(commentValue, true);
...
  }
}, [updateComment]);

If this sounds reasonable I'll raise a PR.

@situchan
Copy link
Contributor

situchan commented Feb 1, 2024

I understand there's no straightforward solution but we can also open for better solutions.

@melvin-bot melvin-bot bot added the Overdue label Feb 1, 2024
@sophiepintoraetz sophiepintoraetz added the Help Wanted Apply this label when an issue is open to proposals by contributors label Feb 1, 2024
@sophiepintoraetz
Copy link
Contributor

Adding the help label in case there are other thoughts but @flodnv and @mollfpr, do you have thoughts on @aswin-s's solution, given you reviewed the original PR?

@situchan - do you have capacity to for me to assign you as C+?

@melvin-bot melvin-bot bot removed the Overdue label Feb 1, 2024
@situchan
Copy link
Contributor

situchan commented Feb 1, 2024

@sophiepintoraetz yes, sure

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Feb 1, 2024
@strepanier03 strepanier03 added Bug Something is broken. Auto assigns a BugZero manager. and removed Bug Something is broken. Auto assigns a BugZero manager. labels Feb 1, 2024
Copy link

melvin-bot bot commented Feb 1, 2024

Triggered auto assignment to @conorpendergrast (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@conorpendergrast
Copy link
Contributor

I am not convinced that we should fix this; it's only affecting Windows which is not one of our supported platforms. I'll sense-check that via Slack and will come back to this

@situchan
Copy link
Contributor

situchan commented Feb 2, 2024

I am also inclined to closing this. And revisit after waves are gone

@conorpendergrast
Copy link
Contributor

Yeah, cool. Given we both agree, I am going to close this out as a do-nothing situation. Thanks for your thoughts @situchan

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. Daily KSv2 Engineering
Projects
None yet
Development

No branches or pull requests

7 participants