Beta 24.07.2020
It's time for the next release of IHP: v24072020 🎉 Since the last release we have merged 85 commits by 8 contributors..
Major Changes
- Improved DEFAULT support in createRecord: Previously
createRecord
was always using the sql default value when a column had a default value defined in the database schema. This means that callingproject |> set #name "My new project" |> createRecord
would do aINSERT INTO projects (id, name, user_id) VALUES (DEFAULT, DEFAULT, ...);
instead of using the givenMy new project
name for the project. The sql default value is now only used when it's not overriden. Thanks to @ruhatch 🎉 - updateRecord only updates changes fields: Previously
updateRecord
was always doing anUPDATE
query where it was setting all fields. Now theUPDATE
query will only update columns that have been changed using|> set #someField someValue
on the record. Thanks to @ruhatch 🎉 - Inline JS and CSS in HSX: Previously code like
[hsx|<style>h1 { color: blue}</style>|]
would trigger a parser error. This is now fixed and the inline<style>
tag is rendered as expected. Same with the<script>
tag. - Void tags like
<br>
,<input>
,<hr>
supported in HSX: Previously void tags (tags without a closing tag</tag>
) needed to be written in xhtml style (<br />
instead of<br>
). By @ruhatch - Troubleshooting Guide: Our GitHub Wiki got a new section on Troubleshooting. This might help people to find solutions to IHP problems faster when googling the error message.
Minor Changes
- In rendered date times the string
Uhr
(german for "time") has been removed (by @nghamilton) - Optional param functions like
paramOrNothing
now returnNothing
when the param parser fails to parse an empty string (by @nghamilton) - Code Generators offer a select box to chose the application when working with multiple applications in a single project
- Previously when a form was submitted in IHP, but the server rendered a server error, the error page was not shown to the user. This is fixed now.
- Fixed controller generator generating code without table fields when there is an "_" in the table name
- New documentation section: How to update IHP?
- The IHP setup process has now improved support for dealing with
PATH
variables that have spaces in thePATH
string. This improves the situation a lot for windows users. Thanks @adithyaov 🎉 - The api docs have been improved: The haddock quickjump index is now working as expected :)
- HSX now works with HTMX and Ionicons (by @ruhatch)
- Lots of grammar and spelling mistakes have been fixed in the documentation (by @chrislf)
- Missing InputValue and ParamReader instances for Day type have been added
- A new function
includes
has been added toIHP.HaskellSupport
as an alias forelem
- A new function
didChangeRecord
has been added that returnsTrue
when a record has unsaved changes - A new function
didChange #someField someRecord
has been added that returnsTrue
when a field of record has unsaved changes
Updating
To update the IHP version of your project, open default.nix
and change the git commit in line 4 to the following:
rev = "75ea02f8520f4fe1ca02ddfa6901dda8ca246955";
After that run the following command to update your project:
nix-shell -j auto --cores 0 --run 'make -B .envrc'
In case nix starts rebuilding IHP (might take a while), make sure cachix is set up as expected:
cachix use digitallyinduced
Now you can start your project as usual with ./start
.
If you have any problems with updating, let us know on Gitter.
📧 To stay in the loop, subscribe to the IHP release emails. Or follow digitally induced on twitter..
📅 The next release is expected to be released on 07.08.2020.