Repository navigation
fix: monitoring colors under themes, daisyUI light/dark, final v0.4.0.0 fixes - #20
Merged
Merged
Conversation
The toolbar icon, selected time-range button, method badges, share bars and chart lines used Unfold's primary-600/500 with white text. With daisyUI themes that is unreadable: white text on luxury's white primary, a near-invisible dark-gray (black) or dark-blue (business) icon on a near-black page, a pale teal (cupcake) on white. - Selected range: daisyUI --color-primary / --color-primary-content (the generator syncs them with Unfold's primary for plain light/dark). - Text, icons, bars and chart lines: --mon-accent, the theme primary mixed with the text color so it contrasts with the page in every theme; dashboard.js resolves it through the DOM for Chart.js.
…onents The controls were hand-styled with Unfold's palette; daisyUI components pick up the active theme's colors (and contrast pairs) by themselves. - Host / auto-refresh: ui-select; time range: ui-join of ui-btn with ui-btn-primary on the selected one; refresh: ui-btn-square. - Live indicator: ui-badge-success; banner: ui-alert (soft tint, theme text color: the soft variant's yellow text was unreadable on light themes); endpoint methods: solid ui-badge info/warning/error (soft badges vanished in black/bumblebee); share bars: ui-progress-primary. - Panels keep the Unfold card look and chart lines keep --mon-accent (Chart.js can't use classes). - styles.css rebuilt (only adds the new rules).
- Pagination: ?all only disables Previous/Next when Django can show all rows (show_all and can_show_all); with more than list_max_show_all it keeps paginating and the buttons were stuck disabled. Buttons moved to wn_page_button.html; tests assert the button itself and the ?all case. - Changelist toolbar: render only when a control will show (vertical filters, not any filter), so horizontal-only filters don't get an empty toolbar row. - Admin index extends base_site.html instead of copying its branding. - Monitoring: share bars use --mon-accent again (theme primary vanished on black/cupcake) and are aria-hidden (they showed a different number from the text); Live dot pulses only with motion allowed; the status banner is rewritten only when its text changes (screen readers re-read it every refresh); resolved() detects unusable colors by comparing with the inherited text color; removed the unused primaryDark / --mon-accent-strong and a redundant [hidden] rule.
In plain dark mode daisyUI kept its stock gray-slate base colors, so the monitoring toolbar's buttons, selects and banner showed as gray blocks on Unfold's navy background (the default dark is Unfold's palette, not a daisyUI theme). - gen-themes: the light/dark themes point daisyUI base-100/200/300 and base-content at UNFOLD["COLORS"] (resolved at runtime), as primary already did; other themes are unchanged. - Monitoring toolbar: unselected buttons and selects drawn like Unfold's own controls (panel background + input border) via daisyUI's --ui-btn-bg/--ui-btn-border; the banner tint is raised so it reads on dark surfaces. - styles.css / daisy-themes.css regenerated.
- Admin index: flash messages rendered twice (admin/base.html already has the messages block); test added. - Pagination: one condition per button, page passed explicitly to the helper (a 'page' context variable could leak in), and no hover text color on the soft primary buttons (label turned the button's color); tests for ?all honored and for page 1. - Monitoring: Live badge hidden server-side when auto refresh is off; row-header focus ring falls back to currentColor without color-mix(); the two banner rules merged. - CHANGELOG/README/release notes: post-#18 fixes, light/dark daisyUI colors following UNFOLD["COLORS"], validation (42 tests, wheel with django-unfold 0.110.0).
- django-unfold>=0.109.0,<0.111: the package overrides ~15 Unfold templates, so a new Unfold release is re-tested before the cap is raised (0.110.0 is identical to 0.109.0). - .github/workflows/ci.yml: system check, makemigrations --check, msgfmt, the test suite, and a check that daisy-themes.css / themes.py / styles.css match a fresh Tailwind build.
- The md2html_tailwind4 @source used a python3.* directory glob, which Tailwind does not expand, so the classes its converter emits for markdown previews (admonitions etc.) were never compiled. tailwind.sh now links the installed package to .tw-md2html and styles.css scans that path. - Markdown prose (docs/, *.md) is excluded from the scan: words in the changelog were adding utilities, so editing release notes changed styles.css. - styles.css regenerated.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Second follow-up to #18. #19 was merged with its first two commits only (sidebar branding, changelist toolbar and pagination). This PR carries the rest of that work, the fixes from a final review, and release hardening before tagging v0.4.0.0.
Monitoring dashboard colors under daisyUI themes
primary-600/500and white text, so several themes were unreadable:ui-select;ui-joinofui-btn, withui-btn-primaryon the selected one;ui-badge-success;ui-alert;ui-badgeinfo/warning/error;ui-progress.--ui-btn-bg/--ui-btn-border, like Unfold's own controls.-contentpairs. The soft badges vanished in black and bumblebee.--mon-accent, the theme primary mixed with the text color.dashboard.jsresolves it through the DOM for Chart.js. If the browser can't compute it (nocolor-mix()), the old palette is used.aria-hidden;currentColor.daisyUI in the default light/dark modes
Plain dark is Unfold's palette, not a daisyUI theme. daisyUI kept its stock gray-slate base there, so its components showed as gray blocks on Unfold's navy background.
gen-themes.mjsnow points daisyUIbase-100/200/300andbase-contentatUNFOLD["COLORS"]forlight/dark, as it already did forprimary. The other 33 themes are unchanged.Admin fixes from the final review
admin/base.htmlalready has the messages block.?all(more rows thanlist_max_show_all). The?allcheck now also requirescan_show_all.unfold/helpers/wn_page_button.htmland getpagepassed explicitly, so apagevariable in the changelist context can't leak in.admin/base_site.htmlinstead of copying its branding block.Release hardening
django-unfold>=0.109.0,<0.111: the package overrides about 15 Unfold templates, so an untested Unfold release could break the admin of every project that installs it. Raise the cap after re-testing; 0.110.0 is file-for-file identical to 0.109.0..github/workflows/ci.yml). The repo only had a publish workflow, so PRs had no checks. It runs:check,makemigrations --check,msgfmtand the test suite;daisy-themes.css,themes.pyorstyles.cssdiffer from the committed files.md2html_tailwind4@sourceused apython3.*directory glob, which Tailwind doesn't expand. As a result, the classes the markdown preview emits (admonitions etc.) were never compiled; this predates v0.4.0.0: daisyUI themes, server monitoring dashboard, Unfold 0.109, security & performance #18.scripts/tailwind.shnow links the installed package to.tw-md2html, which is gitignored and removed after the build.docs/,*.md) is no longer scanned. Before this, words in the changelog added utilities, so editing release notes changedstyles.css.Release notes
CHANGELOG.md,README.mdanddocs/reports/releases/2026-10-13-v0.4.0.0.mdnow cover all of the above.Validation
manage.py test whiteneuron: 42 tests pass in three setups:?allabovelist_max_show_all;?allhonored;uv sync --frozen,npm ci,scripts/tailwind.sh): the tests pass and the rebuilt CSS matches the committed files.checkis clean andmakemigrationsreports no changes.msgfmt --checkpasses andmakemessagesfinds no untranslated Vietnamese strings.uv build: the wheel contains the new templates, static files,.mofiles and migrations.After merge
Create a GitHub Release for tag
v0.4.0.0onmain2.0; the publish workflow uploads it to PyPI. If the release is not dated 2026-10-13, update the date in the release notes.