Skip to content

HOLD: Add page-header design reference (styleguide)#1688

Draft
maebeale wants to merge 1 commit into
mainfrom
maebeale/shared-page-header-partials
Draft

HOLD: Add page-header design reference (styleguide)#1688
maebeale wants to merge 1 commit into
mainfrom
maebeale/shared-page-header-partials

Conversation

@maebeale

Copy link
Copy Markdown
Collaborator

What is the goal of this PR and why is this important?

  • Page headings across the app have drifted into ~5 inconsistent variants (h1 vs h2, semibold/bold, text-2xl/3xl, centered vs left, ad-hoc back-links and breadcrumb rows) spread over 500+ templates.
  • Before building shared header partials and sweeping the site, we need to agree on the target look-and-feel. This PR adds an internal design-reference page so those decisions can be made visually, against real design tokens, rather than in the abstract.

How did you approach the change?

  • Added GET /styleguide/headers (StyleguideController#headers) — logged-in only, no model data, authorization skipped.
  • Built app/views/styleguide/headers.html.erb plus two demo partials (_demo, _utility_row) that render every candidate treatment with sample content using the real DomainTheme color tokens.
  • The page is organized as a decision surface:
    • Anatomy + rules — one shared utility row (back-link left → defaults to admin_path on admin pages; subnav right), actions in the title row.
    • Families — list (A), topper (B), centered hero (C), and the proposed charcoal base + thin model-color stripe (J) that unifies admin chrome while marking individual models.
    • Questions — alignment/centered-vs-left (E), event registration admin-vs-public (F), band-everywhere combo (G), more subnavs per-record & per-area (H), and rich gradients for public contribution forms (I).
  • Organizing principle surfaced by the exercise: rich = public-facing, quiet = admin (gradients/centered heroes signal outward pages; charcoal/flat signal internal tools).

Anything else to add?

  • This is a reference/spec only — no existing pages are changed yet. Once the variants are chosen, the follow-up builds shared/_page_header + shared/_subnav and converts pages in batches.
  • Per-model stripe/gradient colors are dynamic, so they'll need adding to the Tailwind safelist alongside the existing DomainTheme colors when the real partials land.
  • Open decisions captured on the page: background alignment, Style A for the admin registration form, charcoal+stripe vs light band, subnav standard (D1), subnav expansion, and gradient approach for public forms.

class StyleguideController < ApplicationController
# Internal design reference for comparing page-header treatments.
# Logged-in only; no model data required, so authorization is skipped.
skip_verify_authorized

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 From Claude: Auth is skipped (not authorize!) because this is a static, data-free internal reference with no records to authorize against. Still behind authenticate_user!, so logged-in only.

Comment thread config/routes.rb
@@ -1,4 +1,7 @@
Rails.application.routes.draw do
# Internal design reference for comparing page-header treatments
get "styleguide/headers", to: "styleguide#headers"

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 From Claude: Reference/spec route only — meant to be removed (or moved behind an admin constraint) once the header system is chosen and the real shared partials land.

Introduce an internal /styleguide/headers page so we can compare every
candidate page-header treatment side by side and converge on a consistent
system before building shared partials and sweeping the site.

The audit found ~5 drifting header variants across 500+ templates. This
reference renders them as labelled families (list, charcoal+stripe topper,
centered hero, public gradient) with index/show/new-edit states, plus the
back-link, subnav, and action-placement conventions, so the look-and-feel
decisions can be made visually rather than in the abstract.

Logged-in only; no model data required, so authorization is skipped.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@maebeale maebeale force-pushed the maebeale/shared-page-header-partials branch from 976f075 to 5d837b3 Compare June 16, 2026 20:27
@maebeale maebeale changed the title Add page-header design reference (styleguide) HOLD: Add page-header design reference (styleguide) Jun 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant