feat(admin): shared page-header component (LC-572) #540

Merged
longjacksonle merged 1 commit from feat/lc572-admin-page-header into main 2026-07-11 04:08:46 +02:00

Delivers the outstanding acceptance criterion from LC-561 / LC-UI-08 (Admin console visual system), carved out as follow-up LC-572: a shared admin page-header. The status-chip AC shipped earlier (PR #531); the header pattern was never built, so admin_layout.html rendered a title-only header and pages hand-rolled intro/action rows inconsistently.

What changed

admin_layout.html still derives the page title from section and now exposes three optional slots via nested Askama block overrides: admin_header_desc, admin_header_actions, admin_header_filters. Each defaults to empty, so title-only pages (users, modlog, reports, settings, ...) render exactly as before.

Migrated every admin page that hand-rolled a header onto the slots: description-only (rooms, enclaves, bots, quarantine, outgoing_webhooks, slash_commands, link_filter); description + action (bridges); action-only (invites); the two detail sub-pages (bridge_avatars, outgoing_webhook_deliveries); and analytics, whose duplicate in-body <h1> is dropped and whose date-range + recompute controls move into the filter slot.

Adopts the two previously-dead LC-555 helpers (closing R5): .lc-action-row wraps the header action clusters, .lc-toolbar wraps the analytics filter strip. Inactive analytics date pills go ghost (no fill) so the active accent reads correctly on the toolbar's sunken background. New CSS is .lc-admin-header-bar / .lc-admin-header-heading / .lc-admin-desc in main.css, tokens only, no raw hex.

Verification

dev/cargo check compiles cleanly, which validates every template (block overrides and Fluent keys resolve). The production-shape dev-web image was rebuilt and serves the admin surfaces (/admin 303s to SSO with no render error). Diff is templates + CSS only, no Rust.

Acceptance criteria

  • Every admin page with an intro/action uses the shared header slots; intro/action rows are consistent.
  • .lc-action-row and .lc-toolbar have a real usage (R5 satisfied).
  • analytics no longer renders a second title; its date range lives in the filter slot.
  • No raw hex / literal palette colors; tokens only.

🤖 Generated with Claude Code

https://claude.ai/code/session_01GJbJChgMXj7m1Q8GdnTPyT

Delivers the outstanding acceptance criterion from **LC-561 / LC-UI-08 (Admin console visual system)**, carved out as follow-up **LC-572**: a shared admin page-header. The status-chip AC shipped earlier (PR #531); the header pattern was never built, so `admin_layout.html` rendered a title-only header and pages hand-rolled intro/action rows inconsistently. ## What changed `admin_layout.html` still derives the page title from `section` and now exposes three optional slots via nested Askama block overrides: `admin_header_desc`, `admin_header_actions`, `admin_header_filters`. Each defaults to empty, so title-only pages (users, modlog, reports, settings, ...) render exactly as before. Migrated every admin page that hand-rolled a header onto the slots: description-only (rooms, enclaves, bots, quarantine, outgoing_webhooks, slash_commands, link_filter); description + action (bridges); action-only (invites); the two detail sub-pages (bridge_avatars, outgoing_webhook_deliveries); and analytics, whose duplicate in-body `<h1>` is dropped and whose date-range + recompute controls move into the filter slot. Adopts the two previously-dead LC-555 helpers (closing R5): `.lc-action-row` wraps the header action clusters, `.lc-toolbar` wraps the analytics filter strip. Inactive analytics date pills go ghost (no fill) so the active accent reads correctly on the toolbar's sunken background. New CSS is `.lc-admin-header-bar` / `.lc-admin-header-heading` / `.lc-admin-desc` in `main.css`, tokens only, no raw hex. ## Verification `dev/cargo check` compiles cleanly, which validates every template (block overrides and Fluent keys resolve). The production-shape dev-web image was rebuilt and serves the admin surfaces (`/admin` 303s to SSO with no render error). Diff is templates + CSS only, no Rust. ## Acceptance criteria - Every admin page with an intro/action uses the shared header slots; intro/action rows are consistent. ✅ - `.lc-action-row` and `.lc-toolbar` have a real usage (R5 satisfied). ✅ - `analytics` no longer renders a second title; its date range lives in the filter slot. ✅ - No raw hex / literal palette colors; tokens only. ✅ 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01GJbJChgMXj7m1Q8GdnTPyT
feat(admin): shared page-header component (LC-572)
All checks were successful
check-secrets / Nosey parker (push) Successful in 3s
check-secrets / TruffleHog (push) Successful in 5s
check-secrets / Kingfisher (push) Successful in 6s
check-secrets / Nosey parker (pull_request) Successful in 3s
check-secrets / Kingfisher (pull_request) Successful in 7s
Check / clippy + fmt + tests (pull_request) Successful in 3m31s
Create release / Create release from merged PR (pull_request) Has been skipped
check-secrets / TruffleHog (pull_request) Successful in 6s
385a81c282
Delivers the remaining LC-561 (LC-UI-08) acceptance criterion: a reusable admin page-header. `admin_layout.html` keeps deriving the title from `section` and now exposes three optional slots (`admin_header_desc`, `admin_header_actions`, `admin_header_filters`) via nested block overrides; each defaults to empty, so title-only pages are byte-identical.

Migrated every admin page that hand-rolled an intro/action row onto the slots: description-only pages (rooms, enclaves, bots, quarantine, outgoing_webhooks, slash_commands, link_filter), description+action (bridges), action-only (invites), the two detail sub-pages (bridge_avatars, outgoing_webhook_deliveries), and analytics (its duplicate in-body `<h1>` dropped; date-range + recompute moved into the filter slot).

Adopts the two previously-dead LC-555 helpers, giving R5 a real home: `.lc-action-row` wraps the header action clusters, `.lc-toolbar` wraps the analytics filter strip (inactive date pills go ghost so the active accent reads on the sunken toolbar). New CSS is `.lc-admin-header-bar` / `.lc-admin-header-heading` / `.lc-admin-desc`, tokens only, no raw hex.

Verified: `dev/cargo check` compiles all templates (block overrides + Fluent keys resolve); dev-web image rebuilt and serves the admin surfaces (/admin 303 to SSO, no render error). Diff is templates + CSS only, no Rust.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GJbJChgMXj7m1Q8GdnTPyT
longjacksonle deleted branch feat/lc572-admin-page-header 2026-07-11 04:08:47 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/lets-chat!540
No description provided.