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

Convert form state to use state #2600

Merged
merged 88 commits into from Aug 21, 2020
Merged

Conversation

bluebill1049
Copy link
Member

@bluebill1049 bluebill1049 commented Aug 14, 2020

🎉 Summary

  • convert useRef state to useState
  • export errors object inside formState and keep errors at the root level as an alias
  • update unit tests accordingly
  • update cypress automation tests
  • convert validatedFields & fieldsWithvalidation to Object type
  • upgrade TS4
  • upgrade Cypress 5
  • improve Cypress integration tests with state update by @pmaier983
  • minor Type improvement.

🐞 Bugs

let me know if you have any questions or concerns.

@stramel
Copy link
Contributor

stramel commented Aug 18, 2020

Looks like the net size dropped 300KB across all bundles and functionality is essentially the same. I'm good with this as long as the checks are all passing. I don't see any reason that this should be an issue.

stramel
stramel previously approved these changes Aug 18, 2020
@bluebill1049
Copy link
Member Author

Looks like the net size dropped 300KB across all bundles and functionality is essentially the same. I'm good with this as long as the checks are all passing. I don't see any reason that this should be an issue.

It's actually dropped by refactoring two data types, but yeah thanks for the review @stramel 👍

bluebill1049 and others added 2 commits August 19, 2020 11:04
* Update Yarn Lock and improve cypress tests

* Undo some fixes
@bluebill1049
Copy link
Member Author

fixed @pmaier983

@pmaier983 pmaier983 self-requested a review August 19, 2020 15:13
pmaier983
pmaier983 previously approved these changes Aug 19, 2020
Copy link
Contributor

@pmaier983 pmaier983 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks Awesome! Really great work bill!

@bluebill1049
Copy link
Member Author

Looks Awesome! Really great work bill!

you too :)

});

// it('should validate the form with onChange mode and reset the form', () => {
// cy.visit('http://localhost:3000/controller/onChange');
it('should validate the form with onChange mode and reset the form', () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for fixing! I wonder why it was broken in the first place!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no idea :(

@bluebill1049
Copy link
Member Author

plan to merge it this Friday 👍

@bluebill1049 bluebill1049 merged commit 78a038d into master Aug 21, 2020
@bluebill1049 bluebill1049 deleted the convert-formState-to-useState branch August 21, 2020 06:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants