trails/apps/journal/app/components
Ullrich Schäfer 4e2bfb0bbe Redesign navbar with avatar dropdown and mobile drawer
Stream C from docs/information-architecture.md. The navbar's account
cluster (<username> + Settings + Logout) was three controls for the
same concept; the cluster now collapses behind an avatar dropdown.
On mobile, all primary nav and account controls move into a
hamburger drawer so the top bar stays at logo + bell + hamburger
without wrapping at small viewports.

- New apps/journal/app/components/Avatar.tsx — initials-only avatar
  (no image-upload story yet; the component is the single place to
  add image fallback when one lands).
- New apps/journal/app/components/AccountDropdown.tsx — click the
  avatar trigger to reveal Profile / Settings / Log Out menuitems.
  Click-outside + Escape-to-close. role="menu" + role="menuitem" for
  a11y.
- New apps/journal/app/components/MobileNavMenu.tsx — hamburger
  trigger + slide-out drawer at md and below. Contains all primary
  nav (Feed, Explore, Routes, Activities, Notifications) plus the
  account cluster (Profile, Settings, Log Out). Auto-closes on
  navigation; locks body scroll while open.
- apps/journal/app/root.tsx — refactor NavBar:
  * Brand + primary nav links hide at md and below (drawer covers
    them).
  * Right cluster: bell on every viewport; avatar dropdown on
    desktop, hamburger on mobile.
  * Loader exposes user.displayName so Avatar can compute initials.
  * Drops the now-unused Form import; Form moved into the
    dropdown/drawer components.

E2E tests updated:
- e2e/auth.test.ts — logout helper opens the avatar dropdown via
  aria-label = displayName||username, then clicks the Log Out
  menuitem. Username assertions in nav switch from getByText to
  getByRole("button", {name: username}) (the avatar button).
- e2e/settings.test.ts — "settings link visible in nav" opens the
  avatar dropdown first, then asserts the Settings menuitem.

i18n: nav.openMenu, nav.closeMenu keys for the hamburger trigger
labels (EN + DE).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-26 09:56:20 +02:00
..
AccountDropdown.tsx Redesign navbar with avatar dropdown and mobile drawer 2026-04-26 09:56:20 +02:00
AlphaBanner.tsx Add legal pages, ToS acceptance, and alpha banner 2026-04-18 00:08:48 +02:00
Avatar.tsx Redesign navbar with avatar dropdown and mobile drawer 2026-04-26 09:56:20 +02:00
ClientDate.tsx Implement notifications + supporting fixes 2026-04-26 01:28:55 +02:00
ClientMap.tsx Add ClientMap wrapper to avoid lazy() SSR resolution 2026-04-06 22:52:57 +02:00
CollectionPage.tsx Implement social-feed: local follows + /feed + profile visibility 2026-04-25 22:51:18 +02:00
FollowButton.tsx Locked-account profiles: private = stub + Pending follow flow 2026-04-25 23:38:26 +02:00
Footer.tsx Stop Sentry on logout; fix E2E + Dockerfile for merged consolidation 2026-04-18 00:40:36 +02:00
LocaleContext.tsx Pass full locale from Accept-Language to ClientDate 2026-03-29 11:46:21 +02:00
MobileNavMenu.tsx Redesign navbar with avatar dropdown and mobile drawer 2026-04-26 09:56:20 +02:00
RouteMapThumbnail.client.tsx Reduce map fly animation to 200ms 2026-04-11 00:48:41 +02:00