feat(portal-shell): move theme switcher to footer, drop redundant settings icon #162

Merged
julien merged 1 commits from feat/portal-shell-theme-switcher-to-footer into main 2026-05-16 01:14:37 +02:00

1 Commits

Author SHA1 Message Date
Julien Gautier a8ddb0f63d feat(portal-shell): move theme switcher to footer, drop redundant settings icon
CI / scan (pull_request) Successful in 2m36s
CI / commits (pull_request) Successful in 2m49s
CI / check (pull_request) Successful in 2m56s
CI / a11y (pull_request) Successful in 1m52s
CI / perf (pull_request) Successful in 4m10s
Three coupled chrome adjustments — all in `portal-shell`'s shell
layout, all motivated by the same realisation that the user-menu
introduced in #149 made the header's standalone Settings icon
redundant and surfaced an inconsistency in the theme switcher's
placement.

* **Drop the standalone Settings button** from the header. The
  UserMenu already carries a "Settings (Soon)" row for authenticated
  users, and Settings has no meaning for anonymous traffic. The
  icon pointed nowhere; carrying it doubled the surface and forced
  readers to guess which control to use. The `header.action.settings`
  i18n unit is removed from `messages.fr.xlf` in the same step so
  the prod build's `i18nMissingTranslation=error` policy stays
  consistent.

* **Move `<app-theme-switcher>` from the header to the footer.** It
  now sits beside `<app-locale-switcher>` in a single "device-prefs"
  cluster on the right side of the footer. The alternative
  considered — keeping it in the header for anonymous traffic and
  moving it into the user menu once authenticated — was rejected:
  the trigger location for an identical control (changing read
  conditions) must not depend on auth state, especially for an
  a11y-first platform per ADR-0016. A reader who relies on dark
  mode shouldn't have to expand a menu they don't recognise on
  first visit to escape a flashing white background. The footer
  matches what ADR-0019 already established for the locale
  switcher (ambient device preferences live there).

* **Reshape the footer into two semantic clusters.** The
  Accessibility statement link moves from the right (preferences)
  cluster to the left, joining the copyright with a typographic
  separator (`·`). Left = static info / legal anchor ("who owns
  this, where to find legal info"); right = interactive prefs
  ("what I control about this page"). Keyboard order naturally
  follows: a Tab-traversal from main content hits info before
  interactive controls.

Specs updated:
  - Header spec swaps "renders Settings button" / "embeds theme
    switcher" assertions for the absence guards that lock the
    new layout.
  - Footer spec adds a theme-switcher assertion and a cluster-grouping
    assertion that pins copyright + accessibility to the first
    direct-child div, locale + theme to the second.

Verification: `pnpm nx run-many -t lint test build --projects=portal-shell`
green, 43 portal-shell specs (was 40); the i18n-strict production
build (`portal-shell:build:production`) passes too — confirms the
xlf cleanup didn't strand any source-locale reference.
2026-05-16 01:06:34 +02:00