Skip to content

v0.16.0 (Beta 06.11.2021)

Compare
Choose a tag to compare
@mpscholten mpscholten released this 06 Nov 14:05
· 1964 commits to master since this release
587cb6c

IHP v0.16.0 is out now

A new IHP release with new features and many bug fixes 🚀

IHP is a modern batteries-included haskell web framework, built on top of Haskell and Nix. Blazing fast, secure, easy to refactor and the best developer experience with everything you need - from prototype to production.

Major Changes

  • 🍞 Breadcrumbs:
    @amitaibu added a new API for defining breadcrumb navigations inside your views. This new API makes it easier to customize the breadcrumb rendering across your app, e.g. to use a tailwind css based breadcrumb instead of the default bootstrap based one.

    instance View ShowView where
        html ShowView { .. } = [hsx|
            {breadcrumb}
            <h1>Show Post</h1>
            <p>{post}</p>
    
        |]
            where
                breadcrumb = renderBreadcrumb
                                [ breadcrumbLink "Posts" PostsAction
                                , breadcrumbText "Show Post"
                                ]

    The new breadcrumb functions are automatically used when you generate new controllers or views using the code generators.

    Check out the docs: https://ihp.digitallyinduced.com/Guide/view.html#breadcrumbs

  • 📄 Tailwind + Pagination:
    The CSS classes and HTML code of IHP's pagination can be customized now. This makes it possible to now use the pagination with tailwindcss.

  • 🏭 Build Improvements:
    You can now run nix-build inside your IHP project and it will build the whole project, including background workers and IHP scripts:

    # Optional, if you skip this the binary will not be optimized by GHC
    make prepare-optimized-nix-build
    
    # The actual build process
    nix-build

    This will build a nix package that contains the following binaries:

    • RunProdServer, the binary to start web server
    • RunJobs, if you’re using the IHP job queue, this binary will be the entrypoint for the workers a binary for each script in Application/Script, e.g. Welcome for Application/Script/Welcome.hs
    • The build contains an automatic hash for the IHP_ASSET_VERSION env variable, so cache busting should work out of the box.

    This will make it significant easier to deploy IHP apps.
    If you wondered: These build improvements are also what powers the new Experimental Deployment Process in IHP Cloud.

  • 💻 Helpers to Load Env Vars:
    Along with the recent deployment changes, we're also making it easier to define custom config parameters based on environment variables to your app.

    Inside Config.hs you can now use the env and envOrNothing functions to read env variables:

    module Config where
    
    config :: ConfigBuilder
    config = do
        maxRetryCount <- env @Int "MAX_RETRY_COUNT"
        appName <- env @Text "APP_NAME"
        redisUrl :: Maybe Text <- envOrNothing "REDIS_URL"

    Learn more in the new configuration docs

  • SchemaDesigner: Support for Postgres Policies
    You can now create and manage Postgres Policies inside the Schema Designer:

    image

    This is still an early version and we'll extend the policy editor in future IHP versions. It's going to be used together with the new DataSync APIs soon.

  • 🎨 New 404 Page
    We designed a new nice looking standard 404 for IHP apps :)

    image

    Check out the docs if you want to have your own custom 404 page.

Other Changes

New Contributors

Full Changelog: v0.15.0...v0.16.0

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.