-
Notifications
You must be signed in to change notification settings - Fork 3k
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-09-21] [$1000] Log in -Didn't receive magic code button is clickable while loading #25932
Comments
ProposalPlease re-state the problem that we are trying to solve in this issue."Didn't receive code" is still pressable while account is loading What is the root cause of that problem?We are disabling this link only when the network is offline and we are not disabling in when the account is loading here.
What changes do you think we should make in order to solve the problem?We should change the disabled={props.network.isOffline || props.account.isLoading} We need to adjust the style here
as well to StyleUtils.getDisabledLinkStyles(props.network.isOffline || props.account.isLoading) What alternative solutions did you explore? (Optional)We can make this change in the ResultdisableDidNotReceiveMagicCodePressableWhileAccountIsLoading.mov |
ProposalPlease re-state the problem that we are trying to solve in this issue.Log in -Didn't receive magic code button is clickable while loading What is the root cause of that problem?The reason the button remains active and clickable is that we are disabling it only under the condition of network.isOffline without accounting for loading. App/src/pages/signin/ValidateCodeForm/BaseValidateCodeForm.js Lines 278 to 282 in 56f0b0f
What changes do you think we should make in order to solve the problem?We should add props.account.isLoading to both the disabled variable we are passing and the style of the text to make sure the button is disabled while loading. <PressableWithFeedback
..
...
disabled={props.network.isOffline || props.account.isLoading}
..
...
<Text style={[StyleUtils.getDisabledLinkStyles(props.network.isOffline || props.account.isLoading)]}></Text> ResultScreen.Recording.2023-08-15.at.2.14.11.PM.mov |
Triggered auto assignment to @kevinksullivan ( |
Bug0 Triage Checklist (Main S/O)
|
ProposalPlease re-state the problem that we are trying to solve in this issue.We can still click "Didn't receive magic code" after submitting the magic code input. This happens on secondary login validation too. What is the root cause of that problem?We don't disable the "Didn't receive magic code" text button while the magic code submit request is loading. What changes do you think we should make in order to solve the problem?Disable the "Didn't receive magic code" text button while loading with the condition from below LOC. App/src/pages/signin/ValidateCodeForm/BaseValidateCodeForm.js Lines 302 to 304 in e572007
I think we can store it in a variable to make it clean
For secondary login validation, we don't need the |
Job added to Upwork: https://www.upwork.com/jobs/~0167751214ac5ebd0b |
Moving forward |
Current assignee @kevinksullivan is eligible for the External assigner, not assigning anyone new. |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @Ollyws ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.When signing in via magic link, if the user submits their magic code after the 30 second resend window is finished, the "Didn't receive a magic code?" link is still clickable and active -- but it shouldn't be whilst the magic code is being verified (i.e., the form is loading). What is the root cause of that problem?The following line only disables the "Didn't receive a magic code?" button when the network is offline (
What changes do you think we should make in order to solve the problem?We should also disable the button in the case that the form is loading. This would mean:
I don't think we need to check the value of
What alternative solutions did you explore? (Optional)Note: Another bug in the same component I also found another bug in the same section of code whilst looking into this issue. The App/src/pages/signin/ValidateCodeForm/BaseValidateCodeForm.js Lines 286 to 290 in 9b34d34
This should be changed to This bug seems to have been introduced in a95b3e2 when the "Request a new code" error text was first added. |
📣 @shu8! 📣
|
✅ Contributor details stored successfully. Thank you for contributing to Expensify! |
Hi @Ollyws let me know when you'll be able to review the proposal above! |
|
Triggered auto assignment to @youssef-lr, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
@Ollyws Sign in button appears in both the magic code and 2FA screen so it is shown as loading for both the magic code and 2FA screen pages. But the 'Didn't receive magic code' appears only on the first page and not on the 2FA page even when 2FA is enabled. So I think simply copying the button condition here has not much meaning. Could @bernhardoj post a video showing the case where this addition of condition is beneficial? It appears like an unnecessary condition serving no purpose in any case but added 'just to be safe' even though we don't know what we are being safe from. I am asking this because I saw that condition in button and did my handful experiments and felt like it is not worth it to add even as an alternative solution. I just would like to know the specific condition I missed. If we cannot identify the case where this addition of condition |
@c3024 Thanks for the comment. In retrospect maybe my decision was a little unfair as I should be picking the first proposal to propose the general solution and any details can be worked out in the PR, unless they're absolutely integral to the solution or save us from causing a regression. As far as I'm aware that condition was added in #19393 to remove a delay between when the optimistic data is set (by API calls such as beginSignin) and the success/failure data returned, which was causing the spinner to extend slightly onto the next page for a fraction of a second. It does this by setting the form type in the optimistic data and making sure it doesn't match the form type for our page ( Now if we hadn't added the timer for the magic code link I could see this being useful otherwise it may be disabled for a fraction of a second, but on our current implementation it doesn't really provide any tangible benefit. Any thoughts about why this condition is important @bernhardoj ? |
@bernhardoj 🎀👀🎀 C+ reviewed |
PR ready for review! @Ollyws |
Hi @Yokabdk please apply for reporting bonus when you get a chance |
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 🚀 |
Hey @kevinksullivan i reported the same issue a while back but it was closed out by the team as not important. I believe i should be paid for the reporting bonus if the issue is fixed now. Below is the link for the initial github issue |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.69-2 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-09-21. 🎊 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:
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:
|
@kevinksullivan a slight bump |
Hi @SofoniasN this happens from time to time, and while we try to be consistent in our approach to determining whether or not something is a bug, it's not always perfect. I won't be able to pay out that report. |
@Ollyws can we complete the checklist please? |
There isn't a PR that introduced this issue it has been present since the 'didn't recieve magic code' button was implemented so I don't think the checklist is applicable here, let me know if you think otherwise. |
paid out |
@kevinksullivan Does this mean there is no payment for reporting? |
Sorry @Yokabdk I missed that. Offer sent. |
Let me know when you accept |
@kevinksullivan offer accepted |
thanks, all set. |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Action Performed:
Expected Result:
"Didn't receive the magic code" shouldn't be functional while the password is being processed
Actual Result:
'Didn't receive the magic code' is clickable and made expensify conceirge to resend the code even though you are already logged in
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: v1.3.57-3
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
BR.63.mp4
Recording.1329.mp4
Expensify/Expensify Issue URL:
Issue reported by: @Yokabdk
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1691794873476939
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: