Skip to content

fix(blazor): cache content panel readable in dark Radzen themes#44

Merged
poxet merged 2 commits into
masterfrom
feature/cache-content-darkmode
May 10, 2026
Merged

fix(blazor): cache content panel readable in dark Radzen themes#44
poxet merged 2 commits into
masterfrom
feature/cache-content-darkmode

Conversation

@poxet
Copy link
Copy Markdown
Contributor

@poxet poxet commented May 10, 2026

Summary

Reported by Quilt4Net.Server: with a dark Radzen theme active (e.g. Humanistic Dark), the cache item JSON panel on /developer/cache rendered white-on-white because the <pre> had a hardcoded light background.

Fix: replace the inline background:#f5f5f5 with var(--rz-base) and add color:var(--rz-text-color) so the panel adapts to whichever Radzen theme is active.

Bundled NuGet bumps

While the feature was open, the session-start NuGet check turned up:

  • Tharga.Blazor 2.1.4 → 2.1.5 in Tharga.Cache.Blazor (same project being modified, low-risk patch).
  • Tharga.MongoDB 2.10.9 → 2.10.10 in Tharga.Cache.MongoDB. This one mattered: the previous version pulled in transitively-vulnerable SharpCompress 0.30.1 (NU1902, moderate) and Snappier 1.0.0 (NU1903, high). After the bump, the build's warning count drops from 21 → 1.

Tharga.Console 3.7.4 → 4.0.0 was deliberately skipped (major bump, sample is intentionally pinned to 3.7.x).

Test plan

  • CI build is green (warning count back under threshold).
  • After merge, run the Tharga.Cache.BlazorServer sample on a dark Radzen theme and confirm the JSON panel is legible.

poxet added 2 commits May 10, 2026 16:18
The JSON `<pre>` in CacheContent.razor was hardcoded to
background:#f5f5f5, which renders white-on-white in dark Radzen
themes. Switched to var(--rz-base) for the panel background and
var(--rz-text-color) for the text so the panel adapts to the
active theme. Reported by Quilt4Net.Server.

Bundled NuGet bumps (per the session-start NuGet check):
- Tharga.Blazor 2.1.4 -> 2.1.5 (same project being modified).
- Tharga.MongoDB 2.10.9 -> 2.10.10 (clears NU1902/NU1903 transitive
  vulnerability advisories from SharpCompress 0.30.1 and Snappier
  1.0.0; warning count back from 21 to 1).

Build clean (1 pre-existing CS0162); 453 tests pass.
@codecov
Copy link
Copy Markdown

codecov Bot commented May 10, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@poxet poxet merged commit a712e60 into master May 10, 2026
4 of 5 checks passed
@poxet poxet deleted the feature/cache-content-darkmode branch May 10, 2026 14:36
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