You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit d51edfc
Browse filesBrowse the repository at this point in the historyBrowse files
feat(ui): merge brand and account nav into one slim header
The brand lived in app.html.heex and the account nav in root.html.heex,
so they rendered as two stacked bars (~100px). They are now one 56px
row: logo and version on the left, theme toggle and account links on
the right.
Structure, per the request: a `site_header/1` container composing two
independent components, `brand/1` and `account_nav/1`.
The header moves from root into the app and devices layouts. root keeps
only the skip link, which must stay the first tab stop on every page.
Router: the public scope had no live_session, so :current_user was
never assigned there. With the header rendering inside the LiveView
rather than root, those pages would have shown "Register / Log in" to a
logged-in user. Wrapped them in live_session :public with
mount_current_user (assign_new, so anonymous mounts are unaffected).
Verified on / while logged in: shows the email, Settings and Log out.
The devices layout gets the same header, so /admin/devices keeps the
theme toggle it would otherwise have lost.
Hit targets: slimming the row shrank the toggle to 32px and the logo to
28px, below the 44px minimum. Restored via a ::before overlay on the
toggle buttons and -my-2 + fixed sizing on the logo and nav links, so
targets are 44px while the row stays 56px. Verified in the browser:
every header target measures 44px effective.
Responsive: the version badge hides below sm, and the user email below
lg, so the row does not wrap on narrow screens.
Verified: one row (all three groups share vertical center 28), single
nav landmark, skip link still first tab stop, zero contrast failures
and zero light-painting elements in dark on / and /admin/devices.
Tests unchanged at 9 pre-existing failures.
0 commit comments