-
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-09-18] [$1000] Bank account - Inconsistency bug: Checking ToS box before filling fields throws error in mweb but not in android app #26009
Comments
Triggered auto assignment to @strepanier03 ( |
Bug0 Triage Checklist (Main S/O)
|
ProposalPlease re-state the problem that we are trying to solve in this issue.Checking the ToS box before filling fields throws an error in MWeb but not in android app What is the root cause of that problem?On mobile web, checking the ToS box causes the blur event for the text input field to fire which triggers validation. On native platforms, this is not the case. What changes do you think we should make in order to solve the problem?Either of Solution 1 or 2 has to be selected for implementation. Solution 1
Solution 2
and set the ref for the
and set it as the
and change the
Solution 3 What alternative solutions did you explore? (Optional)None. |
ProposalPlease re-state the problem that we are trying to solve in this issue.Bank account - Inconsistency bug: Checking ToS box before filling fields throws error in mweb but not in android app What is the root cause of that problem?The root cause of this issue is value change for the input not trigger blur event. In this case the input is checkbox. What alternative solutions did you explore?Update the Lines 219 to 357 in c029dc5
Add new ref const focusedInput = useRef(null); Update childrenWrapperWithProps logic to add ... line 307
onFocus: (event) => {
focusedInput.current = inputID;
if (_.isFunction(child.props.onFocus)) {
child.props.onFocus(event);
}
},
onBlur: .... and update the const inputKey = key || inputID;
if (focusedInput.current && focusedInput.current !== inputKey) {
setTouchedInput(focusedInput.current);
} I have tested this change and it works well. |
📣 @tamdao! 📣
|
Contributor details |
✅ Contributor details stored successfully. Thank you for contributing to Expensify! |
This was previously reported and the GH closed as a feature request, not a bug. |
I'm going to move this to external so that we have consistency between devices. Note that on m/web AND android/native, the error happens if you enter an account number before the routing number. I think the easiest solution is to populate the error when the TOS checkbox or accounting number is entered before the routing number. That way both devices would be just as picky about the order. |
Job added to Upwork: https://www.upwork.com/jobs/~01feabe39f1c833087 |
Current assignee @strepanier03 is eligible for the External assigner, not assigning anyone new. |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @burczu ( |
@strepanier03 Just to be clear: based on your comment, the correct behaviour is to show the validation error when we click/tap on the checkbox first (or trying to provide account number before routing number)? Ergo, we need to fix it on mobile, not on web. Am I right? |
@tamdao Just wondering, what if there is more than one input with |
If this is the expected behaviour, Solution 2 in my proposal takes care of this. |
@burczu if you implement correctly, the form should be only having 1 autFocus. Because the same time only 1 input can be focus |
@tamdao I agree no one should do that but, as far as I know, it's not programmatically forbidden anywhere, so in case there is more than one |
@burczu if you want, I can add more logic to check that. But you know in development, we also need to compare the performance and the value of the logic to make sure that change valuable |
@tamdao Yeah, let's at least try to check how hard it would be - then we can decide if it's worth it. Thanks |
@burczu We can add a flag like this let isTouchedAutoFucusInput = false;
const childrenElements = React.Children.map(childNodes, (child) => {
....
if (child.props.autoFocus && !isTouchedAutoFucusInput) {
setTouchedInput(child.props.inputID);
isTouchedAutoFucusInput = true;
}
.... But I have tested the form with multiple autoFocus, it will cause validation issue when user open the screen like this (not included my change) |
Thanks @tamdao for this investigation! So it seems this check is not necessary because having more than one Let's wait for the confirmation from @strepanier03 about my concern here. But once confirmed I think we will proceed with your proposal. |
That not true :( |
@puneetlath I noticed that the offer sent in upwork for the bug report is 50 dollars, but this issue was created before the new price scheme was announcement and is eligble for the original 250 payment . Could you please look into it. Thanks |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.67-3 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-18. 🎊 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:
|
Payment summary:
Speed bonus assessment: @tamdao assigned on 2023-09-04 / PR merged on 2023-09-08 - 4 days lapsed = not eligible |
@burczu - Please submit your manual request for payment and let me know once you've done so. I will then assign Jason to issue payment. @SofoniasN - I have paid you via Upwork and since this was reported prior to our pay change I made sure it was $250. @tamdao - I took another look at the timeline based on your comment here but I confirmed the date you were assigned and the PR was merged was 4 days so I paid you out via Upwork at $1000. |
@strepanier03 I'm from Callstack, so I'm not eligible for payment for this. In terms of BZ Checklist I'll fill it as soon as I have some free time, because I'm not a bit overwhelmed by issues and PR's... |
Oh doh, I knew that. Thanks for reminding me @burczu 🤦♀️. I'll follow along and finish up once you have time to do the checklist. Thanks again! |
I'm out of the office Monday-Tuesday next week. If urgent action is needed from a BZ either day, please reach out in #expensify-open-source for help. Otherwise I'll check in Wednesday. |
Going to set this to weekly priority since only thing left is the checklist. |
@burczu also, if you have too many issues to handle, please feel encouraged to ask in #contributor-plus if others want to take some over! |
@puneetlath No worries, I've just managed to address all my other assignments and will start handling BZ checklists that are waiting for me. |
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:
|
Thanks! I think we're good to go here. |
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:
Expected Result:
Error throwing should be consistent across platforms
Actual Result:
Inconsistent error throwing
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.3.57-5
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
2023_08_17_02_11_16.mp4
0-02-01-e8ae26ce3bdcff366b1f530ea91e5fefc62c674d40979ebceefdc66bdab510cf_93b629adf30472ab.1.mp4
Expensify/Expensify Issue URL:
Issue reported by: @SofoniasN
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1692271454788889
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: