Skip to content

[$500] IdentityForm #10729

Closed
Closed

Description

@neil-marcellini

Coming from the New Expensify Forms design doc, we should refactor the inputs within the IdentityForm to be compatible with the new Form component, following the guidelines below:

Here's an example of a Form refactor: #9056
Here is a component that had its inputs refactored to be compatible with Form.js.

Guidelines

Contributors should first read FORMS.md.
The refactored inputs should be functional when wrapped by Form.js and when not.

  1. Add an optional inputID prop.
  2. Add an optional shouldSaveDraft prop that defaults to false.
  3. Make the value prop optional.
  4. Change any onChange prop, e.g. onTextChange to onChange.
  5. In the input’s onBlur method, call props.onBlur().
  6. In the input’s onChange method, call props.onChange() .
  7. Remove the hasError prop.
  8. Update the error message to display if errorText is truthy.
  9. Make sure that props.ref is attached to the appropriate DOM node. This could involve forwarding the ref to a child component.
  10. Make sure the ref is exposing both value and focus().
  11. Add an optional maxLength prop to text inputs and UI to display the current character count out of the limit.
  12. Add a hint prop and display the text under the input if there is no existing error.
  13. 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)

Activity

  1. added
    External
    on Aug 31, 2022
  2. melvin-bot commented on Aug 31, 2022

    @melvin-bot

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

  3. neil-marcellini commented on Aug 31, 2022

    @neil-marcellini
    ContributorAuthor

    It might be a good idea to price this issue at $500+ right away since it's a precursor to the RequestorStep refactor.

  4. mollfpr commented on Aug 31, 2022

    @mollfpr
    Contributor

    @neil-marcellini May I know the plan for deploying this form? Is this form will be deployed before refactoring ACHContractStep and RequestStep?

    I also think the proposal should include refactoring AddressForm (since it's been used in IdentityForm).

  5. changed the title [-][Form Refactor] IdentityForm[/-] [+][HOLD 10738] [Form Refactor] IdentityForm[/+] on Sep 1, 2022
  6. neil-marcellini commented on Sep 1, 2022

    @neil-marcellini
    ContributorAuthor

    Great point about the AddressForm. I created this issue to refactor it #10738. I also updated this description because this refactor will only involve updating the inputs to be compatible with Form.js. Please submit your proposal for AddressForm. Thanks.

  7. neil-marcellini commented on Sep 1, 2022

    @neil-marcellini
    ContributorAuthor

    deployed before refactoring ACHContractStep and RequestStep?

    Yes. We will start with AddressForm, then IdentityForm, and then RequestorStep. Then eventually ACHContractStep.

  8. mollfpr commented on Sep 1, 2022

    @mollfpr
    Contributor

    @neil-marcellini Got it! I'm on my way to send the proposal for AddressForm.

  9. JmillsExpensify commented on Sep 5, 2022

    @JmillsExpensify
    Contributor

    Just created an Upwork job here: https://www.upwork.com/jobs/~01604cc324bbf955b6. I went ahead and started the posting at $500. cc @neil-marcellini

  10. 98 remaining items

  11. JmillsExpensify commented on Nov 16, 2022

    @JmillsExpensify
    Contributor

    @Santhosh-Sellavel @neil-marcellini The regression period has passed. At this point, this PR is merged and IndentityForm is "done." What's our plan for testing this in conjunction with related issues? Should that happen in a separate issue when #12400 and #9581 are ready?

  12. Santhosh-Sellavel commented on Nov 16, 2022

    @Santhosh-Sellavel
    Collaborator

    @JmillsExpensify When #9581 is ready, this should work!

  13. JmillsExpensify commented on Nov 17, 2022

    @JmillsExpensify
    Contributor

    Ok, I'm going to go ahead and issue payment. Per the process, the PR is merged and has been for 7 days. I don't feel great about waiting on a related issue that is not yet merged. That part is on Expensify.

  14. added
    Weekly
    and removed
    Awaiting Payment
    Daily
    on Nov 17, 2022
  15. JmillsExpensify commented on Nov 17, 2022

    @JmillsExpensify
    Contributor

    Alright, all contributors paid out. I removed the Awaiting Payment label and I'm also updating the hold as well. We can come back to this and test when #9581 is ready.

  16. changed the title [-][HOLD for payment 2022-11-16] [$500] IdentityForm[/-] [+][HOLD #9581] [$500] IdentityForm[/+] on Nov 17, 2022
  17. JmillsExpensify commented on Nov 22, 2022

    @JmillsExpensify
    Contributor

    Review of the linked/holding PR is in progress! I'll have to check back in the coming days.

  18. JmillsExpensify commented on Nov 27, 2022

    @JmillsExpensify
    Contributor

    #9581 is merged and on staging at this point, so I think we should be able to remove the hold and move forward with next steps. Does that sound right @Santhosh-Sellavel @neil-marcellini?

  19. Santhosh-Sellavel commented on Nov 27, 2022

    @Santhosh-Sellavel
    Collaborator

    We can close this now or along with #9581.This is already merged, we were waiting for test a particular test case which is passing now. @JmillsExpensify

  20. JmillsExpensify commented on Nov 27, 2022

    @JmillsExpensify
    Contributor

    Awesome, sounds like a plan. As for regression tests, I think we are already covered via this test. Accordingly, I'm going to close. cc @luacmartins please re-open if you disagree and I'll make sure any additional cases are added to that existing test.

  21. changed the title [-][HOLD #9581] [$500] IdentityForm[/-] [+][$500] IdentityForm[/+] on Nov 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

EngineeringExternalNewFeatureReviewingWeekly

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions