Skip to content

v4.16.0

Choose a tag to compare

@rodrigoslayertech rodrigoslayertech released this 17 Jul 00:38
· 73 commits to main since this release
v4.16.0
0978df2

Focus: documentation sites now follow the reader's operating system theme by default — with no flash, and no configuration.

Changes

  • 🌗 Added automatic theme detection: the Settings dialog now offers Auto, Light and Dark, and Auto is the new default. A reader whose OS is set to dark mode opens the documentation in dark mode without touching anything, and the site switches live when the OS theme changes. Light and Dark pin the theme regardless of the system. Until now the engine shipped framework.config with no dark key, so the Dark plugin installed as hard light — the README's "automatic theme switching" claim is finally true.
  • ⚡ Added a pre-paint inline script, injected into every project's index.html by a Vite transformIndexHtml plugin (consumers change nothing). It resolves the stored preference — or the OS colour scheme — and stamps the theme before the browser's first paint, so no reader sees a flash of the wrong theme.
  • 🔀 The stored preference is applied before Quasar's Dark plugin installs, via a module evaluated ahead of app.use(Quasar). A boot file cannot do this: boot functions only run once every boot chunk has loaded (the i18n one is ~255 KB), which would leave the wrong theme painted for the whole download.
  • 💾 The theme is now a tri-state stored under setting.theme (auto / light / dark), replacing the pre-4.16 setting.background boolean. Existing readers are migrated on first load — see the note below.
  • 🌍 Fixed hardcoded Portuguese labels: the theme options rendered Modo Claro / Modo Escuro to every locale, English readers included. They are now localized via the new settings.appearance.theme.* keys, evaluated reactively so they re-translate when the reader switches language.
  • 🧩 Fixed an i18n delivery gap: settings.* and menu.settings lived only in each project's own language files, never in the engine defaults — a consumer that did not copy them rendered raw key paths. They now ship in engineDefaults for both locales, with consumer overrides still winning.
  • 📚 Updated docs in both locales — a new Theme manual page (modes, resolution, the no-flash mechanism, migration, i18n overrides) and a rewritten Theming guide section — plus README corrections.
  • ✅ Validated with 289 passing tests (39 new), including a shared migration matrix asserted twice — once against the resolver, once against the inline script evaluated in a sandbox — so the two implementations of the rule cannot drift apart.

Notes

  • Migration: a stored dark preference is kept (it could only come from an explicit click). A stored light preference becomes auto, because older versions wrote that value automatically on every reader's first visit and it cannot be told apart from "never chose a theme". A reader who deliberately picked Light on a dark system will see the site follow their system once; picking Light again stores it explicitly and it sticks. The legacy key is left untouched.
  • There is no configuration key — Auto is always the engine default. Projects reword the labels by overriding settings.appearance.theme.* in their language files.
  • Projects that customized the settings.appearance.background label should move it to settings.appearance.theme; the old key is no longer read.