Document the palette, square corners, notices and the page backdrop

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Zaldimmar 2026-09-30 14:55:21 -05:00
parent 239c3fa293
commit dd33ee2da0
3 changed files with 6 additions and 2 deletions

View file

@ -71,7 +71,9 @@ In dev, Vite proxies `/api` to the target set in `vite.config.ts`, so the API mu
- **Don't use `fallback: EMPTY` in api.ts hooks.** It silently returns empty arrays and hides server errors; let the error state surface.
- **Colors are tokens, not hex.** Admins can override any token (Panel → Site settings → Colors). The defaults are `server/src/themeDefaults.js` plus the same values as CSS in `src/index.css`; the build fails if they differ (`themeDefaultsCheck` in `vite.config.ts`), and migration 041's CHECK lists the token names. Use the utilities from `src/index.css` (`text-ink`, `text-body`, `text-muted`, `text-link`, `bg-surface`, `bg-tint`, `bg-action`, `border-brand/20`...) so dark mode works; a literal only for something that must look the same in both modes (white on a dark band, a platform's color). Data colors (accents, event and region colors) go through `withAlpha`, `accentText` and `readableOn` in `src/lib/color.ts`, never `${color}55`.
- **Icons are Phosphor** (`@phosphor-icons/react`), weight `bold` (or `fill` for play/star). No hand-drawn `<svg>` icons and no Unicode glyphs as icons (× › ▶ →). Brand marks are the exception: `DoveMark`, `PlatformIcon`, the Google logo, the group map.
- **Accents come from `src/lib/color.ts`:** `BRAND` (the teal, via the button token so the admin palette reaches it) and `ACCENTS` (deep, green, mint). Not a new hex in a page.
- **Accents come from `src/lib/color.ts`:** `BRAND` (the teal, via the button token so the admin palette reaches it) and `ACCENTS` (deep, green, olive), all from `PALETTE` (the site's 16-color grid). Not a new hex in a page.
- **No rounded corners.** Everything is square except buttons, which use the `btn` utility (Poppins Bold, a superellipse via `corner-shape`; `var(--btn-radius)` in plain CSS), and things round by nature (dots, radio marks). A note in place of content (empty section, "coming soon") uses the `notice` utility, not a dashed border. Nothing glows: no blur blobs, no glow shadows.
- **Sections paint no background.** `PageBackdrop` (in Layout) draws the page's palette circles behind every public page; a band that needs its own color (the hero, the stats band, the footer) is a deliberate exception.
- **No em-dashes** (U+2014) anywhere: UI text, help text, comments, docs, commit messages. Use a colon, comma or parentheses. An empty table cell shows `-`.
- **Admin editor text:** blank select options read `Default: …` (what blank means), examples in help text start with `eg.`, and record ids are called "URL ID". Cut-off preview text uses `preview()` from `src/lib/text.ts`, which ends it with an ellipsis. See `docs/updating-data-in-code.md`.

View file

@ -277,6 +277,8 @@ The numbers band's "Number Source" dropdown works the same way:
| The site's colors, light and dark | the database over `src/index.css` | Admin → Panel → Site settings → Colors (superadmins): pick a color, set its light and/or dark value; saving refuses anything that makes text hard to read. The defaults are `THEME_DEFAULTS` in `server/src/themeDefaults.js` (the admin and the contrast check read it) and the same values as CSS in `src/index.css`; the build stops if the two differ. The admin's labels for them are `THEME_LABELS` in `src/lib/adminSchema/siteSettings.ts`. Change a token's value in both modes and every use follows. Use the token utilities (`text-muted`, `bg-surface`, `border-brand/20`) or `var(--color-…)`, not hex. A color that arrives as data (a page accent, an event's or region's color) goes through `src/lib/color.ts`: `withAlpha` for tints, `accentText` for text in it, `readableOn` for text on it. |
| The icons a Front page "Find your way in" path can pick | `src/data/pathIcons.ts` (keys and labels) **and** `ICONS` in `src/pages/sections/home/Pathfinder.tsx` (the Phosphor icon for each key) | Add a line to both. A path saved with an emoji from before the list shows it as it is. |
| A page section's accent color | `BRAND` and `ACCENTS` in `src/lib/color.ts` | Pages pick from these (`accent: ACCENTS.green`); add a color there, not a hex in a page. Each is readable as text on white and the tints. |
| The palette (the 16-color grid the theme is drawn from) | `PALETTE` in `src/lib/color.ts` | Four families, a column each. `PALETTE_LIGHT` / `PALETTE_DARK` are the fills things colored by data use (a person's initials tile, `paletteFill`); the page background's circles and tones are in `src/components/PageBackdrop.css`; the admin home's group colors are `GROUPS` in `src/pages/admin/AdminHome.tsx`. |
| Timeline leaf colors (green now, autumn going back) | `leafColor` in `src/lib/color.ts` | The green, gold and autumn stops, and `LEAF_TURNED_BY` (2000), the year before which every leaf is fully turned. |
| Privacy Policy and Terms wording | `src/pages/Privacy.tsx`, `src/pages/Terms.tsx` | The `PARTS` list, and `LAST_UPDATED` whenever the wording changes. The Privacy page must stay true of the code: what the feedback form stores, what the browser keeps, which embeds wait for a click. |
| Event type labels and plurals (public site) | `src/lib/eventTypes.ts` | Also the order of the type filter chips. |
| Event and person role labels (public site) | `ROLE_LABEL` in `src/pages/EventDetail.tsx` and `src/pages/PersonDetail.tsx` | |

View file

@ -12,7 +12,7 @@
It asks for the wide admin column (adminWidth.tsx), like the
editor, so the cards run three across on a wide screen. Each
block takes a color from the palette (GROUP_COLORS), tinting its
block takes a color from the palette (GROUPS), tinting its
cards and drawing its bar, so the groups read apart at a glance.
The right-hand panel is deliberately inert. Nothing here