-
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
[$500] Re-entering same wrong magic code and verify keeps last digit in green #26813
Comments
Triggered auto assignment to @conorpendergrast ( |
Bug0 Triage Checklist (Main S/O)
|
Proposal by: @dhanashree-sawant ProposalPlease re-state the problem that we are trying to solve in this issue.We are solving the problem of app displaying green border to magic code first and last field when submitted without any value or when resubmitted same value What is the root cause of that problem?Currently in
What changes do you think we should make in order to solve the problem?We have to introduce variable which will let us know that
Set the state to true on
Pass on both the variable and method (so we can again it to false on focus of any input) at following location
In MagicCodeInput component: App/src/components/MagicCodeInput.js Line 62 in 9701fbe
Modify style condition for the digit view to allow
Set
This will also modify state value in What alternative solutions did you explore? (Optional) |
Dupe - #20416 |
@alitoshmatov Can you add some context? Same root cause, but different effect? |
I think it's not a dupe. In this issue, the validation request does not run at all when the magic code value is the same. |
@bernhardoj You right, I think I made mistake. It does not look same |
Nice, thanks for the confirmation there! I'll review and triage this accordingly |
Job added to Upwork: https://www.upwork.com/jobs/~013d5900e7078ce653 |
Current assignee @conorpendergrast is eligible for the External assigner, not assigning anyone new. |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @ArekChr ( |
Reproduced! |
ProposalPlease re-state the problem that we are trying to solve in this issue.Re-entering same wrong magic code and verify keeps last digit in green What is the root cause of that problem?We do not blur the App/src/pages/settings/Profile/Contacts/ValidateCodeForm/BaseValidateCodeForm.js Lines 199 to 202 in db1a306
The App/src/pages/settings/Profile/Contacts/ValidateCodeForm/BaseValidateCodeForm.js Lines 136 to 149 in db1a306
The current behaviour degrades UX as goes against the general user expectation of blurring when a button is clicked. What changes do you think we should make in order to solve the problem?We should add blur logic to the if (inputValidateCodeRef.current) {
inputValidateCodeRef.current.blur();
} The This change is needed as when an action context is clicked, blur is expected. ResultThis works perfectly:Screencast.from.08-09-23.08.48.52.PM.IST.webmClicking verify takes away the focus What alternative solutions did you explore? (Optional)xx |
ProposalPlease re-state the problem that we are trying to solve in this issue.App displays last digit with green dash when error is dismissed and again same code is entered and error is triggered in add contact method What is the root cause of that problem?When we blur the magic code input by clicking outside (including clicking the In this case, although we click on a button outside, the input is validated (and show error), but the green underline remains. What changes do you think we should make in order to solve the problem?We need to blur the magic code input properly if the We should add
to below this line That should already work fine, but we can improve the condition further by early return if the "related target" of the blur is another text input item (we don't need to blur the magic code input if we're clicking on another input item). This will fix:
What alternative solutions did you explore? (Optional)If instead we want the text input focus to be sticky (if clicking outside, it will not blur the input, and we can still type), then we need to use a combination of |
@conorpendergrast, @ArekChr Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
Triggered auto assignment to @laurenreidexpensify ( |
Can somebody summarize what the different proposals do at a high level, and what the behavior is
Maybe it's worth discussing in #expensify-open-source what the ideal behavior should be, cause I think clicking/tapping outside the inputs should remove the focus (and highlight) from them, but I also think it'd be good, at least for the login page, to re-focus on the last input when an invalid magic code is entered and we put an error message on the screen |
@cead22 @ArekChr @laurenreidexpensify this issue is now 3 weeks old. There is one more week left before this issue breaks WAQ and will need to go internal. What needs to happen to get a PR in review this week? Please create a thread in #expensify-open-source to discuss. Thanks! |
Hi @cead22, 1. neonbhai's proposal(comment):Root Cause:Stating that the verify button on the add contact method does not take away the blur (it is missing the code for it). Whereas Verify buttons in similar flows do take away the blur. Proposed Fix:Add blurring logic on Verify 2. dukenv's proposal(comment):Root Cause:Stating that blur on clicking outside is missing from the core MagicCodeInput.js component. We are not handling blur on the component itself. Proposed Fix:Add |
Just stating that dukenv's problem has already been reported here and issue is being worked on. We are still missing the Focus Check on the |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
@cead22, @ArekChr, @laurenreidexpensify Huh... This is 4 days overdue. Who can take care of this? |
@ArekChr bump thanks - #26813 (comment) |
@cead22 @ArekChr @laurenreidexpensify this issue is now 4 weeks old and preventing us from maintaining WAQ, can you:
Thanks! |
Current assignee @ArekChr is eligible for the Internal assigner, not assigning anyone new. |
@ArekChr do you agree that is no longer reproducible - #26813 (comment)? |
@laurenreidexpensify The issue is still reproducible, the last input is still focused (green) when entering the same number and pressing verify. Nagranie.z.ekranu.2023-10-5.o.16.09.15.mov |
I think we might want to hold on this PR, that fix might solve this one. |
Sounds like we can close, but reopen if I misunderstood |
Hi @cead22, @Santhosh-Sellavel the actual issue is itself the green last digit which is still reproducible. If it is being handled by that PR, would this be eligible for reporting bonus as PR is raised for issues raised after this issue. |
I don't think so, since that PR links to 3 other issues, so this is just another symptom of the same root cause |
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:
App should have red dash below all the digits when error is triggered in add contact method
Actual Result:
App displays last digit with green dash when error is dismissed and again same code is entered and error is triggered in add contact method
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.3.63-2
Reproducible in staging?: Yes
Reproducible in production?: Yes
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
green.dash.on.last.digit.on.re.enter.same.code.mp4
Recording.421.mp4
Expensify/Expensify Issue URL:
Issue reported by: @dhanashree-sawant
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1693501161646589
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: