Formless 0.3.0 has been released at long last! This release incorporated tons of suggestions and feedback from @dariooddenino , @davez , @crcornwell, and others. Thanks to everyone who opened issues in the repo or reached out to me with suggestions in Slack.
This release introduces some breaking changes to the library, so the 0.3.0 release notes include a migration guide to help anyone migrating code from 0.2.0. The full migration guide is quite detailed, so here’s a shorter summary:
A short migration guide
Taking these steps should cover the changes you need to update to Formless 0.3.0.
submitterfunction from your component input and move its behavior to where you handle the
outputtype from all component type signatures.
inputfield in the component input to
replaceInputs / ReplaceInputsqueries to
initialize / Initialize.
set*instead, and if you had any places in your code you wish you could have provided a modification function, use
For the longer, more detailed migration guide, see the 0.3.0 release notes.
This version of the library adds some new features along with lots of cleanup of the internals:
You used to only be able to set the value of form fields with
modifysupports an update function and the new
setquery lets you set a field’s value. This is much nicer for things like toggling a boolean field. Plus, if you need to force validation on a non-dirty field, you can now use
identityas your modifying function.
If you wanted to update all values in your form, you used to have to call
modifyon every field. Now, there are
setAllqueries alongside the old
resetAllqueries. Provide a record of input values or input functions and apply them to the full form.
If you had a form with no validation, you previously had to provide a record of validators which did nothing. Now, you can provide the
noValidationfunction as your
validatorsinput. (Thanks, @dariooddenino!)
I’ve figured out how to support action AND request queries in renderless components. Now,
send'work with the full flexibility of
Halogen.query’. This will be added to purescript-halogen-renderless soon, too.
Every helper query is now extracted into the
Formless.Querymodule for easy browsing / documentation.
This is a breaking change for users of Formless 0.2.0 and I understand that can cause some headaches even if PureScript is renowned for its ease of refactoring. I have updated the readme and examples and have provided the migration guide to alleviate as much of this as I can, but it’s possible I’ve missed things. Anyone migrating from 0.2.0 to 0.3.0, please feel free to open issues or message me directly if you need any help migrating.
As usual, I’d love to continue hearing feedback on the library from the community. If things seem pretty stable over the next few weeks, I’ll most likely add a few tutorials and get Formless to a 1.0 release.