v0.3 Phase 5g: quietware default-on for branch builds

The headless screenshots from Phases 4 and 5 had VITE_LUMOTIA_QUIETWARE=1
set at capture time; the running Tauri dev/release builds did not. Result:
21 commits of design work were invisible in the actual app even though the
emailed screenshots showed v0.3.

Fix is one-line: invert the env-var check in src/routes/+layout.svelte so
data-design="quietware" is the default on this branch. Explicit opt-out via
VITE_LUMOTIA_QUIETWARE=0 still works for anyone who wants to see the v0.2
surface for comparison.

Behaviour:
  unset → quietware ON
  "1"   → quietware ON (same as unset)
  "0"   → v0.2 surface forced

Branch-only default for now. Merge to main can decide whether to keep this
or require explicit opt-in once v0.3 stabilises.
This commit is contained in:
2026-05-15 20:32:07 +01:00
parent 1d5e6d4c59
commit 62e795174c
2 changed files with 33 additions and 10 deletions

View File

@@ -22,19 +22,26 @@
$sveltePage.url.pathname.startsWith("/preview")
);
// v0.3 Tactile Quietware activation. When VITE_LUMOTIA_QUIETWARE=1
// is set at build time, mark <html data-design="quietware"> so the
// v0.3 token overrides in src/design-system/v0.3-quietware-tokens.css
// become active. Without the flag the app behaves exactly as v0.2.
// Combine with data-theme="light" and data-contrast="high" (already
// wired elsewhere) for the light and high-contrast modes.
// v0.3 Tactile Quietware activation.
//
// Phase 5g (round-15): quietware is now ON by default on the
// feat/v0.3-tactile-quietware branch so every normal Tauri build
// shows the new design without needing the VITE_LUMOTIA_QUIETWARE
// env var. The v0.2 fallback is still reachable by explicitly
// clearing the attribute via dev tools, or by setting
// VITE_LUMOTIA_QUIETWARE=0 at build time to force the off state.
//
// Combine with data-theme="light" and data-contrast="high" (wired
// elsewhere) for the light and high-contrast modes.
$effect(() => {
if (typeof document === "undefined") return;
if (import.meta.env.VITE_LUMOTIA_QUIETWARE === "1") {
if (import.meta.env.VITE_LUMOTIA_QUIETWARE === "0") {
// Explicit opt-out → restore v0.2 surface.
if (document.documentElement.dataset.design === "quietware") {
delete document.documentElement.dataset.design;
}
} else {
document.documentElement.dataset.design = "quietware";
} else if (document.documentElement.dataset.design === "quietware") {
// Hot-reload safety: env var unset between dev rebuilds.
delete document.documentElement.dataset.design;
}
});
</script>