v0.14.0 (Beta 27.08.2021)
A new IHP release with new features and many bug fixes. This release is also the first release that comes with an IHP Pro release 🚀
Major Changes
-
💎 IHP Pro Available now:
The new IHP Pro and IHP Business subscriptions are available now 🎉Check them out here!
If you're curious about the details, check out this forum thread! -
Allow scheduling jobs at a specific time with
runAt
:
The job queue table's now have arun_at
column. Jobs are only executed after the specified time.
The job runner is now also polling the job queue at regular intervals as otherwise scheduled jobs will not be picked up when there's no activity on the job queue table.Here's an example of a job scheduled to run in ten minutes from now:
inTenMinutes <- addUTCTime (10 * 60) <$> getCurrentTime newRecord @DeleteContainerJob |> set #containerId (get #containerId containerBuild) |> set #runAt inTenMinutes |> createRecord
-
New IHP Logo:
The dev server now displays our new beautiful IHP logo 💘
-
Customize File Upload Limits:
By default IHP has a max file size limit when uploading files to the IHP server. You can now customize these limits inside yourConfig/Config.hs
. -
📫 Email Confirmation:
One of the first IHP Pro features now made it :) There's now a built-in standard way to deal with email confirmation. -
OAuth:
Login with Google and Google are now finally available in IHP.This new feature is also part of IHP Pro. Once you're app is running IHP Pro, follow this Guide on how to set it up.
-
New Form Helper:
fileField
:
Previously you had to manually type the HTML code for<input type="file"/>
fields in your forms. We've finally added the missing helper 🎉renderForm :: Company -> Html renderForm company = formFor company [hsx| {(textField #name)} {(fileField #logoUrl)} {submitButton} |]
-
New Function:
createTemporaryDownloadUrlFromPathWithExpiredAt
: Get signed S3 download urls with a custom expiration time
This function is similiar tocreateTemporaryDownloadUrlFromPath
, but you can pass a custom expiration time. ThecreateTemporaryDownloadUrlFromPath
function always generates urls that are valid for 7 days.E.g. this example generates a presigned S3 url to a logo that expires in 5 minutes:
let validInSeconds = 5 * 60 signedUrl <- createTemporaryDownloadUrlFromPathWithExpiredAt validInSeconds "logos/8ed22caa-11ea-4c45-a05e-91a51e72558d" let url :: Text = get #url signedUrl let expiredAt :: UTCTime = get #expiredAt signedUrl
-
Improved Support for GitPod & GitHub Codespaces:
Previously IHP's dev tooling was only running when it was called atlocalhost:8000
. This is a problem in services like GitPod or GitHub spaces, where the the host might not belocalhost
.There are now two env variables
IHP_BASEURL
andIHP_IDE_BASEURL
to override theBaseUrl
configured inConfig/Config.hs
at runtime:export IHP_BASEURL=http://dev.myhost.lo:1337 export IHP_IDE_BASEURL=http://dev.myhost.lo:1338 ./start
We've already integrated this into the IHP GitPod template. If you're curious, follow this link to start a GitPod development session (it's free) with the IHP Template.
These new env vars might also be useful if you run your IHP dev tooling on a different device than your editor inside your local network.
Other Changes
- Fully evaluate blaze html expression before returning the html response in dev mode. This improves error messages when there's an
error
call inside a view. - Fixed many-to-many relations with Int PKs
- refuse to build union query if one of the queries contains joins
- Fixed deleteRecord for composite PKs. Fixed several bugs in code generation for composite PKs
- Fixed issues with loading IHP tests into ghci
- Pagination functions now also work with queries that have a JOIN
- Simplified constraints required for calling isNew: We can detect if a record is new by checking the originalDatabaseRecord field of the meta field. This allows us to drop the constraints that require the form record to have a id field. This allows to use formFor with records that don't have an id field.
- Keep message through multiple redirects
- Fixed crash in SchemaCompiler if the enum has no values.
- Added Int type to SQL Parser: Previously all Int's have been handled like variables (in a way that makes sense :D 1 is just a symbol standing for number 1). This has caused issues as we introduced support for Double literal expressions recently. Now integer literals have their own representation in the AST.
Feature Voting
Help decide what's coming next to IHP by using the Feature Voting!
Updating
See the UPGRADE.md for upgrade instructions.
If you have any problems with updating, let us know on the IHP forum.
📧 To stay in the loop, subscribe to the IHP release emails. Or follow digitally induced on twitter.