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

[$250] Web- Search- Two filter tooltips are shown when navigating to Reports page for the second time #54600

Open
2 of 8 tasks
mitarachim opened this issue Dec 27, 2024 · 14 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. DeployBlockerCash This issue or pull request should block deployment Engineering 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 Reviewing Has a PR in review Weekly KSv2

Comments

@mitarachim
Copy link

mitarachim commented Dec 27, 2024

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


Version Number: 9.0.79-0
Reproducible in staging?: Yes
Reproducible in production?: Unable to check
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: N/A
If this was caught during regression testing, add the test name, ID and link from TestRail: Exp
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause Internal Team
Device used: Mac 15.0
App Component: Search

Action Performed:

  1. Go to staging.new.expensify.com
  2. Log in with a new account.
  3. Go to Reports and quickly go back to Inbox before Filter tooltip is shown.
  4. Go to Reports again.

Expected Result:

Only one Filter tooltip is shown.

Actual Result:

Two Filter tooltips are shown. The second one is at the top left.

Workaround:

Unknown

Platforms:

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6702706_1735256150841!Screenshot_2024-12-27_at_07 31 33
Bug6702706_1735256120432.20241227_073045.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021872595838175147651
  • Upwork Job ID: 1872595838175147651
  • Last Price Increase: 2024-12-27
Issue OwnerCurrent Issue Owner: @jjcoffee
@mitarachim mitarachim added DeployBlockerCash This issue or pull request should block deployment Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Dec 27, 2024
Copy link

melvin-bot bot commented Dec 27, 2024

Triggered auto assignment to @Beamanator (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

Copy link

melvin-bot bot commented Dec 27, 2024

Triggered auto assignment to @sakluger (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

Copy link

melvin-bot bot commented Dec 27, 2024

💬 A slack conversation has been started in #expensify-open-source

@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels Dec 27, 2024
Copy link
Contributor

👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

@Beamanator
Copy link
Contributor

Looks related to this issue which was deemed NAB: #54596

@Beamanator
Copy link
Contributor

This tooltip in the Search page header was just added back in #54263

cc @ishpaul777 @rayane-djouah @puneetlath

@Beamanator Beamanator added the External Added to denote the issue can be worked on by a contributor label Dec 27, 2024
Copy link

melvin-bot bot commented Dec 27, 2024

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

@melvin-bot melvin-bot bot changed the title Web- Search- Two filter tooltips are shown when navigating to Reports page for the second time [$250] Web- Search- Two filter tooltips are shown when navigating to Reports page for the second time Dec 27, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Dec 27, 2024
Copy link

melvin-bot bot commented Dec 27, 2024

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

@Beamanator
Copy link
Contributor

Beamanator commented Dec 27, 2024

Marking external to hopefully get some movement, but this def comes from the above linked PR. Also I'm OOO early today so probably won't be able to push this all the way through

@linhvovan29546
Copy link
Contributor

linhvovan29546 commented Dec 27, 2024

Edited by proposal-police: This proposal was edited at 2024-12-27 13:27:29 UTC.

Proposal

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

Web- Search- Two filter tooltips are shown when navigating to Reports page for the second time

What is the root cause of that problem?

The issue arises from the useProductTrainingContext hook, which manages the tooltip display. The shouldShowProductTrainingTooltip flag remains true when navigating to inbox page

const {renderProductTrainingTooltip, shouldShowProductTrainingTooltip, hideProductTrainingTooltip} = useProductTrainingContext(
CONST.PRODUCT_TRAINING_TOOLTIP_NAMES.SEARCH_FILTER_BUTTON_TOOLTIP,
isFocused,
);

When navigating to the inbox page, the shouldShowProductTrainingTooltip flag remains true. And here, the logic to show the tooltip is wrapped inside a timeout, causing the tooltip to be triggered and displayed

const timerID = setTimeout(() => {
removePendingTooltipRef.current();
show.current?.();
didShow.current = true;
removeActiveTooltipRef.current = TooltipManager.addActiveTooltip(closeTooltip);
}, 500);
removePendingTooltipRef.current = TooltipManager.addPendingTooltip(timerID);
return () => {
removePendingTooltipRef.current();
clearTimeout(timerID);
};

Debug
Code Log
Screenshot 2024-12-27 at 8 39 18 PM Screenshot 2024-12-27 at 8 38 52 PM
### What changes do you think we should make to solve the problem? We can update the `useProductTrainingContext` hook to check `shouldShow` inside `shouldShowProductTrainingTooltip` function, to make sure the tooltip only display if shouldShow true

const shouldShowProductTrainingTooltip = useMemo(() => {
return shouldRenderTooltip(tooltipName);
}, [shouldRenderTooltip, tooltipName]);

const shouldShowProductTrainingTooltip = useMemo(() => {
       return shouldShow && shouldRenderTooltip(tooltipName);
   }, [shouldRenderTooltip, tooltipName, shouldShow]);
POC
Before After
Screen.Recording.2024-12-27.at.8.18.04.PM.mov
Screen.Recording.2024-12-27.at.7.55.58.PM.mov
### What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future? N/A

What alternative solutions did you explore? (Optional)

N/A

@jjcoffee
Copy link
Contributor

jjcoffee commented Dec 27, 2024

@linhvovan29546's proposal makes sense to me, but I think we should give @ishpaul777 and @rayane-djouah a chance to work on this since it's a regression from #54263.

🎀👀🎀 C+ reviewed

Copy link

melvin-bot bot commented Dec 27, 2024

Current assignee @Beamanator is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.

@melvin-bot melvin-bot bot added the Weekly KSv2 label Dec 27, 2024
@izarutskaya
Copy link

Still reproducible

Build v9.0.79-2

Recording.2946.mp4

@ishpaul777
Copy link
Contributor

i tried multiple times i could not reproduce anymore @izarutskaya

@rayane-djouah can you please test this again ?

Screen.Recording.2024-12-28.at.10.38.18.PM.mov

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. DeployBlockerCash This issue or pull request should block deployment Engineering 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 Reviewing Has a PR in review Weekly KSv2
Projects
None yet
Development

No branches or pull requests

7 participants