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.3k stars 2.74k forks source link

Profile - Enterd magic code is not cleared when clearing error message #26819

Closed izarutskaya closed 11 months ago

izarutskaya commented 1 year 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!


Action Performed:

  1. Click on Profile avatar
  2. Click on 'Profile'
  3. Click on 'Contact methods'
  4. Click on 'New contact methods' button
  5. Enter email & click on 'Add' button
  6. Open the newly added contact method
  7. Enter wrong magic code
  8. Click on 'Close' icon of the error message

Expected Result:

Entered magic code should be cleared from magic code input field

Actual Result:

Entered magic code is not cleared from magic code input field

Workaround:

Unknown

Platforms:

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

Version Number: v1.3.63-2

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

Notes/Photos/Videos: Any additional supporting documentation

https://github.com/Expensify/App/assets/115492554/d5ea129d-32c1-457c-a6de-5bbc96b96baf

https://github.com/Expensify/App/assets/115492554/715753cc-20aa-43d5-8736-985f45a54c89

Expensify/Expensify Issue URL:

Issue reported by: @Natnael-Guchima

Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1693290501329629

View all open jobs on GitHub

namhihi237 commented 1 year ago

Proposal

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

The entered magic code should be cleared from the magic code input field

What is the root cause of that problem?

We just cleared the message error when we clicked the close button https://github.com/Expensify/App/blob/4d855643cbfa79f0de91fd16bde132fb6e7b5ada/src/pages/settings/Profile/Contacts/ValidateCodeForm/BaseValidateCodeForm.js#L197

Therefore, the entered magic code will not be cleared.

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

We should clear the magic code and refocus on the input when clearing the message:

onClose = { () => {
        User.clearContactMethodErrors(props.contactMethod, 'validateLogin');
        setValidateCode('');
        inputValidateCodeRef.current.clear();
    }
}

What alternative solutions did you explore? (Optional)

N/A

melvin-bot[bot] commented 1 year ago

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

melvin-bot[bot] commented 1 year ago

Bug0 Triage Checklist (Main S/O)

melvin-bot[bot] commented 12 months ago

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

melvin-bot[bot] commented 12 months ago

@michaelhaxhiu Eep! 4 days overdue now. Issues have feelings too...

melvin-bot[bot] commented 12 months ago

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

melvin-bot[bot] commented 11 months ago

@michaelhaxhiu Now this issue is 8 days overdue. Are you sure this should be a Daily? Feel free to change it!

melvin-bot[bot] commented 11 months ago

@michaelhaxhiu this issue was created 2 weeks ago. Are we close to a solution? Let's make sure we're treating this as a top priority. Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

melvin-bot[bot] commented 11 months ago

@michaelhaxhiu 12 days overdue. Walking. Toward. The. Light...

michaelhaxhiu commented 11 months ago

This doesn't feel like a candid bug to me. It is clear and functional, and there's room to argue the existing behavior is useful.

michaelhaxhiu commented 11 months ago

If you want to make an argument that other platforms handle this differently (e.g. mobile) then you may have a case for a bug report, but I'm not convinced at this stage.