feat(ui): allow configuring background via css instead of an image - #1101
feat(ui): allow configuring background via css instead of an image#1101flbraun wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (7)
Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughThe change adds a UI background CSS configuration value, exposes it through the app context, validates it in the frontend, and gives it precedence over the configured background image. ChangesUI background CSS
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This change adds an optional configurable CSS background while preserving the existing image fallback, with no actionable merge-blocking risk remaining after normal checks and review. Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 6 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Thank you for Tinyauth! This is my first contribution to this project.
The default background image (foggy forest) transfers ~550kB over the wire on a cold cache. Many of my users run on spotty and slow connections and report that loading the background image causes severe UI flickering.
I'm aware that one may configure a custom, smaller background image via the
TINYAUTH_UI_BACKGROUNDIMAGEsetting, but I think I've found an even better solution for this scenario: The newTINYAUTH_UI_BACKGROUNDCSSconfig allows specifying the value of the backdrop'sbackgroundCSS property. With modern browser's CSS capabilities, this allows for a surprising amount of creativity and doesn't require any additional network transfers.For example, setting

TINYAUTH_UI_BACKGROUNDCSS="linear-gradient(135deg, #03045e 0%, #0077b6 50%, #00b4d8 100%)"makes the UI look like this:Your thoughts about this? Is anything missing from this PR?
Summary by CodeRabbit