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

Improved json forms #52

Merged
merged 30 commits into from
Aug 10, 2020
Merged

Improved json forms #52

merged 30 commits into from
Aug 10, 2020

Conversation

otahontas
Copy link
Contributor

@otahontas otahontas commented Aug 7, 2020

Description

This PR will include a lot of improvements for json forms performance- and feature-wise.

Related issues

#53 #43 #47

Type of change

  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Changes Made

  • Moved away from Formik to react-hook-forms (react-hook-form.com/)
  • rewrote jsonschema parser to handle react-hook-form -based fields
  • added support for arrays inside arrays
  • added ajv-based validation of fields, so now validation is exactly the same in frontend and in backend
  • added support for posting json form data to backend

Testing

  • Needs testing

otahontas and others added 30 commits August 6, 2020 13:57
Formiks controlled field components make rendering really slow with
large forms (such as experiment, analysis). React-hook-forms is
based on uncontrolled field components, so it should make forms
better performance-wise.
The most recent version in npm doesn't follow correct Joi library
upstream, so this is just a workaround. Fix this when new version
of enjoi gets released!
@otahontas otahontas self-assigned this Aug 10, 2020
@otahontas otahontas marked this pull request as ready for review August 10, 2020 06:51
Copy link
Contributor

@blankdots blankdots left a comment

Choose a reason for hiding this comment

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

Functionality seems to be there as pointed out, would need a bit of redesign on the form side as now for some reason the save button looks misplaced.

approving as is. as it is relevant for moving forward

@otahontas otahontas merged commit 6038f76 into develop Aug 10, 2020
@otahontas otahontas deleted the feature/improve-json-forms branch August 10, 2020 10:00
@otahontas otahontas mentioned this pull request Aug 13, 2020
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants