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

Add ability to generate a record of symbol proxies for large forms #13

Merged
merged 5 commits into from Jul 31, 2018

Conversation

1 participant
@thomashoneyman
Copy link
Owner

thomashoneyman commented Jul 31, 2018

What does this pull request do?

Adds a function mkSProxies which allows you to provide a proxy for your form type and receive a record filled with proxies for each of the fields inside. For small forms this won't provide much in the way of savings, but for larger forms it reduces the boilerplate required to create a form and ensures that the proxies stay in sync with the actual fields in the form.

Where should the reviewer start?

Review the new class in Formless.Spec.Transform and the changes in the examples, especially in Polyform and the real-world example.

Other Notes:

This does not require any changes to existing code as you are still free to define symbol proxies manually if you'd like. This is more of a preparatory improvement to the library's functionality to try and provide per-field validation & modification than a major feature addition.

@thomashoneyman thomashoneyman self-assigned this Jul 31, 2018

@thomashoneyman thomashoneyman merged commit f3a24b8 into master Jul 31, 2018

1 check passed

ci/circleci: test Your tests passed on CircleCI!
Details

@thomashoneyman thomashoneyman deleted the sproxy branch Jul 31, 2018

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