Restyle the Docs reader + Technical|Product outline tree - #25
Conversation
Frontend-only design pass on the Docs page, styled entirely with the theme
CSS vars so it holds in all three themes (dark / light / midnight).
Reader (web/src/render.ts, canopy.css):
- Centered reading column (~730px measure) with a wrap-safe title (drops the
white-space:nowrap that could overflow long titles) and a mono
`SPACE / SECTION` eyebrow.
- Markdown: stronger reading ink (color-mix off --fg), real heading hierarchy
(h2 hairline rule, h3 distinct at 16px), language-tagged code panels,
callout blockquotes (accent-soft), crisp inline-code chips, accent-numbered
ordered lists, and editorial ledger-style tables (rule-only borders, mono
uppercase headers).
Nav tree (web/src/render.ts, main.ts, canopy.css):
- Sections are now collapsible: a header button (rotating chevron + mono
label + count) toggles each section; collapse state persists to
localStorage, keyed `${space}:${section}`.
- Active doc is a clean --accent-soft pill matching the sidebar's active
style; removes the inset accent line (.cnpy-selbar no longer used here —
left intact for review.ts).
markdown.ts:
- Post-sanitize DOM pass wraps code blocks in a `.cnpy-code` panel (tagged
with the fence language) and tables in a scroll wrapper. Browser-only;
render tests mock this module.
Verified across dark/light/midnight in both Sapling and Canopy spaces.
typecheck green; full suite 418/418.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
canopy | 65a2310 | Commit Preview URL Branch Preview URL |
Jul 07 2026, 05:38 AM |
Reworks the Docs page end to end: the reader's markdown rendering (styled with the theme vars, holds in dark/light/midnight) and a rebuilt left tree organized around the real Sapling documentation.
Reader
SPACE / SECTIONeyebrow.Sidebar — Technical | Product
DocSpacewidened tostring.Data
fixtures/dev/docs.jsonis rebuilt from the real Sapling docs pulled verbatim from the prod store (+ Roadmap from the Sapling repo), reshaped into the Technical/Product taxonomy. One agent-proposed edit is left staged so the Triage/proposals queue stays populated.scripts/seed/build.mjsauto-registers the sections the fixtures use (thedocs.section → sections.nameFK) — local seed only, never remote.New / notable
web/src/outline.ts: sharedslugifyHeading+extractOutlineso tree links resolve to reader heading anchors.Verification
npm run typecheckgreen ·npm test418/418.🤖 Generated with Claude Code