-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[HOLD for payment 2023-06-29] [$2000] Web - Login - 2FA Input field not focused when proceed from magic code page #19711
Comments
Triggered auto assignment to @kadiealexander ( |
Bug0 Triage Checklist (Main S/O)
|
ProposalPosting proposal early as per new guidelines Please re-state the problem that we are trying to solve in this issue.Web - Login - 2FA Input field not focused when proceed from magic code page What is the root cause of that problem?We are rendering magic code and 2FA input conditionally via code block shown below. App/src/pages/signin/ValidateCodeForm/BaseValidateCodeForm.js Lines 198 to 242 in 12d2f3c
We can see there is So here problem that we are rendering same component conditionally within same parent, so here react will just pass the new props and keep the component loaded. So component did mount will not trigger when 2FA input appear. This is the root cause of the problem. What changes do you think we should make in order to solve the problem?We have to pass unique key prop to {this.props.account.requiresTwoFactorAuth ? (
<View style={[styles.mv3]}>
<MagicCodeInput
...
key="2FAInput" // *** Add this prop ***
/>
</View>
) : (
<View style={[styles.mv3]}>
<MagicCodeInput
...
key="magicCodeInput" // *** Add this prop ***
/>
<View style={[styles.changeExpensifyLoginLinkContainer]}>
...
</View>
</View>
)} So react will treat both component different and it will mount component from scratch instead of just passing the new props. This will solve the issue as shown in result video. Note: At present I set key for both component for sample purpose, we can decide key as suggested by engineering team. What alternative solutions did you explore? (Optional)None Result19711-2FA-AutoFocus.mp4 |
Reproduced on staging web! 2023-05-30_14-01-08.mp4 |
Job added to Upwork: https://www.upwork.com/jobs/~0145b8fd18db4b7dff |
Current assignee @kadiealexander is eligible for the External assigner, not assigning anyone new. |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @abdulrahuman5196 ( |
Triggered auto assignment to @marcaaron ( |
Does @PrashantMangukiya 's proposal counts or are you waiting for proposals ? His proposal looks good... Can I copy paste it and get chosen ahah ? |
Prashant's proposal counts, we're just waiting on @abdulrahuman5196 to review it. If you have your own proposal to share, by all means go ahead! :) |
Reviewing now |
@PrashantMangukiya The proposal is not working iOS safari? Could you kindly check on that?
I am not entirely sure on the rootcause. Why do we think this happens? Similarity in end DOM structure? Could you add more information to this and any react native reference possible. |
FWIW, auto focusing inputs is really messed up on iOS Safari and doesn't work properly for many cases see this really long issue thread 😄 |
Yes autofocus for safari is messes up as mentioned in comment above. #19711 (comment)
@abdulrahuman5196 here is the react doc link related to this. Here they mention to reset state with key. Thank you. |
@PrashantMangukiya Thanks for references. Tested in all platforms. The solutions works for most platforms except iOS safari and native android. But could you check why its not working on native android?(Not sure if its existing issue as well.) |
@PrashantMangukiya Where you able to get any information for the fix to work in android native as well? |
@abdulrahuman5196 I tried but was not able to find any fix for android native yet. |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
I think either way will work, it just feels like clear already fits perfectly for what we want to do here. It makes sense on both the cases to call clear when the component is initiated. Like @abdulrahuman5196 mentioned it is better to clear all the stale data. But yeah if we want to rather create a new |
I agree on the concerns and suggestions by @BeeMargarida and @hoangzinh here. I think the suggestion of a new method called |
Proposal looks good. Let's please also address this comment in the solution |
📣 @WikusKriek You have been assigned to this job by @luacmartins! |
Thanks, I will address the comments and open the PR shortly. |
@abdulrahuman5196 please note that there was a functional component refactor for BaseValidateCodeForm. The issue does still exist and I made the changes as requested and the fix is still valid. |
Hey team! I'm just adding a note that I'll be OOO until June 26th. I don't think any bug0 team actions will come up this week but if you need a bug0 teammate while I'm gone, please reapply the label! Thanks. |
Based on my calculations, the pull request did not get merged within 3 working days of assignment. Please, check out my computations here:
On to the next one 🚀 |
Melvin is wrong here. PR was merged within 3 working days totally, almost 6 hours before 3 days mark (2 days being weekend out of the 5 days). |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.30-5 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue: If no regressions arise, payment will be issued on 2023-06-29. 🎊 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.
As a reminder, here are the bonuses/penalties that should be applied for any External issue:
|
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:
|
Doesn't seem to be a regression. But was present from original implementation.
yes
|
@kadiealexander Thank you. Accepted the upwork job offer. |
@kadiealexander I also accepted, thanks! |
Everyone is paid (plus a bonus as per #19711 (comment)). Thanks for the speedy work team! |
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:
Precondition - User has setup a 2FA to log into account
Open https://staging.new.expensify.com/
Input email for account from the precondition
Click "Continue"
4.Input magic code
Click "Continue"
Press digits in the keyboard
Expected Result:
After user proceeds to authenticator code input page - the input field is focused and user can instantly type the code
Actual Result:
After user proceeds to authenticator code input page - the input field is NOT focused and user has to additionally click on it to set focus
Workaround:
Can the user still use Expensify without this being fixed? Have you informed them of the workaround?
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.3.19-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
Bug6069872_Recording__606.mp4
Expensify/Expensify Issue URL:
Issue reported by: Applause internal team
Slack conversation:
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: