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-11-01] [$1000] Tooltips should not show when the related context menu is open #24296

Closed
1 of 6 tasks
dangrous opened this issue Aug 8, 2023 · 84 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 Internal Requires API changes or must be handled by Expensify staff

Comments

@dangrous
Copy link
Contributor

dangrous commented Aug 8, 2023

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


This is follow up from #15289

Action Performed:

Break down in numbered steps
Example 1:

  1. Open an existing chat
  2. Send a message
  3. Hover over the message & react with one of the emojis
  4. Right-click on the newly added emoji & verify that a popover modal is displayed
  5. As the popover modal is opened, hover the emoji you reacted with

AND

Example 2:

  1. Click + button on LHN.
  2. Hover over the X icon
  3. Click + in composer
  4. Hover over + icon

Expected Result:

Describe what you think should've happened
Example 1:
Tooltip & popover modal are not overlapped

Example 2:
Should not see tooltip in either hover state

Actual Result:

Describe what actually happened
Example 1:
Tooltip & popover modal are overlapped

Example 2:
See tooltip in both hover states

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.51-2
Reproducible in staging?: yes
Reproducible in production?: no
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Email or phone of affected tester (no customers): N/A
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
Expensify/Expensify Issue URL:
Issue reported by:
Slack conversation:

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~019da84618f039e6f7
  • Upwork Job ID: 1689711722778017792
  • Last Price Increase: 2023-08-31
@dangrous dangrous added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Aug 8, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 8, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Aug 8, 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

@tewodrosGirmaA
Copy link

I reported first

@laurenreidexpensify laurenreidexpensify removed their assignment Aug 9, 2023
@laurenreidexpensify laurenreidexpensify added Bug Something is broken. Auto assigns a BugZero manager. and removed Bug Something is broken. Auto assigns a BugZero manager. labels Aug 9, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 9, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Aug 9, 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

@laurenreidexpensify
Copy link
Contributor

Reassigning as this got assigned at 9pm the evening before I am OOO for 5 days

@NicMendonca NicMendonca added the External Added to denote the issue can be worked on by a contributor label Aug 10, 2023
@melvin-bot melvin-bot bot changed the title Tooltips should not show when the related context menu is open [$1000] Tooltips should not show when the related context menu is open Aug 10, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 10, 2023

Job added to Upwork: https://www.upwork.com/jobs/~019da84618f039e6f7

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

melvin-bot bot commented Aug 10, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Aug 10, 2023

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

@tienifr
Copy link
Contributor

tienifr commented Aug 11, 2023

Proposal

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

Tooltips shows when the related context menu is open.

What is the root cause of that problem?

We're not disabling the tooltip when the context menu is open.

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

We need to disable the tooltip when the context menu is open.

  1. Add a new disabled prop in Tooltip, defaulting to false
  2. If disabled is true, return the children and not add the Tooltip content, by adding the disabled condition to here
  3. Pass the context menu active state to disabled prop so that the Tooltip will be disabled when the context menu is active.
    That means:
    For FloatingActionButton, pass disabled={this.props.isActive} here
    For plus button in ReportActionCompose, pass disabled={this.state.isMenuVisible} here
  4. We also need to set isRendered to false if the disabled changes to true (above this block), to avoid Tooltip keeps rendering after we click outside of the context menu, because at that time onHoverOut will not be triggered
useEffect(() => {
        if (!disabled) {
            return;
        }
        setIsRendered(false);
    }, [disabled, setIsRendered]);

(we can consider setting the isVisible to false here as well).

We should apply the same solution to any Context Menu + Tooltip combination that has this problem.

What alternative solutions did you explore? (Optional)

If we don't want to add a prop, we can use the existing text prop, if the context menu is active, pass the text as empty string. Similar step 4 needs to be done for the setIsRendered

@melvin-bot melvin-bot bot added the Overdue label Aug 11, 2023
@situchan
Copy link
Contributor

@tienifr thanks for your proposal. Your solution works but it's case-by-case fix. Whenever introduce new popover in the future, we should always consider disabled prop for tooltip.
But based on current structure, I don't find any better solution to fix globally.
@allroundexperts do you agree? Asking since you developed this feature.

@melvin-bot melvin-bot bot removed the Overdue label Aug 14, 2023
@tienifr
Copy link
Contributor

tienifr commented Aug 14, 2023

But based on current structure, I don't find any better solution to fix globally.

I agree. Trying to fix it globally will likely lead to tying the Popover and Tooltip together unnecessarily.

@alex2bc
Copy link
Contributor

alex2bc commented Aug 14, 2023

Proposal

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

Hide tooltip when popover menu is open

What is the root cause of that problem?

The hiding of the tooltip is not handled

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

As I see a request for a global proposal, I'll share something that I think of, but it may be too excessive at this point. The suitability of my suggestion depends on the level of generality you are looking for.

My proposal is to:

  • Assign IDs to every tooltip and popover in the app
  • Create a local context to store the state of displayed popover menus
  • Create a custom hook called useIsTooltipHidden. This hook should accept the tooltip's ID and check if there is any conflicting popover currently open.

This way, we don't depend on the Popover menu and Tooltip being close to each other in the render tree. They don't rely on a single visibility prop, but their logic is handled in context.

But, as I mentioned above, creating a separate context may be overkill for fixing just one issue.

@situchan
Copy link
Contributor

@alex2bc right, your solution is too overkill to fix this minor issue.

@allroundexperts
Copy link
Contributor

allroundexperts commented Aug 14, 2023

@situchan I think I might have a better solution. I have to do some research though. I'll post an update tonight!

@NicMendonca
Copy link
Contributor

@melvin-bot melvin-bot bot removed the Overdue label Oct 20, 2023
@situchan
Copy link
Contributor

@allroundexperts's proposal looks good to me.
I think it's better to use dedicated PopoverTooltip as it's not necessary to use PopoverContext for all tooltips which isn't related to popover.
🎀 👀 🎀 C+ reviewed

@melvin-bot
Copy link

melvin-bot bot commented Oct 20, 2023

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

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Oct 22, 2023
@allroundexperts
Copy link
Contributor

PR created.

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Oct 25, 2023
@melvin-bot melvin-bot bot changed the title [$1000] Tooltips should not show when the related context menu is open [HOLD for payment 2023-11-01] [$1000] Tooltips should not show when the related context menu is open Oct 25, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Oct 25, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 25, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Oct 25, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.90-2 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-11-01. 🎊

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

For reference, here are some details about the assignees on this issue:

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 Oct 25, 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:

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

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Nov 1, 2023
@NicMendonca
Copy link
Contributor

Bump on BZ summary ☝️

@NicMendonca
Copy link
Contributor

Reporter: N.A
Contributor: @allroundexperts - paid via Expensify - $1,500
C+: @situchan - paid via Upwork - $1,500

@situchan
Copy link
Contributor

situchan commented Nov 2, 2023

  • The PR that introduced the bug has been identified. Link to the PR: This is follow-up of popover refactor for non-overlay
  • 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: N/A
  • 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: N/A
  • Determine if we should create a regression test for this bug.
  • 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.

This is kind of polish than bug and doesn't affect user experience. So I propose no regression test.

@NicMendonca
Copy link
Contributor

@situchan the upwork job expired, so just making a new one!

@allroundexperts pls request payment via Expensify

@NicMendonca
Copy link
Contributor

@situchan sent you the offer

@NicMendonca
Copy link
Contributor

@situchan you've been paid!

Payment summary

Thanks everyone!

@JmillsExpensify
Copy link

$1,500 payment approved for @allroundexperts based on this comment.

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 Internal Requires API changes or must be handled by Expensify staff
Projects
None yet
Development

No branches or pull requests