fix: stop dark-theme white flashes and polish AriaDocs layout #15

Merged
m1nsook merged 3 commits from fix/prepaint-theme-and-docs-polish into main 2026-11-04 01:54:34 +01:00
m1nsook commented 2026-11-04 01:51:28 +01:00 (Migrated from github.com)

Fix

  • Initialize the saved light/dark preference synchronously in <head> before the first paint, with dark default and a system-preference fallback.
  • Remove the React-hydration theme effect that could apply a stale false snapshot and cause a white flash; theme changes now update the document immediately.
  • Use a consistent 18rem sidebar and align the reading column toward the sidebar instead of centering it inside an ultrawide gap.
  • Replace the flat sidebar with expandable AriaDocs-style groups (Getting started, Guides, Reference, Project).
  • Preserve the new sidebar branding, search, code tabs, copy buttons and guides from #14.

Regression coverage

Adds five Bun tests for theme bootstrap (stored dark, stored light, system dark/light, unavailable storage), and runs bun test in GitHub Actions before the static export.

No additional dependencies. Merge once checks pass.

## Fix - Initialize the saved light/dark preference synchronously in `<head>` before the first paint, with dark default and a system-preference fallback. - Remove the React-hydration theme effect that could apply a stale `false` snapshot and cause a white flash; theme changes now update the document immediately. - Use a consistent 18rem sidebar and align the reading column toward the sidebar instead of centering it inside an ultrawide gap. - Replace the flat sidebar with expandable AriaDocs-style groups (Getting started, Guides, Reference, Project). - Preserve the new sidebar branding, search, code tabs, copy buttons and guides from #14. ## Regression coverage Adds five Bun tests for theme bootstrap (stored dark, stored light, system dark/light, unavailable storage), and runs `bun test` in GitHub Actions before the static export. No additional dependencies. Merge once checks pass.
Sign in to join this conversation.
No description provided.