feat(themes): add the Petal and Pewter themes (SONA-227) - #443
Conversation
Two site themes from the theme candidates work, selectable in Settings, Appearance: - Petal, soft pink, for sites that are mostly stickers and small art. Nunito headings over the Geist body face. - Pewter, quiet slate, for fursuiters with a large photo set. Inherits the default typography. Both declare the full token set in dark and light, primaryText and input at their WCAG floors, and their own status colours. The token literals come from the "Theme candidates" proposal document. Nunito is self-hosted like the other families: added to FAMILIES in scripts/fetch-fonts.mjs, three variable woff2 slices under static/fonts/ with manifest digests, and the OFL copyright line in NOTICE, static/fonts/README.md, and static/fonts/OFL.txt. Tests: the contrast sweep gains the eight border hairline entries the shipped themes also carry, a sidebar hover/active pairing, and a focus ring on sidebar pairing; the warn-text describe now resolves status-warn through the theme cascade; the font scoping test loops over every theme that self-hosts a family against a literal expectation table; the theme-tokens e2e spec covers the two new ids. UPDATING.md notes the new themes. Nothing runs after merge on a fork.
◈ PR Lens
Architecture 5 components touched across 5 lanes. Inside the changed components — 2 viewsComponent view — Theme definitions and generation Theme token definitions compiled into CSS custom properties and registered for UI selection. Component view — Font assets and fetching Font fetching tooling, static font binaries, and stylesheet @font-face references. Data flow
View
Tip Click the link under each diagram to open it on a canvas you can zoom, pan and step through. 🪧 More tips
Thanks for using PR Lens! It's built by Coldtea, free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Essentials Run ID: ⛔ Files ignored due to path filters (3)
📒 Files selected for processing (15)
Included review availability: 2 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 3 reviews per hour. 📝 WalkthroughWalkthroughChangesThe change adds Petal and Pewter as selectable themes, adds Nunito font support for Petal, generates their CSS, and extends contrast, font, and end-to-end tests. Theme support
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Feature Sequence Diagram(s)sequenceDiagram
participant Settings
participant THEMES
participant GeneratedCSS
Settings->>THEMES: Read registered theme options
THEMES-->>Settings: Return Petal and Pewter
Settings->>GeneratedCSS: Apply selected theme
GeneratedCSS-->>Settings: Provide dark or light theme tokens
Merge Risk: ⚪ Minimal · up to The themes use the already documented font workflow, and the quoted font declarations violate no repository lint contract. The change is mergeable after normal checks. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Linked Issues checkExplanation
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
✨ Simplify code
Comment |
|
On the linked-issues warning: the eight new The Nunito woff2 files are committed. |
|
@kody start-review |
Kody Review CompleteGreat news! 🎉 Keep up the excellent work! 🚀 Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
Closes #442 (SONA-227).
Summary
Adds two new appearance themes, Petal — soft pink and Pewter — quiet slate, to the theme picker in Settings → Appearance. Both themes include complete dark and light palettes and honor the existing inheritance model, so tokens they don’t declare fall through to the default theme. Petal also introduces a new self-hosted headline typeface, Nunito, which is now fetched by the font script and shipped alongside the existing families.
Changes
New themes
petal.theme.ts: soft pink palette, dark and light variants. CarriesNunitoas the primary font (self-hosted) while keeping the default body font.pewter.theme.ts: quiet slate palette, dark and light variants. Inherits the default typography.Both are registered in
ALL_THEMESand appear in the theme dropdown (THEMES), and their CSS blocks are emitted intogenerated.css.Fonts
scripts/fetch-fonts.mjsnow downloads Nunito (latin, latin-ext, vietnamese) along with the existing typefaces.generated.csscontains new@font-facerules for Nunito.NOTICE,static/fonts/OFL.txt,static/fonts/README.md) updated to reflect the fifth typeface and its copyright.Contrast & accessibility
theme-contrast.test.tsnow verifies:--status-warnfrom the theme block rather than the mode block, ensuring the actual cascade is tested for every theme.Tests
fonts.test.tsgeneralized the scoping test to cover any alternate theme that self-hosts a font (now terracotta and petal), verifying each keeps its families to itself.Impact
UPDATING.mdnote that no action is required for forks.