feat(cli): auto, light and dark theme switch in the gram view --serve preview #316

Merged
abiwab merged 3 commits from feat/view-serve-theme-toggle into dev/1.6 2026-11-29 18:41:09 +01:00
Owner

Feedback from the manual test of the preview: a way to see the recipe in another theme than the system's.

  • Three icon buttons left of Print (Phosphor Icons 2.1.1 circle-half, sun, moon, MIT, inlined as SVG: no dependency, no request, CSP unchanged); their words (renderer.theme in @gram-lang/i18n, en + fr) are the accessible name and the tooltip.
  • The choice is remembered by the browser (localStorage); "auto" follows prefers-color-scheme live, as before.
  • Bar buttons: 3px corners at most, padding: 5px 10px.
  • CLI docs (en + fr) and the unreleased view-serve-live-preview changeset mention the switch; test in preview-server.test.ts.
Feedback from the manual test of the preview: a way to see the recipe in another theme than the system's. - Three icon buttons left of Print (Phosphor Icons 2.1.1 `circle-half`, `sun`, `moon`, MIT, inlined as SVG: no dependency, no request, CSP unchanged); their words (`renderer.theme` in `@gram-lang/i18n`, en + fr) are the accessible name and the tooltip. - The choice is remembered by the browser (`localStorage`); "auto" follows `prefers-color-scheme` live, as before. - Bar buttons: 3px corners at most, `padding: 5px 10px`. - CLI docs (en + fr) and the unreleased `view-serve-live-preview` changeset mention the switch; test in `preview-server.test.ts`.
abiwab merged commit 9e439a6643 into dev/1.6 2026-11-29 18:41:09 +01:00
abiwab deleted branch feat/view-serve-theme-toggle 2026-11-29 18:41:09 +01:00
Sign in to join this conversation.
No description provided.