Skip to content

[$250] Search - Esc key does not close the search dialog after navigating to search filters #46915

Closed

Description

@lanitochka17

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.0.17-0
Reproducible in staging?: Y
Reproducible in production?: Y
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): dave0123seife@gmail.com
Issue reported by: Applause - Internal Team

Action Performed:

  1. Log in to an account
  2. Navigate to https://staging.new.expensify.com/search/filters
  3. Click on the esc key. Notice the dialog does not close
  4. Click CMD + K to open the search dialog
  5. Click the esc key

Expected Result:

Search dialog close when clicking esc

Actual Result:

Search dialog does not close when clicking esc

Workaround:

Unknown

Platforms:

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

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

Bug6563456_1722954402348.Screen_Recording_2024-08-06_at_5.24.20_PM.1.mov

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0101567775c1fa8061
  • Upwork Job ID: 1825565441525880831
  • Last Price Increase: 2024-08-19
  • Automatic offers:
    • akinwale | Reviewer | 103608161
Issue OwnerCurrent Issue Owner: @akinwale

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Aug 6, 2024
  2. melvin-bot commented on Aug 6, 2024

    @melvin-bot

    Triggered auto assignment to @muttmuure (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. lanitochka17 commented on Aug 6, 2024

    @lanitochka17
    Author

    @muttmuure FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors

  4. bernhardoj commented on Aug 7, 2024

    @bernhardoj
    Contributor

    Proposal

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

    Pressing ESC doesn't close the search filter RHP page.

    What is the root cause of that problem?

    This issue happens to every RHP in search or settings page IF the user refresh while on the search/settings page or directly access the page through url.

    The reason is that the ESC key shortcut to close RHP is subscribed in SidebarLinks component.

    const shortcutConfig = CONST.KEYBOARD_SHORTCUTS.ESCAPE;
    const unsubscribeEscapeKey = KeyboardShortcut.subscribe(
    shortcutConfig.shortcutKey,
    () => {
    if (modal.current.willAlertModalBecomeVisible) {
    return;
    }
    if (modal.current.disableDismissOnEscape) {
    return;
    }
    Navigation.dismissModal();
    },
    shortcutConfig.descriptionKey,
    shortcutConfig.modifiers,
    true,
    true,
    );

    When we directly access search/settings page or refresh, the SidebarLinks component (HOME screen) is not mounted yet (not in the nav stack yet). So, the ESC key shortcut is not available.

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

    Moves the subscription from SidebarLinks to AuthScreen, just like the other shortcuts we put there.

    const unsubscribeShortcutsOverviewShortcut = KeyboardShortcut.subscribe(
    shortcutsOverviewShortcutConfig.shortcutKey,
    () => {
    Modal.close(() => {
    if (Navigation.isActiveRoute(ROUTES.KEYBOARD_SHORTCUTS)) {
    return;
    }
    return Navigation.navigate(ROUTES.KEYBOARD_SHORTCUTS);
    });
    },
    shortcutsOverviewShortcutConfig.descriptionKey,
    shortcutsOverviewShortcutConfig.modifiers,
    true,
    );
    // Listen for the key K being pressed so that focus can be given to
    // the chat switcher, or new group chat
    // based on the key modifiers pressed and the operating system
    const unsubscribeSearchShortcut = KeyboardShortcut.subscribe(
    searchShortcutConfig.shortcutKey,
    () => {
    Modal.close(Session.checkIfActionIsAllowed(() => Navigation.navigate(ROUTES.CHAT_FINDER)));
    },
    shortcutsOverviewShortcutConfig.descriptionKey,
    shortcutsOverviewShortcutConfig.modifiers,
    true,
    );
    const unsubscribeChatShortcut = KeyboardShortcut.subscribe(
    chatShortcutConfig.shortcutKey,
    () => {
    Modal.close(Session.checkIfActionIsAllowed(() => Navigation.navigate(ROUTES.NEW)));
    },
    chatShortcutConfig.descriptionKey,
    chatShortcutConfig.modifiers,
    true,
    );
    const unsubscribeDebugShortcut = KeyboardShortcut.subscribe(
    debugShortcutConfig.shortcutKey,
    () => {
    toggleTestToolsModal();
    },
    debugShortcutConfig.descriptionKey,
    debugShortcutConfig.modifiers,
    true,
    );

  5. melvin-bot commented on Aug 12, 2024

    @melvin-bot

    @muttmuure Huh... This is 4 days overdue. Who can take care of this?

  6. melvin-bot commented on Aug 14, 2024

    @melvin-bot

    @muttmuure Still overdue 6 days?! Let's take care of this!

  7. melvin-bot commented on Aug 16, 2024

    @melvin-bot

    @muttmuure 8 days overdue is a lot. Should this be a Weekly issue? If so, feel free to change it!

  8. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Aug 19, 2024
  9. changed the title [-]Search - Esc key does not close the search dialog after navigating to search filters[/-] [+][$250] Search - Esc key does not close the search dialog after navigating to search filters[/+] on Aug 19, 2024
  10. melvin-bot commented on Aug 19, 2024

    @melvin-bot
  11. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Aug 19, 2024
  12. 20 remaining items

  13. JmillsExpensify commented on Sep 16, 2024

    @JmillsExpensify
    Contributor

    $250 approved for @bernhardoj

  14. melvin-bot commented on Sep 26, 2024

    @melvin-bot

    @AndrewGable, @akinwale, @muttmuure, @bernhardoj Whoops! This issue is 2 days overdue. Let's get this updated quick!

  15. melvin-bot commented on Sep 30, 2024

    @melvin-bot

    @AndrewGable, @akinwale, @muttmuure, @bernhardoj 6 days overdue. This is scarier than being forced to listen to Vogon poetry!

  16. melvin-bot commented on Oct 2, 2024

    @melvin-bot

    @AndrewGable, @akinwale, @muttmuure, @bernhardoj Now this issue is 8 days overdue. Are you sure this should be a Daily? Feel free to change it!

  17. melvin-bot commented on Oct 4, 2024

    @melvin-bot

    @AndrewGable, @akinwale, @muttmuure, @bernhardoj 10 days overdue. Is anyone even seeing these? Hello?

  18. melvin-bot commented on Oct 9, 2024

    @melvin-bot

    This issue has not been updated in over 14 days. @AndrewGable, @akinwale, @muttmuure, @bernhardoj eroding to Weekly issue.

  19. melvin-bot commented on Nov 1, 2024

    @melvin-bot

    This issue has not been updated in over 15 days. @AndrewGable, @akinwale, @muttmuure, @bernhardoj eroding to Monthly issue.

    P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!

  20. akinwale commented on Dec 11, 2024

    @akinwale
    Contributor

    @muttmuure I believe this can be closed.

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

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.ExternalAdded to denote the issue can be worked on by a contributorMonthlyKSv2ReviewingHas a PR in review

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions