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

[HOLD for payment 2024-01-02] [$500] Settings - Focus shifts to first digit on shortcut & back #33170

Closed kbecciv closed 8 months ago

kbecciv commented 9 months 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: v1.4.13-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: Email or phone of affected tester (no customers): Logs: https://stackoverflow.com/c/expensify/questions/4856 Expensify/Expensify Issue URL: Issue reported by: Applause - Internal Team Slack conversation:

Action Performed:

  1. Open the app
  2. Open settings->profile->contact methods
  3. Open pending contact method or add new and open that contact method
  4. Type in few digits in the code and use any of the keyboard shortcuts eg: CTRL+K, CTRL+J etc
  5. Click on back and observe that app refocuses back to first magic code input instead on focusing on next empty magic code input OR the magic code input which was focused before opening keyboard shortcut

Expected Result:

App should focus back to next empty magic code input OR magic code input which was focused before opening keyboard shortcut on back from any keyboard shortcut

Actual Result:

App focuses on first magic code input on back from keyboard shortcut even though focus was on other magic code input before opening any keyboard shortcut

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Add any screenshot/video evidence

https://github.com/Expensify/App/assets/93399543/7293e50c-0b84-48a5-95ad-b05053310739

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0143f494715bf21dfc
  • Upwork Job ID: 1735693221598715904
  • Last Price Increase: 2023-12-15
  • Automatic offers:
    • alitoshmatov | Reviewer | 28065220
    • Krishna2323 | Contributor | 28065221
melvin-bot[bot] commented 9 months ago

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

melvin-bot[bot] commented 9 months ago

Triggered auto assignment to @lschurr (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

melvin-bot[bot] commented 9 months ago

Bug0 Triage Checklist (Main S/O)

melvin-bot[bot] commented 9 months ago

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

artus9033 commented 9 months ago

Hi, I'm Artur from Callstack - expert contributor group - and I would like to work on this issue.

melvin-bot[bot] commented 9 months ago

πŸ“£ @artus9033! πŸ“£ Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork. Please follow these steps:

  1. Make sure you've read and understood the contributing guidelines.
  2. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  3. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  4. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details. Screen Shot 2022-11-16 at 4 42 54 PM Format:
    Contributor details
    Your Expensify account email: <REPLACE EMAIL HERE>
    Upwork Profile Link: <REPLACE LINK HERE>
Krishna2323 commented 9 months ago

Proposal

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

Settings - Focus shifts to first digit on shortcut & back #33170

What is the root cause of that problem?

We always focus to the first input using useFocusEffect when page is mounted.

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

Instead of focus inside useFocusEffect we can use focusLastSelected.

https://github.com/Expensify/App/blob/6fc070b5538607a5078ecff15d399d913ffb6093/src/pages/settings/Profile/Contacts/ValidateCodeForm/BaseValidateCodeForm.js#L112

Result

https://github.com/Expensify/App/assets/85894871/9e8946c5-5c5f-4dee-bb6a-b576c68970f6

lschurr commented 9 months ago

Could you review the proposal @alitoshmatov?

alitoshmatov commented 9 months ago

Reviewing

alitoshmatov commented 9 months ago

@Krishna2323 Your RCA is correct. Your solution solves a problem and straightforward

We can go with @Krishna2323 's proposal

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

melvin-bot[bot] commented 9 months ago

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

melvin-bot[bot] commented 9 months ago

πŸ“£ @alitoshmatov πŸŽ‰ 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

melvin-bot[bot] commented 9 months ago

πŸ“£ @Krishna2323 πŸŽ‰ 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 πŸ“–

Krishna2323 commented 9 months ago

@alitoshmatov, PR ready for a review.

melvin-bot[bot] commented 8 months ago

Reviewing label has been removed, please complete the "BugZero Checklist".

melvin-bot[bot] commented 8 months ago

The solution for this issue has been :rocket: deployed to production :rocket: in version 1.4.16-5 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2024-01-02. :confetti_ball:

After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

For reference, here are some details about the assignees on this issue:

melvin-bot[bot] commented 8 months ago

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

lschurr commented 8 months ago

@alitoshmatov could you work through the checklist on this one?

alitoshmatov commented 8 months ago
lschurr commented 8 months ago

Payment summary:

lschurr commented 8 months ago

Payments sent in Upwork. Closing this one out.