App icon indicating copy to clipboard operation
App copied to clipboard

An emoji is entered multiple times on repeated presses without closing the keyboard quickly after the first emoji is selected reported by @huzaifa-99

Open kavimuru opened this issue 3 years ago β€’ 1 comments

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Action Performed:

  1. Open emoji keyboard in any chat
  2. Press an emoji multiple times
  3. Notice the keyboard is not immediately closed after the first emojis is selected (pressed)
  4. Notice that emoji is added multiple times in the compose box

Expected Result:

The emoji keyboard should be closed immediately after the first emojis is selected. (or the keyboard should remain open and when clicked outside the emoji keyboard then it should close)

Actual Result:

The keyboard takes some time to close and captures multiple presses on the emojis adding them multiple times in the compose box

Workaround:

unknown

Platform:

Where is this issue occurring?

  • Android

Version Number: 1.2.27-0 Reproducible in staging?: y Reproducible in production?: y Email or phone of affected tester (no customers): Logs: https://stackoverflow.com/c/expensify/questions/4856 Notes/Photos/Videos:

https://user-images.githubusercontent.com/43996225/201441185-ea2e9384-6b65-46a2-928a-a4a307938cfe.mp4

https://user-images.githubusercontent.com/43996225/201441220-9ee4ca2b-160d-40a4-9a78-ce6fb5e2f118.mp4

Expensify/Expensify Issue URL: Issue reported by: @huzaifa-99 Slack conversation: https://expensify.slack.com/archives/C01GTK53T8Q/p1668023958715039

View all open jobs on GitHub

kavimuru avatar Nov 11 '22 22:11 kavimuru

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

melvin-bot[bot] avatar Nov 11 '22 22:11 melvin-bot[bot]

Updated the testing steps, as I was also able to reproduce this behavior on desktop. Wasn't able to reproduce on iOS, web, or mWeb (Safari). Upwork job is here: https://www.upwork.com/jobs/~01447aa76a5e810018. We're open for proposals!

JmillsExpensify avatar Nov 14 '22 16:11 JmillsExpensify

Current assignee @JmillsExpensify is eligible for the External assigner, not assigning anyone new.

melvin-bot[bot] avatar Nov 14 '22 16:11 melvin-bot[bot]

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

melvin-bot[bot] avatar Nov 14 '22 16:11 melvin-bot[bot]

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

melvin-bot[bot] avatar Nov 14 '22 16:11 melvin-bot[bot]

Proposal

diff --git a/src/components/EmojiPicker/EmojiPicker.js b/src/components/EmojiPicker/EmojiPicker.js
index c379d9f83..75451cb47 100644
--- a/src/components/EmojiPicker/EmojiPicker.js
+++ b/src/components/EmojiPicker/EmojiPicker.js
@@ -56,6 +56,9 @@ class EmojiPicker extends React.Component {
      * @param {String} emoji
      */
     selectEmoji(emoji) {
+        if (!this.emojiPopoverAnchor) {
+            return;
+        }
         this.hideEmojiPicker();
         if (_.isFunction(this.onEmojiSelected)) {
             this.onEmojiSelected(emoji);

Details

Since we set emojiPopoverAnchor prop to null right on the hide function we can rely on it to not select another emoji.

s77rt avatar Nov 14 '22 17:11 s77rt

@s77rt proposal's looks good to me! The next pressed emoji will not be selected while the popover will hide.

cc @jasperhuangg πŸŽ€ πŸ‘€ πŸŽ€ C+ reviewed

mollfpr avatar Nov 14 '22 17:11 mollfpr

Also CCing @stitesExpensify since you're working on the linked tracking issue for emojis.

JmillsExpensify avatar Nov 14 '22 17:11 JmillsExpensify

πŸ“£ @s77rt You have been assigned to this job by @jasperhuangg! Please apply to this job in Upwork 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 πŸ“–

melvin-bot[bot] avatar Nov 15 '22 19:11 melvin-bot[bot]

@s77rt on a roll lately, assigned!

jasperhuangg avatar Nov 15 '22 19:11 jasperhuangg

@jasperhuangg I have PR waiting to be merged #12746 Should I wait till then to make a new PR? (and do i need to be unassigned then assigned again or it's okay staying assigned)

s77rt avatar Nov 15 '22 20:11 s77rt

@s77rt You should be good to go after being assigned and never unassign yourself if you are still hired.

mollfpr avatar Nov 15 '22 20:11 mollfpr

Applied in Upwork. PR is ready.

s77rt avatar Nov 15 '22 21:11 s77rt

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:

  • [x] @mollfpr @jasperhuangg The PR that introduced the bug has been identified. Link to the PR:
  • [x] @mollfpr @jasperhuanggThe 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:
  • [x] @mollfpr @jasperhuangg A discussion in #contributor-plus 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:
  • [x] @JmillsExpensify A regression test has been added or updated so that the same bug will not reach production again. Link to the GH issue for creating the test here:
  • [ ] @JmillsExpensify Payment has been made to the issue reporter (if applicable)
  • [ ] @JmillsExpensify Payment has been made to the contributor that fixed the issue (if applicable)
  • [ ] @JmillsExpensify Payment has been made to the contributor+ that helped on the issue (if applicable)

melvin-bot[bot] avatar Nov 16 '22 18:11 melvin-bot[bot]

Hired @s77rt via Upwork and offer sent to @mollfpr as well. Going to prioritize the BZ checklist between here and the regression period.

JmillsExpensify avatar Nov 17 '22 04:11 JmillsExpensify

@JmillsExpensify is the PR timeline eligible for the bonus?

mollfpr avatar Nov 17 '22 04:11 mollfpr

Great call. It is, so can you update the price before accepting?

JmillsExpensify avatar Nov 17 '22 04:11 JmillsExpensify

Yup, I just update the price for the Upwork proposal, thanks!

mollfpr avatar Nov 17 '22 05:11 mollfpr

@JmillsExpensify I think am eligible for the bonus as well, right?

s77rt avatar Nov 17 '22 09:11 s77rt

@JmillsExpensify am I eligible for the reporting bonus?

huzaifa-99 avatar Nov 17 '22 11:11 huzaifa-99

The PR that introduced the bug has been identified. Link to the PR:

This wasn't as much a regression as much as a bug that was always present, but simply wasn't uncovered since it's somewhat of an edge case. Therefore, I'm not linking a PR for this.

A discussion in #contributor-plus 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:

I'm also not really too sure what we could have done differently since this is an edge case, I honestly wouldn't have thought to rapidly tap the emoji picker when testing it. This problem is pretty specific to the implementation of this component, so it's difficult to come up with an overarching statement on what we could do differently for next time.

jasperhuangg avatar Nov 17 '22 20:11 jasperhuangg

The PR for this is on staging! https://github.com/Expensify/App/pull/12755

jasperhuangg avatar Nov 17 '22 22:11 jasperhuangg

@mollfpr Great thanks.

@s77rt Yes, I've updated your offer.

@huzaifa-99 Yes, the reporting bonus is $250. Can you apply to the Upwork job please?

JmillsExpensify avatar Nov 18 '22 08:11 JmillsExpensify

@JmillsExpensify Applied, thanks.

huzaifa-99 avatar Nov 18 '22 09:11 huzaifa-99

Hey Melvin, hope ya had a great weekend!

Still waiting for the PR to go out to prod, not overdue.

jasperhuangg avatar Nov 21 '22 14:11 jasperhuangg

As for wait for the PR to hit production and the regression period to start, noting that I do need to circle back on the BZ checklist. I'll plan on that for this week.

JmillsExpensify avatar Nov 22 '22 05:11 JmillsExpensify

Ok, circling back on the regression test and related payment todos now that we are nearing the end of the regression period.

JmillsExpensify avatar Nov 29 '22 04:11 JmillsExpensify

Alright, the regression test has been added. We are only an hour away from the 29th, so I'm going to go ahead and issue payments and then close out this issue.

JmillsExpensify avatar Nov 29 '22 05:11 JmillsExpensify

All contributors paid out. Closing issue.

JmillsExpensify avatar Nov 29 '22 05:11 JmillsExpensify