App layout refactor: Phase 1 - #6598
Open
RobertJoonas wants to merge 2 commits into
Open
Conversation
This was referenced Aug 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Intro
Kick off a gradual modernization of our app's layouts, moving away from the old/classic Phoenix
.heexlayouts towards function components. Rather than one large re-write, we'll end up in a state where:Layout.legacycomponent (i.e. currentapp.html.heex, but delegating to a new<.app>layout under the hood)<.app>layout directly, feeding it whatever assigns necessary, straight from the template contextPhases
Phase 1 [This PR] — Turn the root layout's body into a function component
Phase 2 — Introduce
Layouts.appand use it inLayout.legacyPhase 3 — Let individual pages opt out of legacy layout. Do so for auth pages.
This PR
Layouts.legacy-- a function component that renders the whole body of the app, given the wholeconn.assignsobject (incl.@inner_layout,@inner_content)bg_classandbackground(color) assigns still need to stay inapp.html.heexbecause otherwise dark/light flickers will surfaceTests
Changelog
Documentation
Dark mode