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

✨ Update form component #5557

Merged
merged 5 commits into from
Jun 24, 2022
Merged

✨ Update form component #5557

merged 5 commits into from
Jun 24, 2022

Conversation

kschiffer
Copy link
Contributor

@kschiffer kschiffer commented Jun 23, 2022

Summary

This PR applies some updates to the form component that are needed to make better use of formik and enable better internal form middlewares.

Changes

  • Refactor all form related components to functional components, using hooks
  • Make better use of Formiks API to simplify the component
    • This made it possible to get rid of <InnerForm /> within <Form />, making the component a lot more concise
  • Use Formik in a more idiomatic way

Testing

Manual and existing e2e.

Regressions

The end-to-end tests should catch critical bugs. Since the <Form />-component is so ingrained into the Console, it is not unlikely that this change results in bugs. I'm doing my best to test to prevent that.

Notes for Reviewers

  • Doing this also to enable some assistant functions that will come in handy when implementing End device onboarding flow #4847, such as automatic stripping of values for disabled fields.

Checklist

  • Scope: The referenced issue is addressed, there are no unrelated changes.
  • Compatibility: The changes are backwards compatible with existing API, storage, configuration and CLI, according to the compatibility commitments in README.md for the chosen target branch.
  • Documentation: Relevant documentation is added or updated.
  • Changelog: Significant features, behavior changes, deprecations and fixes are added to CHANGELOG.md.
  • Commits: Commit messages follow guidelines in CONTRIBUTING.md, there are no fixup commits left.

@kschiffer kschiffer added c/console This is related to the Console technical debt Not necessarily broken, but could be done better/cleaner ui/web This is related to a web interface labels Jun 23, 2022
@kschiffer kschiffer self-assigned this Jun 23, 2022
@github-actions github-actions bot removed the c/console This is related to the Console label Jun 23, 2022
@kschiffer kschiffer marked this pull request as ready for review June 24, 2022 08:45
@kschiffer kschiffer requested a review from ryaplots as a code owner June 24, 2022 08:45
@kschiffer kschiffer force-pushed the fix/form-functional-component branch from a81d042 to 292d6d7 Compare June 24, 2022 08:50
@kschiffer kschiffer merged commit 859e1e9 into v3.20 Jun 24, 2022
@kschiffer kschiffer deleted the fix/form-functional-component branch June 24, 2022 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
technical debt Not necessarily broken, but could be done better/cleaner ui/web This is related to a web interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants