v0.10.0 (Beta 21.05.2021) #885
mpscholten
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This is another release before our major version 1 :) It comes packed with a lot of small improvements and bug fixes 🚀
Major Changes
Auto Index Creation:
The Schema Designer will now automatically create an index when creating a column that has a foreign key constraint.
E.g. when adding
user_id
column to aprojects
table, the schema designer will also automatically create an index on theuser_id
column. This speeds up queries with conditions on theuser_id
column, typically likequery @Project |> filterWhere (#userId, currentUserId) |> fetch
. In case you don't want an index for specific reasons, you can always manually remove the index again from yourSchema.sql
.Debounce File Changes:
Switching git branches triggers a lot of file changes on the IHP dev server. To avoid long reload times the dev server is debouncing file changes now.
New Functions:
currentAdmin
andcurrentAdminOrNothing
:Like
currentUser
, but works when you also have aadmins
table next to your normalusers
table.Cache Busting:
Sometimes problems are caused when your users still have an old version of your JS or CSS files inside their browsers cache. To avoid this you typically append a hash to the url of your JS or CSS file.
IHP now provides an
assetPath
view helper to deal with this:[hsx| <script={assetPath "/app.js"}/> <link rel="stylesheet" href={assetPath "/app.css"}/> |]
The paths will look like this
"/app.js?v=9be8995c-7055-43d9-a1b2-43e05c210271"
.IHP will set the asset version from the
IHP_ASSET_VERSION
env variable. This should be set to e.g. your git commit hash in production. In development you don't need to specify this environment variable. If you run on IHP Cloud, it works out of the box.Built-in Background Jobs Dashboard:
@zacwood9 added a new very cool dashboard to schedule and manage your IHP background jobs without manually writing lots of CRUD code.
Check the new Guide section to get started
Code of Conduct:
The IHP community now follows the Guidelines for Respectful Communication by the Haskell Foundation.
Improved Form Customization:
We added a new
formForWithOptions
and also a shortcutformForWithoutJavascript
to allow advanced form configuration. This specifically addresses the issue that previously there was no way to disable the javascript form submission for a specific form. Check out the new guide section to learn more.New Function:
filterWhereNot
Like
filterWhere
but negated:New Function:
modifyJust
Like
modify
, but only modifies the value if it's notNothing
.Other Changes
default.nix
it's now possible to request haddock docs for your haskell packagesInteger
ID types in AutoRoutedeleteSession
andgetSessionRecordId
functionsUpdating
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..
This discussion was created from the release v0.10.0 (Beta 21.05.2021).
Beta Was this translation helpful? Give feedback.
All reactions