Skip to content

[HOLD for payment 2024-01-26] [$500] Wallet - Fix the errors button is non-functional in Additional details #32520

Description

@lanitochka17

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:

  1. Go to URL
  2. Log in wirh any account
  3. Go to Settings -> Wallet-> Enable wallet
  4. Go through the process of connecting to Idology questions
  5. Click Save@Submit
    without choosing any variant
  6. Click on Fix the errors

Expected Result:

The first unselected radio button is activated

Actual Result:

Fix the errors button is non-functional

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

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
  • Upwork Job URL: https://www.upwork.com/jobs/~01ddd8bb8dc018a4a6
  • Upwork Job ID: 1732125580300574720
  • Last Price Increase: 2024-01-02
  • Automatic offers:
    • fedirjh | Reviewer | 28095131

Activity

  1. added
    ExternalAdded to denote the issue can be worked on by a contributor
    BugSomething is broken. Auto assigns a BugZero manager.
    on Dec 5, 2023
  2. 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
  3. melvin-bot commented on Dec 5, 2023

    @melvin-bot
  4. melvin-bot commented on Dec 5, 2023

    @melvin-bot

    Triggered auto assignment to @NicMendonca (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

  5. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Dec 5, 2023
  6. melvin-bot commented on Dec 5, 2023

    @melvin-bot

    Bug0 Triage Checklist (Main S/O)

    • This "bug" occurs on a supported platform (ensure Platforms in 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
  7. melvin-bot commented on Dec 5, 2023

    @melvin-bot

    Triggered auto assignment to Contributor-plus team member for initial proposal review - @fedirjh (External)

  8. anduimagui commented on Dec 5, 2023

    @anduimagui

    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 onFixTheErrorsLinkPressed function within the FormWrapper is dedicated to focusing an item in the form fields key which in this case defaults to the SingleChoiceQuestion label above the radios (in @lanitochka17 's video example, "In which country have you lived?") Since the text component is passed the ref attribute rather than the RadioButtons, it's child options cannot be activated as described in the expected behaviour.

    return (
    <>
    <Text
    ref={ref}
    style={[styles.textStrong, styles.mb5]}
    >
    {prompt}
    </Text>
    <RadioButtons
    items={possibleAnswers}
    key={currentQuestionIndex}
    onPress={onInputChange}
    />

    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. onFixTheErrorsLinkPressed could 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 the ref object for each item with useImperativeHandle, 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):

  9. anduimagui commented on Dec 5, 2023

    @anduimagui

    @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

  10. 78 remaining items

  11. blimpich commented on Jan 11, 2024

    @blimpich
    Contributor

    Oh Melvin. Was trying to get it to assign @kowczarz as the contributor, but doesn't seem to want to do it. Not sure if that is important since @kowczarz is part of an expert agency. Either way, @kowczarz feel free to raise the PR and we can figure out how to wrangle Melvin if need be.

  12. added
    ReviewingHas a PR in review
    Awaiting PaymentAuto-added when associated PR is deployed to production
    and removed on Jan 12, 2024
  13. 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
  14. melvin-bot commented on Jan 19, 2024

    @melvin-bot

    Reviewing label has been removed, please complete the "BugZero Checklist".

  15. melvin-bot commented on Jan 19, 2024

    @melvin-bot

    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:

  16. melvin-bot commented on Jan 19, 2024

    @melvin-bot

    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:
  17. fedirjh commented on Jan 24, 2024

    @fedirjh
    Contributor

    BugZero Checklist:

    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 alert
    
  18. NicMendonca commented on Jan 31, 2024

    @NicMendonca
    Contributor

    @fedirjh you've been paid - thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DesignEngineeringExternalAdded to denote the issue can be worked on by a contributorWeeklyKSv2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions