fix: use daisyUI theme colors on admin, settings and import/export pages #68
No reviewers
Labels
No labels
bug
critical
ebook-branch
high
low
main
medium
release-blocker
security
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
jfro/fuzzy_catalog!68
Loading…
Reference in a new issue
No description provided.
Delete branch "jtk/dark-theme-colors"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Replaces the hardcoded light-theme colors in the admin, settings, import/export and book pages with daisyUI theme classes, so they follow the dark theme instead of showing light cards.
Mapping
bg-white→bg-base-100;bg-gray-50/100→bg-base-200;bg-gray-200→bg-base-300(toggle tracks, progress bar track)text-gray-700/800/900→text-base-content;text-gray-600→text-base-content/70;text-gray-500→text-base-content/60border-gray-200/300→border-base-300;divide-gray-200→divide-base-300indigo-*→primary(bg-primary,text-primary,bg-primary/10for active tabs,focus:ring-primary; the Admin → Users primary button usestext-primary-content)bg-gray-600(secondary button, unknown-status bar) →bg-neutralLeft alone on purpose: the white toggle knobs (fine on both themes), the black barcode-scanner overlay, and the pastel status badges (green/red/yellow-100 with -800 text), which stay readable in dark mode.
Test:
theme_classes_test.exsscanslib/fuzzy_catalog_web/**/*.{ex,heex}forbg-whiteandgray/slate/indigocolor classes, so new ones get flagged (115 hits before this change, 0 after).Merge note:
admin_users_live.html.heexis also changed by #66 (OIDC-only toggle), so whichever merges second needs a rebase; the new toggle block in #66 will need the same class swap.Fixes #16
Review from Nye (changes requested) — PR #68 at
4297fda(fixes #16)Checked: full diff (12 files), the mapping against the app's light/dark daisyUI themes in assets/css/app.css, rendered the changed admin/settings markup in headless Chromium with daisyUI 5 + both themes, checked the new test's regex in Elixir 1.18, and checked #68 merges cleanly with every open 0.6.2 PR (#53–#59, #63–#67) with 0 offenders left in each merged tree (incl. #66 +
e59d268).Blocker
<.button class="bg-primary hover:bg-primary/90">Create User</.button>.<.button>with no variant rendersbtn btn-primary btn-soft; btn-soft sets the text to the primary color, so the label is primary-on-primary and invisible in both themes (verified by render). Fix:<.button variant="primary" phx-disable-with="Creating..." disabled={@creating_user}>and drop the bg classes.Should fix (same cause, low)
2. user_settings_html/edit.html.heex:42: "Send Confirmation Email"
<.button class="bg-neutral hover:bg-neutral/80 ...">gets btn-soft's primary text on neutral (orange on grey in light, indigo on slate in dark), poor contrast. Addtext-neutral-content(verified it renders white on neutral in both themes).Nits (non-blocking)
text-white→text-error-content(untouched line, fine to leave).Good: mapping is consistent; active tabs, toggles, borders and tables read well in both themes; no behavior changes. CI green on
4297fda. Merges clean with #66 (git merge-tree shows no conflict, despite the PR's merge note), ande59d268on #66 looks right.Review from Nye (approved) at
d551e5eCovers
06f2662(Create User isvariant="primary"with no bg override, Send Confirmation Email has text-neutral-content, Delete book text-error-content, theme test guards against an empty glob, new LiveView test pins btn-primary without btn-soft) and the main merged551e5e. Only the admin_users_live_test conflict differs from auto-merge, resolved keeping both the Create User test and main's tests. CI green.