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

feat: support additional components inside forms #2497

Merged
merged 4 commits into from
Jun 19, 2024

Conversation

FrederikBolding
Copy link
Member

@FrederikBolding FrederikBolding commented Jun 18, 2024

Adds support for additional components inside forms, essentially allowing all children of Box to also be children of Form. Although Form remains the only component where Field can exist. This also means forms can now be nested, when this happens the input state is tied to the nearest parent form.

To support this change, a refactor of the constructState function was done. This function now uses walkJsx to walk the entire JSX tree and collect state values.

Closes #2496

@FrederikBolding FrederikBolding force-pushed the fb/additional-components-in-forms branch from 99bbf6d to f43bc38 Compare June 18, 2024 15:08
@FrederikBolding
Copy link
Member Author

@metamaskbot update-pr

Copy link

codecov bot commented Jun 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.36%. Comparing base (a435bff) to head (6d4c157).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2497   +/-   ##
=======================================
  Coverage   94.35%   94.36%           
=======================================
  Files         441      441           
  Lines        9076     9068    -8     
  Branches     1398     1396    -2     
=======================================
- Hits         8564     8557    -7     
+ Misses        512      511    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@FrederikBolding FrederikBolding marked this pull request as ready for review June 19, 2024 09:54
@FrederikBolding FrederikBolding requested a review from a team as a code owner June 19, 2024 09:54
@FrederikBolding FrederikBolding force-pushed the fb/additional-components-in-forms branch from 7da07b6 to 6d4c157 Compare June 19, 2024 10:25
@FrederikBolding FrederikBolding merged commit ea36386 into main Jun 19, 2024
156 checks passed
@FrederikBolding FrederikBolding deleted the fb/additional-components-in-forms branch June 19, 2024 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants