Skip to content
SprecherEast
Issue 818

feat: Blue information tone for Alert and banners

Back to our plan
Done
enhancementfrontendstylingpriority: medium

Numbering: epic #813; banner #814; lightbox #815; figure #816; Payload block #817; blue tone #818; content edit #819; guidelines #820. Where the text below says 01 to 07, read these numbers (01=#815, 02=#816, 03=#817, 04=#819, 05=#814, 06=#818, 07=#820).

Problem

In plain words: an "information" banner today looks gray, almost like plain page text, so a notice about an upcoming meeting doesn't stand out from warnings or from the page. The owner wants information banners to have their own calmer blue look (2026-11-07, Claude in Chrome side panel). The theme has no blue token. Alert's info tone is border-muted-foreground/30 bg-muted-foreground/10 text-foreground (src/platform/ui/Alert.tsx), checked as the ['foreground', 'muted-foreground'] pair in ALERT_TONES/TINTED_PAIRS (src/platform/theme/tokens.ts). The only blue in the theme is --chart-2, a chart mark color that is checked at 3:1 for marks, not for text, so it must not be borrowed.

Proposed fix

  1. New tokens: info (the tint and border color) and info-strong (text on the tint), added to THEME_TOKENS in src/platform/theme/tokens.ts, valued in light and dark in src/themes/default/theme.css, and mapped in src/platform/theme/tailwind.css. This follows the warning/warning-strong pattern.
  2. Contrast: add ['info-strong', 'info'] to ALERT_TONES, so TINTED_PAIRS checks it at 4.5:1 on background, surface and card at TINT_ALPHA (0.1), in both modes (themes.test.ts). Pick values that pass with a margin and record them with their ratios in a comment, as --destructive-strong does.
  3. [DECISION] change info for every use, don't add a new tone.
    • A second "blue info" next to a "gray info" would be two names for one meaning, against #769's goal of one tone vocabulary.
    • The grep below shows info is only used by banners and the gallery, so changing it everywhere is safe.
    • A neutral gray message, if one is needed later, belongs under #769's neutral tone.
  4. Not by color alone: the Info icon (lucide) stays, and banners carry words. No change needed. The test checks the icon is still rendered.
  5. #769 coordination: comment on #769 that info now has its own token pair. Its tone list should be success, warning, danger/error, info and neutral, with info = info/info-strong. Don't rename tones here.

Every place that uses the info tone today (grep for 'info' and tone="info" under src/, on 2026-11-07):

  • src/platform/ui/Alert.tsx: the info variant and the Info icon
  • src/platform/richtext/blockConfigs.ts: Banner.style, default info, so every banner block an editor didn't change is affected
  • src/platform/richtext/BannerBlock.tsx: passes style as the tone (every post banner)
  • src/platform/ui/Alert.test.tsx (lines 10 and 48), src/platform/richtext/RichText.test.tsx (line 83): tests
  • src/app/(frontend)/dev/gallery/LayoutGallery.tsx: gallery
  • No form or account flow uses info. They use success and error (Form.client.tsx, SignUpForm.client.tsx, VerifyAccount.client.tsx, ResetPasswordForm.client.tsx, ConfirmEmail.client.tsx), and the cancelled-event notice uses error (src/app/(frontend)/events/[slug]/page.tsx).
  • Not the same thing: keyFacts' icon: 'info' (src/platform/richtext/editorial/keyFacts*.ts) is an icon name, not an Alert tone. It isn't affected.
  • Live content: list the posts with a banner block of style info from the live database (read-only query) on the PR, so the reviewer checks each page.

Native-first check:

  • (1) The theme contract (tokens.ts, theme.css, tailwind.css) is the native place for a color in this repo (decisions 0006, 0012). Tailwind's own blue-* palette classes are banned outside the theme (guard rail 3, eslint.theme.config.mjs).
  • (2)–(3) Not applicable: a color value, not a feature.

Acceptance criteria

  • Not done: Tests come first: themes.test.ts fails with the new ['info-strong', 'info'] pair until the tokens exist, and Alert.test.tsx expects the info tone's new classes and its icon. Then the code.
  • Not done: info and info-strong exist in the contract, both modes of theme.css, and the Tailwind mapping. The theme contract test passes, with each pair at least 4.5:1 on background, surface and card in light and dark.
  • Not done: Alert info uses border-info/30 bg-info/10 text-info-strong (or whatever the shared #769 definition becomes), with no literal colors.
  • Not done: An axe check passes for every tone in light and dark (Alert.test.tsx).
  • Not done: Every place listed above, and every live post with an info banner, is checked by the reviewer and listed on the PR.
  • Not done: The gallery (LayoutGallery.tsx) shows all four tones, and docs/ui/component-set.md's Alert row says info is blue.
  • Not done: Checked at 320, 430, 768, 1024, 1280 and 1920 px in light and dark: the event page and post with the meeting banner, a form message, the gallery.
  • Not done: Documentation follows behavior: the token table in docs/guidelines/nextjs-tailwind.md#design-tokens lists info and info-strong with their values (a fact in a guideline; the reviewer notes it as within the owner's request). The Alert comment in Alert.tsx is updated.
  • Not done: #769 has the coordination comment.

Files likely touched

  • src/platform/theme/tokens.ts, src/platform/theme/tailwind.css, src/platform/theme/themes.test.ts
  • src/themes/default/theme.css
  • src/platform/ui/Alert.tsx, src/platform/ui/Alert.test.tsx
  • src/app/(frontend)/dev/gallery/LayoutGallery.tsx
  • docs/ui/component-set.md, docs/guidelines/nextjs-tailwind.md

Must not touch

  • src/platform/ui/Badge.tsx and Card tones (#769)
  • src/platform/richtext/blockConfigs.ts (05)
  • --chart-* tokens

Area

styling, frontend

Priority

priority: medium


Generated by Claude Code, opens in a new tab

See it on GitHub, opens in a new tab