An emoji is entered multiple times on repeated presses without closing the keyboard quickly after the first emoji is selected reported by @huzaifa-99
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:
- Open emoji keyboard in any chat
- Press an emoji multiple times
- Notice the keyboard is not immediately closed after the first emojis is selected (pressed)
- 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
Triggered auto assignment to @JmillsExpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.
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!
Current assignee @JmillsExpensify is eligible for the External assigner, not assigning anyone new.
Triggered auto assignment to Contributor-plus team member for initial proposal review - @mollfpr (External)
Triggered auto assignment to @jasperhuangg (External), see https://stackoverflow.com/c/expensify/questions/7972 for more details.
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 proposal's looks good to me! The next pressed emoji will not be selected while the popover will hide.
cc @jasperhuangg π π π C+ reviewed
Also CCing @stitesExpensify since you're working on the linked tracking issue for emojis.
π£ @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 π
@s77rt on a roll lately, assigned!
@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 You should be good to go after being assigned and never unassign yourself if you are still hired.
Applied in Upwork. PR is ready.
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)
Hired @s77rt via Upwork and offer sent to @mollfpr as well. Going to prioritize the BZ checklist between here and the regression period.
@JmillsExpensify is the PR timeline eligible for the bonus?
Great call. It is, so can you update the price before accepting?
Yup, I just update the price for the Upwork proposal, thanks!
@JmillsExpensify I think am eligible for the bonus as well, right?
@JmillsExpensify am I eligible for the reporting bonus?
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.
The PR for this is on staging! https://github.com/Expensify/App/pull/12755
@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 Applied, thanks.
Hey Melvin, hope ya had a great weekend!
Still waiting for the PR to go out to prod, not overdue.
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.
Ok, circling back on the regression test and related payment todos now that we are nearing the end of the regression period.
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.
All contributors paid out. Closing issue.