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 for payment 2023-07-14] [$1000] The tooltip disappears when the "Copy to clipboard" option is clicked multiple times. #19693

Closed
1 of 6 tasks
kavimuru opened this issue May 26, 2023 · 101 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor

Comments

@kavimuru
Copy link

kavimuru commented May 26, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Action Performed:

1.Go to any chat.
2. Hover over any message to display the popup.
3. Click on the "Copy to clipboard" option.
I. On the first click, click in the center to ensure that the tooltip is visible.
II. On the second click, click on the edge and observe that the tooltip remains hidden until the cursor is moved to other options.

Expected Result:

The tooltip should appear for the "Copy to clipboard" option, irrespective of placement of click.

Actual Result:

The tooltip for "Copy to clipboard" does not appear when clicked multiple times, especially after clicking on the edge.

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.17-2
Reproducible in staging?: needs reproduction
Reproducible in production?: needs reproduction
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

Bug.3.mp4

Expensify/Expensify Issue URL:
Issue reported by: @usmantariq96
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1684917973805069

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01d9c2c343f15e297b
  • Upwork Job ID: 1662216780603080704
  • Last Price Increase: 2023-06-23
@kavimuru kavimuru added Daily KSv2 Needs Reproduction Reproducible steps needed Bug Something is broken. Auto assigns a BugZero manager. labels May 26, 2023
@melvin-bot
Copy link

melvin-bot bot commented May 26, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented May 26, 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

@lschurr
Copy link
Contributor

lschurr commented May 26, 2023

I was able to reproduce by clicking on the edge of the "copy to clipboard" option.

@lschurr lschurr added the External Added to denote the issue can be worked on by a contributor label May 26, 2023
@melvin-bot melvin-bot bot changed the title The tooltip disappears when the "Copy to clipboard" option is clicked multiple times. [$1000] The tooltip disappears when the "Copy to clipboard" option is clicked multiple times. May 26, 2023
@melvin-bot
Copy link

melvin-bot bot commented May 26, 2023

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

@lschurr lschurr removed the Needs Reproduction Reproducible steps needed label May 26, 2023
@melvin-bot
Copy link

melvin-bot bot commented May 26, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented May 26, 2023

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

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

melvin-bot bot commented May 26, 2023

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

@fedirjh
Copy link
Contributor

fedirjh commented May 26, 2023

@lschurr Is it reproducible in production or staging ?

@lschurr
Copy link
Contributor

lschurr commented May 26, 2023

I reproduced on staging @fedirjh - are you able to reproduce?

@fedirjh
Copy link
Contributor

fedirjh commented May 26, 2023

I am unable to replicate on staging , I think the reporter is testing on windows system

Edit 1: I am able to reproduce on production. It seems to be fixed on staging
Edit 2: I was able to replicate on staging as well, but it's hard to replicate took me several attempts .

@MrJithil
Copy link

MrJithil commented May 27, 2023

//[Updated]

Proposal

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

While the user hovers over the context icons, and repeatedly clicks on them on the edge of the hover area causing the disappearance of the tooltip. I also, found that the tooltip will not show if the user immediately clicks on any icons like "Copy to clipboard" or "Copy URL" etc before showing the tooltip, and not moving the mouse.

This issue can be seen every icons which has tooltips, including the Pin/Unpin. Copy to clipboard, Copy URL etc.

What is the root cause of that problem?

If the user clicks on any icon quickly before tooltip animation is completed, the Tooltip components will not get the Hoverable event benefits since mouse is not entering/leave again from the icon.

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

On Hoverable component, implement the onPress event and set the

    this.setIsHovered(true);`. 

To avoid any impacts of other press event listeners, we must need to call the child prop onPress if defined.

    child.props.onPress(el);

What alternative solutions did you explore? (Optional)

edit the below if of Hoverable
if (isHovered !== this.state.isHovered && !(isHovered && this.hoverDisabled)) {
to
if (!(isHovered && this.hoverDisabled)) { or just if(!this.hoverDisabled)

So that, even the isHovered state trapped, we will be able to call the callback functions from this.setState({isHovered}, isHovered ? this.props.onHoverIn : this.props.onHoverOut); this line.

@gfrmoretti
Copy link

gfrmoretti commented May 27, 2023

My Proposal

The root cause

The root cause is a delay of 500ms in the animation tooltip. Like MrJtil identify if the user clicks on any icon quickly before this animation is completed, the tooltips will be disappear.

Possible solutions:

Easier Solution

  • Remove the delay, just doing that the problem was solved.
 Animated.timing(this.animation, {
                toValue: 1,
                duration: 140,
                delay: 0,
                useNativeDriver: false,
            }).start();

More complex solution

  • I propose to create a state control for these component for the delay time, why this ? When the user clicks in any item in ContextMenu in the onPress event I be able to set the delay time with zero, this make the animation stops and show the tooltip normally. For this to work I need to create a delay state flow control to change the delay time in OnPress event.

The animation will be like this :

 Animated.timing(this.animation, {
                toValue: 1,
                duration: 140,
                delay: this.props.delay,
                useNativeDriver: false,
            }).start();

Evidence

I test both solutions and they solve the problem.
Video Evidence bellow:

Screencast.2023-05-27.13.06.53.mp4

Obs: Important to know, that this is a preview solution, this state control flow can be optimize in the final solution.

Contributor details

Your Expensify account email: gfrmoretti@gmail.com
Upwork Profile Link: Upwork Profile

@melvin-bot
Copy link

melvin-bot bot commented May 27, 2023

📣 @gfrmoretti! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:

  1. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  2. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  3. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
    Screen Shot 2022-11-16 at 4 42 54 PM
    Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

@MrJithil
Copy link

Contributor details
Your Expensify account email: jithil@outlook.com
Upwork Profile Link: https://www.upwork.com/freelancers/~01efe261118bd962c0

@melvin-bot
Copy link

melvin-bot bot commented May 28, 2023

✅ Contributor details stored successfully. Thank you for contributing to Expensify!

@robertjchen
Copy link
Contributor

Thanks for the proposals so far! Though, I wonder why we had the 500ms delay in the first place- maybe it was to address some other bug in the past? 🤔

@melvin-bot melvin-bot bot removed the Overdue label May 29, 2023
@fedirjh
Copy link
Contributor

fedirjh commented May 29, 2023

@MrJithil The root cause doesn’t looks accurate. This issue looks to affects only this tooltip (copy to clipboard) , If the animation is the root cause , shouldn’t we have all tooltips affected ? I feel this is related to some focus trap.

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production labels Jul 7, 2023
@melvin-bot melvin-bot bot changed the title [$1000] The tooltip disappears when the "Copy to clipboard" option is clicked multiple times. [HOLD for payment 2023-07-14] [$1000] The tooltip disappears when the "Copy to clipboard" option is clicked multiple times. Jul 7, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 7, 2023

Reviewing label has been removed, please complete the "BugZero Checklist".

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jul 7, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 7, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.37-7 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2023-07-14. 🎊

After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

  • External issue reporter
  • Contributor that fixed the issue
  • Contributor+ that helped on the issue and/or PR

As a reminder, here are the bonuses/penalties that should be applied for any External issue:

  • Merged PR within 3 business days of assignment - 50% bonus
  • Merged PR more than 9 business days after assignment - 50% penalty

@melvin-bot
Copy link

melvin-bot bot commented Jul 7, 2023

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:

  • [@fedirjh] The PR that introduced the bug has been identified. Link to the PR:
  • [@fedirjh] 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:
  • [@fedirjh] 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:
  • [@fedirjh] Determine if we should create a regression test for this bug.
  • [@fedirjh] 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.
  • [@lschurr] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@lschurr
Copy link
Contributor

lschurr commented Jul 13, 2023

@lschurr
Copy link
Contributor

lschurr commented Jul 13, 2023

@fedirjh do we need a regression test for this one?

@usmantariq96
Copy link

@ischurr can you please share offer via direct message in Upwork, as I'm not able to access the link.

@lschurr
Copy link
Contributor

lschurr commented Jul 13, 2023

Can you share your Upwork profile here @usmantariq96?

@usmantariq96
Copy link

https://www.upwork.com/freelancers/~0162e9ec0b876900fb

Please find above @lschurr
Thanks

@lschurr
Copy link
Contributor

lschurr commented Jul 13, 2023

Ah, yeah I think that's the problem. Can you log out and try the link again? https://www.upwork.com/jobs/~01782c71ac1d47755b

@huzaifa-99
Copy link
Contributor

sure, giving it a try.

@huzaifa-99
Copy link
Contributor

huzaifa-99 commented Jul 13, 2023

still the same @lschurr

image

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Jul 13, 2023
@lschurr
Copy link
Contributor

lschurr commented Jul 14, 2023

Alright, I've invited @fedirjh @huzaifa-99 @usmantariq96 to the job - are you able to accept in Upwork?

@fedirjh
Copy link
Contributor

fedirjh commented Jul 14, 2023

@lschurr Thank you, Accepted.

@usmantariq96
Copy link

usmantariq96 commented Jul 14, 2023

@Ischurr thanks accepted two offers shared one directly I think and second from direct message..

Kindly mature one of them if both is accepted as shared. 😊

@lschurr
Copy link
Contributor

lschurr commented Jul 14, 2023

Great! Offers sent.

@lschurr
Copy link
Contributor

lschurr commented Jul 14, 2023

Payments made to @usmantariq96 and @fedirjh. Just need @huzaifa-99 to accept the offer.

Additionally, @fedirjh - do we need a regression test for this? Could you work on the checklist here so that we can close this out? #19693 (comment)

@usmantariq96
Copy link

@Ischurr thanks.

@fedirjh
Copy link
Contributor

fedirjh commented Jul 14, 2023

BugZero Checklist

@huzaifa-99
Copy link
Contributor

Accepted the offer @lschurr, also there is a $500 bouns, right?

@lschurr
Copy link
Contributor

lschurr commented Jul 14, 2023

Yep @huzaifa-99! That will be issued with the payment.

@lschurr
Copy link
Contributor

lschurr commented Jul 14, 2023

All payments issued. Closing!

@lschurr lschurr closed this as completed Jul 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests

10 participants