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.49k stars 2.85k forks source link

Copilot - Clicking outside magic code RHP does not dismiss the RHP entirely #51272

Open IuliiaHerets opened 21 hours ago

IuliiaHerets commented 21 hours 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.52-2 Reproducible in staging?: Y Reproducible in production?: N Email or phone of affected tester (no customers): applausetester+kh081006@applause.expensifail.com Issue reported by: Applause Internal Team

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to Account settings > Security.
  3. Click Add copilot.
  4. Select a user > Next.
  5. Select an access level > Next.
  6. Click Add copilot.
  7. Click outside the RHP to dismiss it.

Expected Result:

The RHP will be dismissed when clicking outside it for the first time (production behavior).

Actual Result:

The RHP is not dismissed when clicking outside it for the first time. It returns to copilot confirmation page.

Workaround:

Unknown

Platforms:

Screenshots/Videos

https://github.com/user-attachments/assets/f1f8540d-f066-4bcf-ab49-22278b208943

View all open jobs on GitHub

melvin-bot[bot] commented 21 hours ago

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

melvin-bot[bot] commented 21 hours ago

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

melvin-bot[bot] commented 21 hours ago

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

github-actions[bot] commented 21 hours ago

:wave: 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.
mkzie2 commented 21 hours ago

Proposal

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

The RHP is not dismissed when clicking outside it for the first time. It returns to copilot confirmation page.

What is the root cause of that problem?

We only hide the modal when it's closed

https://github.com/Expensify/App/blob/3e2705055c1e8a0d20745aa3f44d72af706dcd52/src/pages/settings/Security/AddDelegate/DelegateMagicCodeModal.tsx#L36-L38

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

We should dismiss the modal if we click outside. We can add onBackdropPress to Modal here.

onBackdropPress={() => {
    Navigation.dismissModal();
}}

https://github.com/Expensify/App/blob/3e2705055c1e8a0d20745aa3f44d72af706dcd52/src/components/ValidateCodeActionModal/index.tsx#L50

OPTIONAL: We can introduce a new prop onBackdropPress in ValidateCodeActionModal and add onBackdropPress here that will dismiss the modal here and other places that use ValidateCodeActionModal and want to dismiss the modal if clicking outside.

https://github.com/Expensify/App/blob/3e2705055c1e8a0d20745aa3f44d72af706dcd52/src/pages/settings/Security/AddDelegate/DelegateMagicCodeModal.tsx#L56

What alternative solutions did you explore? (Optional)

pecanoro commented 21 hours ago

Since this is under a beta, I am going to remove the blocker first