Skip to content

fix: theme default screens with DaisyUI semantic tokens#1714

Merged
davidpoblador merged 1 commit into
mainfrom
fix/theme-default-screens
Apr 28, 2026
Merged

fix: theme default screens with DaisyUI semantic tokens#1714
davidpoblador merged 1 commit into
mainfrom
fix/theme-default-screens

Conversation

@davidpoblador

Copy link
Copy Markdown
Member

Summary

Four shipped templates (homepage, user profile, edit profile, footer) were locked into a slate/blue/indigo aesthetic via hardcoded Tailwind palette shades. Runtime CSS-variable injection (e.g. TenantTheme.primary) only affects DaisyUI --color-* variables, not fixed-palette classes — so tenants couldn't re-theme any of these screens without a wholesale template override.

This PR is a mechanical replacement to DaisyUI semantic tokens. Same visual output under the default theme; now tracks TenantTheme overrides correctly.

Changes

File Before After
index.html.jinja (homepage) from-slate-50 via-blue-50 to-indigo-100, text-slate-800/600, decorative bar from-blue-400 to-indigo-500 from-base-200 to-base-300, text-base-content[/70], decorative bar from-primary to-secondary
user/profile.html.jinja ~28 gray-*, blue-*, indigo-*, green-* shades. Header gradient from-blue-500 to-indigo-600 Header now from-primary to-secondary; surfaces use base-100/base-200/base-300; text-green-600text-success
user/edit.html.jinja ~21 gray-*/blue-* shades; hand-rolled blue callout panel; raw border inputs Inputs upgraded to input-bordered / select-bordered + focus:input-primary (matching login.html.jinja); language-preferences callout is now alert alert-info
base/footer.html.jinja text-slate-500 text-base-content/50

Also removes templates/frontend/email/magic_link.txt.jinja — dead and broken (Python format-string syntax in a Jinja file, unreferenced from any code path; the live text body is at templates/email/magic_link.txt.jinja).

Backwards compatibility

Zero surface change. These are framework-shipped templates that projects override by copying. Apps that already replaced any of these (or use the standard ones with the default DaisyUI theme) keep working unchanged. The only observable change is that tenants who customise theme colors now see those colors flow through these screens, which is the intended fix.

What's NOT in this PR

Per audit (deferred to "PR B" if you want it):

  • base/favicons.html.jinja — three hardcoded hex values that need a config-side BrandSettings (favicon meta is set before CSS variables can act).
  • email/magic_link.html.jinja — inline-style button color hardcoded to #007bff, plus 4 raw English strings missing _() wrapping. Email clients ignore CSS variables, so this needs a different mechanism.

Test plan

  • uv run python -m pytest tests/ (full suite, 756 passed — no template-rendering tests broke)
  • just format && just lint && just type-check clean
  • Visual smoke test against a deploy with default DaisyUI theme to confirm the mechanical replacement looks identical
  • Visual smoke test with a tenant who has customised TenantTheme.primary to confirm the four screens now actually re-theme

🤖 Generated with Claude Code

The shipped homepage, profile, edit-profile, and footer templates were
locked into a slate/blue/indigo aesthetic via hardcoded Tailwind palette
shades (``bg-gray-50``, ``text-slate-800``, ``from-blue-500 to-indigo-600``,
``focus:ring-blue-500``, ``text-green-600``, etc.). None of these
re-themed when a tenant set ``TenantTheme.primary`` or swapped DaisyUI
themes — runtime CSS-variable injection only affects ``--color-primary``
and friends, not fixed-palette utility classes.

Mechanical replacement to DaisyUI semantic tokens across the four
high-visibility screens:

- ``index.html.jinja`` (homepage): body gradient, h1, subtitle, and
  decorative bar now use ``base-200``/``base-300``, ``base-content``, and
  ``primary``/``secondary``.
- ``user/profile.html.jinja``: ~28 hardcoded shades replaced. The
  prominent profile-header gradient is now ``from-primary to-secondary``;
  surface, text, border, and "Connected" indicator (``text-green-600``
  → ``text-success``) all follow the theme.
- ``user/edit.html.jinja``: ~21 hardcoded shades replaced. Inputs upgraded
  to DaisyUI ``input-bordered`` / ``select-bordered`` + ``focus:input-primary``
  (matching ``login.html.jinja``); the language-preferences callout is
  now an ``alert alert-info`` instead of a hand-rolled blue panel.
- ``base/footer.html.jinja``: ``text-slate-500`` → ``text-base-content/50``.

Also removes ``templates/frontend/email/magic_link.txt.jinja`` — dead and
broken (Python format-string syntax in a Jinja file, and unreferenced
from any code path; the live text body lives at
``templates/email/magic_link.txt.jinja``).

No backwards-compat surface change: these are framework-shipped templates
that projects override by copying. Apps that already replaced any of
these will keep working unchanged.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@davidpoblador davidpoblador merged commit 4467168 into main Apr 28, 2026
2 checks passed
@davidpoblador davidpoblador deleted the fix/theme-default-screens branch April 28, 2026 08:52
davidpoblador pushed a commit that referenced this pull request Apr 28, 2026
🤖 I have created a release *beep* *boop*
---


##
[10.8.0](v10.7.0...v10.8.0)
(2026-04-28)


### Features

* add BrandSettings env-var surface for favicon and email branding
([#1720](#1720))
([3d22717](3d22717))
* i18n primitives for per-tenant locale flows
([#1718](#1718))
([177fe5e](177fe5e))


### Bug Fixes

* restore gettext plural-form support in lint-po
([#1725](#1725))
([fe0dacb](fe0dacb))
* **template:** scope babel.cfg python extraction to src/
([#1722](#1722))
([b729964](b729964))
* theme default screens with DaisyUI semantic tokens
([#1714](#1714))
([4467168](4467168))


### Performance Improvements

* **testing:** share MongoDB across vibetuner_db tests
([#1726](#1726))
([c9064e4](c9064e4))


### Miscellaneous Chores

* **py:** use PEP 639 SPDX license expression
([#1727](#1727))
([855f9f4](855f9f4))


### Documentation Updates

* **i18n:** clarify locale_names vs language_picker overlap
([#1723](#1723))
([87733bd](87733bd))
* **template:** document i18n primitives in scaffolded agent rules
([#1724](#1724))
([27a3b98](27a3b98))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant