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 on #16506] [$1000] Double-tapping on an existing emoji reaction sends multiple API requests #17978

Closed
1 of 6 tasks
kavimuru opened this issue Apr 25, 2023 · 27 comments
Closed
1 of 6 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors Monthly KSv2

Comments

@kavimuru
Copy link

kavimuru commented Apr 25, 2023

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. On Account A, open a chat and react to any message with an emoji.
  2. On Account B, open the same chat and find the message with the emoji reaction.
  3. On Account B, double-click on the emoji reaction that you added from Account A.

Expected result:

The emoji reaction should toggle between added and removed. Only one API request should be sent per click

Actual result:

The emoji reaction remains added after double-clicking. Multiple API requests are sent per click

Workaround:

Can the user still use Expensify without this being fixed? Have you informed them of the workaround?

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: 1.3.5
Reproducible in staging?: y
Reproducible in production?: y
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
Notes/Photos/Videos: Any additional supporting documentation

az_recorder_20230425_125454.1.mp4
Screen_Recording_20230423_133244_New.Expensify.mp4

Expensify/Expensify Issue URL:
Issue reported by: @Nathan-Mulugeta
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1682247959692439

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01f007b9fd26168fd7
  • Upwork Job ID: 1651889136408948736
  • Last Price Increase: 2023-05-30
@kavimuru kavimuru added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Apr 25, 2023
@MelvinBot
Copy link

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

@MelvinBot
Copy link

MelvinBot commented Apr 25, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

@melvin-bot melvin-bot bot added the Overdue label Apr 28, 2023
@twisterdotcom
Copy link
Contributor

@melvin-bot melvin-bot bot removed the Overdue label Apr 28, 2023
@twisterdotcom twisterdotcom added the External Added to denote the issue can be worked on by a contributor label Apr 28, 2023
@melvin-bot melvin-bot bot changed the title Double-clicking on an existing emoji reaction sends multiple API requests [$1000] Double-clicking on an existing emoji reaction sends multiple API requests Apr 28, 2023
@MelvinBot
Copy link

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

@MelvinBot
Copy link

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

@twisterdotcom twisterdotcom changed the title [$1000] Double-clicking on an existing emoji reaction sends multiple API requests [$1000] Double-tapping on an existing emoji reaction sends multiple API requests Apr 28, 2023
@MelvinBot
Copy link

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Apr 28, 2023
@MelvinBot
Copy link

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

@hoangzinh
Copy link
Contributor

hoangzinh commented Apr 28, 2023

Proposal

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

Double-tapping on an existing emoji reaction sends multiple API requests

What is the root cause of that problem?

The emoji reaction button is based on Pressable component. Currently we don't neither disable button nor prevent user click multiple time that button.

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

We have general solution here #18122
So we can wait until this PR merge. Then we can replace Pressable by PressableWithFeedback which will prevent multiple click on a pressable element.

I have tried InteractionManager.runAfterInteractions but it seems it doesn't work in this case. I couldn't prove but It seems the action Report.toggleEmojiReaction is not heavy, it runs fast so what we have here doesn't fit. And the InteractionManager.runAfterInteractions only ensure a function to run after all interactions have completed. It doesn't mean to ensure it prevents double click.

I think we can go with debounce. I tried with debounce 250ms here and it works well

Screen.Recording.2023-06-04.at.21.26.41.mov

@mollfpr
Copy link
Contributor

mollfpr commented Apr 28, 2023

Thanks @hoangzinh!

@yuwenmemon @twisterdotcom #18122 is about creating a new button component and preventing multiple clicks. So it makes sense to hold this and try the above proposal.

@melvin-bot melvin-bot bot added the Overdue label May 1, 2023
@yuwenmemon yuwenmemon changed the title [$1000] Double-tapping on an existing emoji reaction sends multiple API requests [HOLD PR#18122][$1000] Double-tapping on an existing emoji reaction sends multiple API requests May 1, 2023
@yuwenmemon
Copy link
Contributor

Sounds good - place a hold on this and switched it to Weekly

@melvin-bot melvin-bot bot removed the Overdue label May 1, 2023
@yuwenmemon yuwenmemon added Weekly KSv2 and removed Daily KSv2 labels May 1, 2023
@melvin-bot melvin-bot bot added the Overdue label May 9, 2023
@twisterdotcom
Copy link
Contributor

Still on hold.

@melvin-bot melvin-bot bot removed the Overdue label May 9, 2023
@twisterdotcom
Copy link
Contributor

I don't have my android phone with me at the moment. I see #18122 hit production. @mollfpr or @yuwenmemon - can you test and see if we can just close this?

@twisterdotcom
Copy link
Contributor

How are we doing here?

@melvin-bot melvin-bot bot removed the Overdue label May 30, 2023
@twisterdotcom twisterdotcom added Daily KSv2 and removed Weekly KSv2 labels May 30, 2023
@twisterdotcom twisterdotcom changed the title [HOLD PR#18122][$1000] Double-tapping on an existing emoji reaction sends multiple API requests [$1000] Double-tapping on an existing emoji reaction sends multiple API requests May 30, 2023
@mollfpr
Copy link
Contributor

mollfpr commented May 30, 2023

Sorry for the delay!

@hoangzinh I just try replacing PressableWithSecondaryInteraction with PressableWithFeedback but the issue is still reproduced. Could you update your proposal with the latest solution?

@hoangzinh
Copy link
Contributor

@mollfpr I will try to update my proposal again. Last time, I also weren't success on applying PressableWithFeedback

@melvin-bot
Copy link

melvin-bot bot commented May 30, 2023

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@twisterdotcom
Copy link
Contributor

No Melv. @hoangzinh is on the case.

@melvin-bot melvin-bot bot added the Overdue label Jun 2, 2023
@hoangzinh
Copy link
Contributor

I have updated my proposal here #17978 (comment)
Please help me to review it. Thanks

@stitesExpensify stitesExpensify self-assigned this Jun 5, 2023
@stitesExpensify
Copy link
Contributor

I think that we should put this on hold for now https://expensify.slack.com/archives/C049HHMV9SM/p1685714808977889?thread_ts=1685548338.234339&cid=C049HHMV9SM

#16506

@melvin-bot melvin-bot bot removed the Overdue label Jun 5, 2023
@twisterdotcom twisterdotcom changed the title [$1000] Double-tapping on an existing emoji reaction sends multiple API requests [HOLD on #16506] [$1000] Double-tapping on an existing emoji reaction sends multiple API requests Jun 5, 2023
@twisterdotcom twisterdotcom added Monthly KSv2 and removed Daily KSv2 labels Jun 5, 2023
@melvin-bot melvin-bot bot added the Overdue label Jul 6, 2023
@yuwenmemon yuwenmemon removed their assignment Jul 7, 2023
@melvin-bot melvin-bot bot removed the Overdue label Jul 7, 2023
@yuwenmemon
Copy link
Contributor

Issue is still on HOLD

@melvin-bot melvin-bot bot added the Overdue label Aug 7, 2023
@twisterdotcom
Copy link
Contributor

Still on HOLD

@melvin-bot melvin-bot bot removed the Overdue label Aug 7, 2023
@twisterdotcom
Copy link
Contributor

Still on hold.

@melvin-bot melvin-bot bot added the Overdue label Sep 19, 2023
@stitesExpensify
Copy link
Contributor

I can't reproduce this anymore. Can anyone else?

@melvin-bot melvin-bot bot removed the Overdue label Sep 26, 2023
@Nathan-Mulugeta
Copy link

Yeah I just retested and this issue is for sure no longer reproducible.

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. External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors Monthly KSv2
Projects
None yet
Development

No branches or pull requests

8 participants