Search UX: avatar menu, multi-select tag cloud, category-aware tags

Search UX: avatar menu, multi-select tag cloud, category-aware tags

#54 in Riparion/riparion-cms — merged 2026-06-03

Summary

Reworks the search page facets and the navbar account affordances.

Navbar

  • Search box → a search.svg icon button linking to /search, vertically aligned with the account menu.
  • Account-menu username → the user's avatar (OAuth image, initials fallback). The initials helper now lives in the avatar module and is shared with author cards.
  • Header is now its own stacking context (relative z-50) so the open account dropdown is no longer clipped/covered by page content; the mobile drawer was lifted above the header so it still overlays when open.

Search facets

  • Tag dropdown → a reusable, controlled TagCloud widget with an Any/All match-mode switch (new switch catalog component). Pill styling is shared with the sidebar TagList via tag_pill_class.
  • Multi-tag filtering end-to-end: search_posts takes tag_slugs + tag_match_all; facet_clause emits AND (one EXISTS per tag) or ANY (EXISTS over an IN-list) for both sqlite and postgres.
  • The cloud is category-aware: selecting a category reduces it to that category's tags (list_tags_for_category) and "All categories" restores the full list; orphaned tag selections are pruned when the visible set shrinks.

Testing

  • cargo check / cargo clippy clean on all three targets: server (sqlite), server (postgres), wasm web.
  • cargo fmt --check passes.
  • Not yet exercised in a running browser — facet behavior verified by code/compile only.

🤖 Generated with Claude Code

Last updated 2026-06-04