Repository navigation
[HOLD for payment 2024-01-26] [$500] Wallet - Fix the errors button is non-functional in Additional details #32520
Description
Activity
- addedExternalAdded to denote the issue can be worked on by a contributorAdded to denote the issue can be worked on by a contributorDailyKSv2KSv2BugSomething is broken. Auto assigns a BugZero manager.Something is broken. Auto assigns a BugZero manager.
on Dec 5, 2023 - changed the title
[-]Wallet - `Fix the errors` button is non-functional in Additional details[/-][+][$500] Wallet - `Fix the errors` button is non-functional in Additional details[/+]on Dec 5, 2023 Job added to Upwork: https://www.upwork.com/jobs/~01ddd8bb8dc018a4a6
Triggered auto assignment to @NicMendonca (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.- addedHelp WantedApply this label when an issue is open to proposals by contributorsApply this label when an issue is open to proposals by contributors
on Dec 5, 2023 Bug0 Triage Checklist (Main S/O)
- This "bug" occurs on a supported platform (ensure
Platformsin OP are ✅) - This bug is not a duplicate report (check E/App issues and #expensify-bugs)
- If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
- This bug is reproducible using the reproduction steps in the OP. S/O
- If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
- If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
- This issue is filled out as thoroughly and clearly as possible
- Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
- I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync
- This "bug" occurs on a supported platform (ensure
Triggered auto assignment to Contributor-plus team member for initial proposal review - @fedirjh (
External)Proposal
Please re-state the problem that we are trying to solve in this issue.
Clicking the "Fix the errors" button does not focus the first radio option as expected in the Idology question form
What is the root cause of that problem?
There
onFixTheErrorsLinkPressedfunction within theFormWrapperis dedicated to focusing an item in the form fields key which in this case defaults to theSingleChoiceQuestionlabel above the radios (in @lanitochka17 's video example, "In which country have you lived?") Since the text component is passed therefattribute rather than theRadioButtons, it's child options cannot be activated as described in the expected behaviour.App/src/components/SingleChoiceQuestion.tsx
Lines 19 to 31 in f80fbe3
return ( <> <Text ref={ref} style={[styles.textStrong, styles.mb5]} > {prompt} </Text> <RadioButtons items={possibleAnswers} key={currentQuestionIndex} onPress={onInputChange} /> App/src/components/Form/FormWrapper.js
Lines 125 to 151 in f80fbe3
onFixTheErrorsLinkPressed={() => { const errorFields = !_.isEmpty(errors) ? errors : formState.errorFields; const focusKey = _.find(_.keys(inputRefs.current), (key) => _.keys(errorFields).includes(key)); const focusInput = inputRefs.current[focusKey].current; // Dismiss the keyboard for non-text fields by checking if the component has the isFocused method, as only TextInput has this method. if (typeof focusInput.isFocused !== 'function') { Keyboard.dismiss(); } // We subtract 10 to scroll slightly above the input if (focusInput.measureLayout && typeof focusInput.measureLayout === 'function') { // We measure relative to the content root, not the scroll view, as that gives // consistent results across mobile and web focusInput.measureLayout(formContentRef.current, (x, y) => formRef.current.scrollTo({ y: y - 10, animated: false, }), ); } // Focus the input after scrolling, as on the Web it gives a slightly better visual result if (focusInput.focus && typeof focusInput.focus === 'function') { focusInput.focus(); } }} What changes do you think we should make in order to solve the problem?
There are a few options.
onFixTheErrorsLinkPressedcould be refactored to include a check if the form input key is a radio button and focus its sibling element if so (or even moved to its own file given the size / extensibility). Another way to could be preserve therefobject for each item withuseImperativeHandle, or applying styles or other indicators to show focus.What alternative solutions did you explore? (Optional)
A longer-term proposal can be to assign the following components to the Typescript migration project (Typescript migration):
- https://github.com/Expensify/App/blob/f80fbe34db2dbb5839946ccfe8b46d8c16462f83/src/components/Form/FormWrapper.js
- https://github.com/Expensify/App/blob/f80fbe34db2dbb5839946ccfe8b46d8c16462f83/src/components/FormAlertWrapper.js
- https://github.com/Expensify/App/blob/f80fbe34db2dbb5839946ccfe8b46d8c16462f83/src/pages/EnablePayments/IdologyQuestions.js
@lanitochka17 This might need some more clarification from the internal team. Do they want the first option to just be focused in order to draw the user's attention, or actually checked? "activated" is a little unclear
78 remaining items
- Reacted by Kamil Owczarz
- addedReviewingHas a PR in reviewHas a PR in reviewWeeklyKSv2KSv2Awaiting PaymentAuto-added when associated PR is deployed to productionAuto-added when associated PR is deployed to productionand removedDailyKSv2KSv2WeeklyKSv2KSv2
on Jan 12, 2024 - changed the title
[-][$500] Wallet - `Fix the errors` button is non-functional in Additional details[/-][+][HOLD for payment 2024-01-26] [$500] Wallet - `Fix the errors` button is non-functional in Additional details[/+]on Jan 19, 2024 Reviewinglabel has been removed, please complete the "BugZero Checklist".The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.27-1 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 2024-01-26. 🎊
For reference, here are some details about the assignees on this issue:
- @fedirjh requires payment automatic offer (Reviewer)
- @kowczarz does not require payment (Contractor)
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:
- [@fedirjh] The PR that introduced the bug has been identified. Link to the PR:
- [@fedirjh] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
- [@fedirjh] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
- [@fedirjh] Determine if we should create a regression test for this bug.
- [@fedirjh] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
- [@NicMendonca] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
BugZero Checklist:
- Link to the PR: [Form Provider Refactor] IdologyQuestions fixes #32196
- Link to comment: Author already aware of it and has fixed it.
- Link to discussion: N/A
- Determine if we should create a regression test for this bug:
1. Open Expensify App 2. Login with expensifail account 3. Go to Settings > Wallet > Enable Wallet 4. Go through plaid verification flow 5. Follow the flow until Idology questions 6. Don't fill anything and press Save & continue 7. Verify that an Error appears without fix the errors alertReacted by Nicole Mendonca@fedirjh you've been paid - thanks!
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: 1.4.8-0
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
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:
Action Performed:
without choosing any variant
Fix the errorsExpected Result:
The first unselected radio button is activated
Actual Result:
Fix the errorsbutton is non-functionalWorkaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6302298_1701805167094.bandicam_2023-12-05_12-51-12-008.mp4
Recording.6004.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit