Files
simplex-chat/apps
another-simple-pixel 7ceac22dc0 refactor: switch theme dispatch from boolean pair to DefaultTheme
Two clarity fixes from the audit.

- ChatWallpaper: the private color helper was named gen — too short to
  carry its purpose. Rename to colorForElement, the term it actually
  computes (a single oklch Color from preset + mode + element params).

- Appearance.FormulaDevTools: both the generateScheme dispatch and the
  slider rendering branched via `when { isLight -> ; isBlack -> ; else
  -> dark }` and `if (isLight) { } else { ; if (!isBlack) ... }`. Two
  parallel dispatches over the same proposition, expressed as boolean
  pairs. DefaultTheme already carries that proposition with a name;
  switch to `when (baseTheme)` so each branch states which theme it is
  and lists its sliders / scheme call. Black's three-slider set becomes
  its own branch instead of negative gates inside the dark branch.

The isLight/isBlack locals stay for the small conditionals inside the
defaults map computation (where the ternaries read fine inline).

Pure refactor — no behavior change.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-13 13:48:50 -07:00
..
2025-07-08 12:22:57 +01:00