Skip to content

App layout refactor: Phase 1 - #6598

Open
RobertJoonas wants to merge 2 commits into
masterfrom
layout-refactor-phase-1
Open

App layout refactor: Phase 1#6598
RobertJoonas wants to merge 2 commits into
masterfrom
layout-refactor-phase-1

Conversation

@RobertJoonas

@RobertJoonas RobertJoonas commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Intro

Kick off a gradual modernization of our app's layouts, moving away from the old/classic Phoenix .heex layouts towards function components. Rather than one large re-write, we'll end up in a state where:

  1. Every existing template continues to work with a Layout.legacy component (i.e. current app.html.heex, but delegating to a new <.app> layout under the hood)
  2. It's possible to completely opt out from that legacy layout and use <.app> layout directly, feeding it whatever assigns necessary, straight from the template context

Phases

Phase 1 [This PR] — Turn the root layout's body into a function component
Phase 2 — Introduce Layouts.app and use it in Layout.legacy
Phase 3 — Let individual pages opt out of legacy layout. Do so for auth pages.

This PR

  • Introduce Layouts.legacy -- a function component that renders the whole body of the app, given the whole conn.assigns object (incl. @inner_layout, @inner_content)
  • bg_class and background (color) assigns still need to stay in app.html.heex because otherwise dark/light flickers will surface

Tests

  • This PR does not require tests

Changelog

  • This PR does not make a user-facing change

Documentation

  • This change does not need a documentation update

Dark mode

  • This PR does not change the UI

@RobertJoonas
RobertJoonas requested a review from a team August 14, 2026 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant