Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.34k stars 2.77k forks source link

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

Open lanitochka17 opened 1 month ago

lanitochka17 commented 1 month ago

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?

Screenshots/Videos

Add any screenshot/video evidence

https://github.com/user-attachments/assets/1927cc52-69b8-410a-afff-fccd2e52c581

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
melvin-bot[bot] commented 1 month ago

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.

lanitochka17 commented 1 month ago

@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

bernhardoj commented 1 month ago

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. https://github.com/Expensify/App/blob/de894796363ad1bc42fa360c6d7b74f8a26c4b61/src/pages/home/sidebar/SidebarLinks.tsx#L74-L92

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. https://github.com/Expensify/App/blob/de894796363ad1bc42fa360c6d7b74f8a26c4b61/src/libs/Navigation/AppNavigator/AuthScreens.tsx#L275-L321

melvin-bot[bot] commented 1 month ago

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

melvin-bot[bot] commented 1 month ago

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

melvin-bot[bot] commented 1 month ago

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

melvin-bot[bot] commented 1 month ago

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

melvin-bot[bot] commented 1 month ago

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

akinwale commented 1 month ago

We can move forward with @bernhardoj's proposal here.

πŸŽ€πŸ‘€πŸŽ€ C+ reviewed.

melvin-bot[bot] commented 1 month ago

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

melvin-bot[bot] commented 1 month ago

@AndrewGable @akinwale @muttmuure this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

melvin-bot[bot] commented 1 month ago

πŸ“£ @akinwale πŸŽ‰ An offer has been automatically sent to your Upwork account for the Reviewer role πŸŽ‰ Thanks for contributing to the Expensify app!

Offer link Upwork job

bernhardoj commented 1 month ago

PR is ready

cc: @akinwale

akinwale commented 2 weeks ago

Automation missed this. Deployed to production on 2024-08-30, so payment is due 2024-09-06.

cc @muttmuure

akinwale commented 2 weeks ago
  • [x] [@akinwale] The PR that introduced the bug has been identified. Link to the PR:
  • [x] [@akinwale] 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:
  • [x] [@akinwale] 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:

Not a regression.

  • [x] [@akinwale] Determine if we should create a regression test for this bug.
  • [x] [@akinwale] 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.

Regression Test Steps

  1. Launch Expensify
  2. Navigate to the deeplink: staging.new.expensify.com/search/filters
  3. Press the ESC key.
  4. Verify that the search filter page was dismissed.

Do we agree πŸ‘ or πŸ‘Ž?

muttmuure commented 1 week ago

@akinwale paid via upwork $250

@bernhardoj - $250

bernhardoj commented 1 week ago

Requested in ND.

JmillsExpensify commented 4 days ago

$250 approved for @bernhardoj