Skip to content

[Form Refactor] Request a call page #9575

Closed

Description

@luacmartins

Coming from the New Expensify Forms design doc, we should refactor RequestCallPage 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)

Activity

  1. self-assigned this
    on Jun 27, 2022
  2. changed the title [-]Refactor Request a call page to use Form[/-] [+][Form Refactor] Request a call page[/+] on Jun 27, 2022
  3. changed the title [-][Form Refactor] Request a call page[/-] [+][HOLD] [Form Refactor] Request a call page[/+] on Jun 29, 2022
  4. luacmartins commented on Jun 29, 2022

    @luacmartins
    ContributorAuthor

    Holding on push to page discussion as per this comment

  5. luacmartins commented on Jul 7, 2022

    @luacmartins
    ContributorAuthor

    On hold!

  6. luacmartins commented on Jul 18, 2022

    @luacmartins
    ContributorAuthor

    On hold

  7. luacmartins commented on Jul 27, 2022

    @luacmartins
    ContributorAuthor

    On hold

  8. luacmartins commented on Aug 5, 2022

    @luacmartins
    ContributorAuthor

    On hold

  9. changed the title [-][HOLD] [Form Refactor] Request a call page[/-] [+][Form Refactor] Request a call page[/+] on Aug 8, 2022
  10. luacmartins commented on Aug 8, 2022

    @luacmartins
    ContributorAuthor

    No longer on hold!

  11. added
    Reviewing
    on Aug 16, 2022
  12. melvin-bot commented on Aug 26, 2022

    @melvin-bot

    ⚠️ Looks like this issue was linked to a possible regression on PRODUCTION here

    If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

    If a production regression has occurred a Root Cause Analysis is required. Please follow the instructions here.

    If a regression has occurred and you are the assigned CM follow the instructions here.

    If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

  13. ntdiary commented on Aug 26, 2022

    @ntdiary
    Contributor

    Oh sorry, I think the bot's comment shouldn't be here (maybe it's my fault), I just wanted to cite this issue.

  14. luacmartins commented on Aug 26, 2022

    @luacmartins
    ContributorAuthor

    @ntdiary no worries! these comments have been all over the place.

  15. melvin-bot commented on Sep 16, 2022

    @melvin-bot

    ⚠️ Looks like this issue was linked to a possible regression on PRODUCTION here

    If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

    If a production regression has occurred a Root Cause Analysis is required. Please follow the instructions here.

    If a regression has occurred and you are the assigned CM follow the instructions here.

    If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

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

Metadata

Metadata

Assignees

Labels

EngineeringReviewingWeekly

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions