Skip to content

[$250] Web - Tooltip - Two rename tooltips are displayed #58138

Closed

Description

@mitarachim

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


Version Number: 9.1.11-1
Reproducible in staging?: Yes
Reproducible in production?: Yes
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): applausetester+ps309@applause.expensifail.com
Issue reported by: Applause Internal Team
Device used: Mac 15.3 / Chrome
App Component: Search

Action Performed:

  1. Go to staging.new.expensify.com
  2. Log in with a new account.
  3. Create a new workspace.
  4. Submit an expense to the workspace chat.
  5. Go to Reports.
  6. Click Filters button.
  7. Apply any filter, and click Save search.
  8. Click Expenses.
  9. Click on the expense submitted in Step 4.
  10. Close the RHP.

Expected Result:

Only one rename tooltip will be displayed.

Actual Result:

Two rename tooltips are displayed.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug6766842_1741654176634.20250311_084642.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021899519705512085595
  • Upwork Job ID: 1899519705512085595
  • Last Price Increase: 2025-03-11
  • Automatic offers:
    • nkdengineer | Contributor | 106497756
Issue OwnerCurrent Issue Owner: @c3024

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Mar 11, 2025
  2. melvin-bot commented on Mar 11, 2025

    @melvin-bot

    Triggered auto assignment to @zanyrenney (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.

  3. nkdengineer commented on Mar 11, 2025

    @nkdengineer
    Contributor

    Proposal

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

    Two rename tooltips are displayed.

    What is the root cause of that problem?

    When we navigate to another search page, the shouldRenderTooltip of the three-dot on the previous search page is still true but it's hidden based on this logic.

    const unsubscribe = navigator.addListener('blur', () => {
    if (!shouldHideOnNavigate) {
    return;

    When we open the RHP, shouldRenderTooltip of both three-dot changes to false because this tooltip is hidden now. After the RHP is closed, shouldRenderTooltip changes to true and the tooltip is rendered again for both of them. And because the element of the previous search page isn't found in the current search page, a tooltip is displayed at the top.

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

    Update the shouldShow condition for the rename tooltip to only show if the page is focused

    const isFocused = useIsFocused();
    const {shouldShowProductTrainingTooltip, renderProductTrainingTooltip, hideProductTrainingTooltip} = useProductTrainingContext(
        CONST.PRODUCT_TRAINING_TOOLTIP_NAMES.RENAME_SAVED_SEARCH,
        shouldShowSavedSearchesMenuItemTitle && isFocused,
    );
    

    const {shouldShowProductTrainingTooltip, renderProductTrainingTooltip, hideProductTrainingTooltip} = useProductTrainingContext(

    What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

    This is UI bug, no need to test.

    What alternative solutions did you explore? (Optional)

    We can implement a solution in BaseEducationalTooltip by creating a new variable that stores the focus state, when the page is blurred, set this to false. Add another listener with focus event and set this to true when the page is focused. Then we will only show the tooltip if this variable is true.

    const unsubscribe = navigator.addListener('blur', () => {
    if (!shouldHideOnNavigate) {
    return;

    Result

    Screen.Recording.2025-03-11.at.11.42.14.mov

    Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

  4. zanyrenney commented on Mar 11, 2025

    @zanyrenney
    Contributor

    I can't reproduce this exact flow, but I have seen similar behaviour in the past in my own LHN. Looking into this to try and reproduce.

  5. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Mar 11, 2025
  6. melvin-bot commented on Mar 11, 2025

    @melvin-bot
  7. changed the title [-]Web - Tooltip - Two rename tooltips are displayed[/-] [+][$250] Web - Tooltip - Two rename tooltips are displayed[/+] on Mar 11, 2025
  8. zanyrenney commented on Mar 11, 2025

    @zanyrenney
    Contributor

    Adding the external label.

  9. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Mar 11, 2025
  10. melvin-bot commented on Mar 11, 2025

    @melvin-bot

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

  11. c3024 commented on Mar 12, 2025

    @c3024
    Contributor

    Thanks for the proposal.

    I think checking the focus state to determine whether the tooltip should be displayed, as suggested in the main solution, seems better to me than the alternative approach of tracking the parent page focus state in BaseEducationalTooltip. The focus check is also used on other pages to determine tooltip visibility.

    The fix suggested in the main solution of @nkdengineer’s proposal LGTM!

    🎀 👀 🎀 C+ reviewed!

  12. 2 remaining items

  13. removed
    Help WantedApply this label when an issue is open to proposals by contributors
    on Mar 12, 2025
  14. melvin-bot commented on Mar 12, 2025

    @melvin-bot

    📣 @nkdengineer 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

    Offer link
    Upwork job
    Please accept the offer 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 📖

  15. c3024 commented on Apr 4, 2025

    @c3024
    Contributor

    BugZero Checklist:

    • [Contributor] Classify the bug:
    Bug classification

    Source of bug:

    • 1a. Result of the original design (eg. a case wasn't considered)
    • 1b. Mistake during implementation
    • 1c. Backend bug
    • 1z. Other:

    Where bug was reported:

    • 2a. Reported on production (eg. bug slipped through the normal regression and PR testing process on staging)
    • 2b. Reported on staging (eg. found during regression or PR testing)
    • 2d. Reported on a PR
    • 2z. Other:

    Who reported the bug:

    • 3a. Expensify user
    • 3b. Expensify employee
    • 3c. Contributor
    • 3d. QA
    • 3z. Other:
    • [Contributor] 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: https://github.com/Expensify/App/pull/54064/files#r2028310562

    • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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: No discussion was started because this bug could not have been identified earlier.

    • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

    Regression Test Proposal Template

    • [BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.

      Link to issue:

    Regression Test Proposal

    Precondition:

    • None

    Test:

    1. Log in with a new account.
    2. Create a new workspace.
    3. Submit an expense to the workspace chat.
    4. Go to Reports.
    5. Click Filters button.
    6. Apply any filter, and click Save search.
    7. Click Expenses.
    8. Click on the expense submitted in Step 4.
    9. Close the RHP.
    10. Verify that only one rename tooltip is displayed.

    Do we agree 👍 or 👎

  16. c3024 commented on Apr 4, 2025

    @c3024
    Contributor

    @zanyrenney

    Automation failed here. PR deployed to production two weeks ago. Can you please post the payment summary here? Thanks!

  17. c3024 commented on Apr 21, 2025

    @c3024
    Contributor

    @zanyrenney , gentle bump here!

  18. zanyrenney commented on Apr 23, 2025

    @zanyrenney
    Contributor

    Thanks! Sorry for missing this @c3024

  19. zanyrenney commented on Apr 23, 2025

    @zanyrenney
    Contributor

    Payment summary

    $250 to @nkdengineer paid via Upwork.
    $250 to @c3024 owed with ND. Please request.

  20. JmillsExpensify commented on Apr 25, 2025

    @JmillsExpensify
    Contributor

    $250 approved for @c3024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributorReviewingHas a PR in review

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions