PhoenixKit is ready for Phoenix 1.8, and still works with Phoenix 1.7
Phoenix 1.8.0 came out on 5 August, and PhoenixKit is ready for it. The biggest change for a kit that adds pages to your app is how layouts work, so that is where most of our work went.
Layouts in Phoenix 1.7 and 1.8
In Phoenix 1.7 an app sets its layouts in the router; Phoenix 1.8 moves to layouts as function components that each page renders. PhoenixKit’s account and admin pages appear inside your app’s own layout, so they have to follow whichever way your app does it.
PhoenixKit now detects the Phoenix version you are on and picks the right approach by itself: the router-level layout for 1.7 apps, function-component layouts for 1.8. Point it at your layouts with two lines of config and its pages look like the rest of your app:
config :phoenix_kit,
layout: {MyAppWeb.Layouts, :app},
root_layout: {MyAppWeb.Layouts, :root}
Upgrading an app to 1.8
If you move an existing app from Phoenix 1.7 to 1.8, mix phoenix_kit.modernize_layouts updates PhoenixKit’s layout setup to match, so the kit’s pages keep your design after the upgrade.
With this done, the first public release is close.