penpot/frontend
Dr. Dominik Jain af00860c13
🐛 Report the effective UI theme to plugins (#10677)
Penpot itself and plugins used different default theme selection
strategies when no theme is explicitly selected in Penpot by the user:

- Penpot itself defaults to dark.
- Plugins defaulted to whatever is configured in the user's
  system/browser, which could be light.

So with no explicit theme chosen in the profile — the common state —
every plugin could be told the theme was light while Penpot itself
showed dark, both on open (penpot.theme) and on themechange. For every
explicit choice (light, dark, system, and the legacy default) the two
resolutions already agreed; only the unset case diverged.

Extract the app's resolution into app.util.theme/resolve-theme (system
follows the system theme; default and unset mean dark) as the single
source of truth, and use it in the app's own use-initialize as well as
in the plugin runtime's getTheme and themechange handling. The
themechange handler's now-dead default-to-dark remapping is removed.

Fixes #10676

AI-assisted-by: claude-fable-5
2026-07-28 11:09:17 +02:00
..
2026-06-22 14:35:10 +02:00
2026-05-29 11:24:58 +02:00
2026-04-07 21:35:00 +02:00
2026-07-01 14:45:41 +02:00
2026-06-30 16:15:30 +02:00
2026-07-27 10:45:59 +02:00
2026-07-27 10:45:59 +02:00