Skip to content
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] [Form Refactor] AddPlaidBankAccount #9577

Closed
8 tasks
luacmartins opened this issue Jun 27, 2022 · 19 comments
Closed
8 tasks

[$500] [Form Refactor] AddPlaidBankAccount #9577

luacmartins opened this issue Jun 27, 2022 · 19 comments
Assignees
Labels
Engineering External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2

Comments

@luacmartins
Copy link
Contributor

Coming from the New Expensify Forms design doc, we should refactor AddPlaidBankAccount to use the new form component, follow the guidelines below:

Here's an example of a Form refactor: #9056

Guidelines

  1. Replace the form component with Form.js.
  2. Create a unique Onyx key in ONYXKEYS.FORM and pass it as the formID prop to Form.
  3. Pass a validate callback prop.
  4. Pass an onSubmit callback prop that calls the API via an action.
  5. Update all inputs wrapped by Form, following the guidelines in Refactor inputs.
  6. Remove any unused code.

Testing

Verify that:

  • UI looks as it did before the refactor
  • Values can be added and edited
  • Errors are highlighted correctly (input border)
  • Error messages show up correctly
  • Draft values are saved properly
  • Form alerts are displayed correctly
  • Clicking the fix the errors link focuses the first input with error
  • No duplicate submission of the form occurs (when it's already submitting)
@luacmartins luacmartins added External Added to denote the issue can be worked on by a contributor Engineering Daily KSv2 labels Jun 27, 2022
@melvin-bot
Copy link

melvin-bot bot commented Jun 27, 2022

Triggered auto assignment to @puneetlath (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

@puneetlath
Copy link
Contributor

puneetlath commented Jun 29, 2022

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Daily KSv2 labels Jun 29, 2022
@melvin-bot
Copy link

melvin-bot bot commented Jun 29, 2022

Triggered auto assignment to Contributor-plus team member for initial proposal review - @Santhosh-Sellavel (Exported)

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jun 29, 2022
@melvin-bot
Copy link

melvin-bot bot commented Jun 29, 2022

Current assignee @puneetlath is eligible for the Exported assigner, not assigning anyone new.

@melvin-bot melvin-bot bot changed the title [Form Refactor] AddPlaidBankAccount [$250] [Form Refactor] AddPlaidBankAccount Jun 29, 2022
@luacmartins
Copy link
Contributor Author

This issue is being put on hold because of push to page discussion, as per this comment.

@luacmartins luacmartins changed the title [$250] [Form Refactor] AddPlaidBankAccount [HOLD] [$250] [Form Refactor] AddPlaidBankAccount Jun 29, 2022
@liyamahendra
Copy link
Contributor

@luacmartins I understand this issue is on hold. Just leaving a comment expressing my interested in this task. I believe my relevant experience doing Form implementation in the ProfilePage can prove useful while doing this refactor.

This comment will share updates with me over email, but would be helpful if you can let me know when this issue is ready to work on and if I can take this up! :)

@melvin-bot melvin-bot bot added the Overdue label Jul 7, 2022
@Santhosh-Sellavel
Copy link
Collaborator

on hold

@melvin-bot melvin-bot bot removed the Overdue label Jul 10, 2022
@melvin-bot melvin-bot bot added the Overdue label Jul 19, 2022
@Santhosh-Sellavel
Copy link
Collaborator

on hold

@luacmartins
Copy link
Contributor Author

@puneetlath @Santhosh-Sellavel @liyamahendra this issue is no longer on hold

@luacmartins luacmartins changed the title [HOLD] [$250] [Form Refactor] AddPlaidBankAccount [$250] [Form Refactor] AddPlaidBankAccount Aug 8, 2022
@luacmartins luacmartins removed the Monthly KSv2 label Aug 8, 2022
@puneetlath
Copy link
Contributor

Great! @liyamahendra feel free to make a proposal if you're still interested.

@puneetlath puneetlath added Weekly KSv2 and removed Daily KSv2 labels Aug 9, 2022
@HafeezRai
Copy link

Can i resolve this issue i have experience with RN

@puneetlath
Copy link
Contributor

@HafeezRai feel free to make a proposal. You can look at our contributing guide and other issues in this repo to get a sense of how to do so.

@puneetlath puneetlath changed the title [$250] [Form Refactor] AddPlaidBankAccount [$500] [Form Refactor] AddPlaidBankAccount Aug 12, 2022
@puneetlath
Copy link
Contributor

Updated to $500.

@melvin-bot melvin-bot bot added the Overdue label Aug 22, 2022
@Santhosh-Sellavel
Copy link
Collaborator

Waiting for proposals

@melvin-bot melvin-bot bot removed the Overdue label Aug 22, 2022
@puneetlath puneetlath removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Aug 23, 2022
@puneetlath
Copy link
Contributor

@luacmartins I think I'm going to take this on myself to get familiar with the new form component.

I was looking at addPlaidBankAccount and it's not really a form of its own. The component handles calling plaid getting the data and then renders a picker to select the bank accounts that plaid returned. It doesn't have a submit button or anything.

The selection on that form is then used by a form in the AddPersonalBankAccountPage and BankAccountStep (#9579) components.

So I think the form refactor would actually happen on those two components and not on the addPlaidBankAccount component. Do you agree with that?

@luacmartins
Copy link
Contributor Author

Thanks for the interest in this @puneetlath!

What you said is correct, although we should refactor this part in AddPlaidBankAccount, in addition to AddPersonalBankAccountPage and BankAccountStep.

@melvin-bot melvin-bot bot added the Overdue label Sep 1, 2022
@Santhosh-Sellavel
Copy link
Collaborator

Not overdue, worked internally

@melvin-bot melvin-bot bot removed the Overdue label Sep 2, 2022
@melvin-bot melvin-bot bot added the Overdue label Sep 12, 2022
@youssef-lr
Copy link
Contributor

Hey @puneetlath! If you've got a lot on your plate I wouldn't mind working on this, I have a Form refactoring PR in review and could start working on this while review is ongoing.

@puneetlath
Copy link
Contributor

Ok sounds good! Feel free to take it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Engineering External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2
Projects
None yet
Development

No branches or pull requests

7 participants