[PR #5] [MERGED] feat(rotator): configurable fade speed #5

Closed
opened 2026-08-09 19:09:24 +02:00 by zaph0d · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/niels-emmer/wall-cast/pull/5
Author: @niels-emmer
Created: 3/23/2026
Status: Merged
Merged: 3/23/2026
Merged by: @niels-emmer

Base: mainHead: feature/rotator-fade-speed


📝 Commits (1)

  • 7c7a9c6 feat(rotator): add configurable fade speed setting

📊 Changes

7 files changed (+73 additions, -1 deletions)

View changed files

📝 backend/app/wall_config.py (+2 -0)
📝 config/wall-cast.example.yaml (+5 -0)
📝 docs/config-reference.md (+2 -0)
📝 frontend/src/App.tsx (+2 -0)
📝 frontend/src/admin/AdminPanel.tsx (+59 -0)
📝 frontend/src/types/config.ts (+2 -0)
📝 frontend/src/widgets/rotate/RotatorWidget.tsx (+1 -1)

📄 Description

Summary

  • Adds a global shared.fade_speed config key (float, seconds) that controls the cross-fade animation duration for all rotator widgets across all screens
  • Previous hardcoded value (0.8s) becomes the default ("Normal")
  • Admin → General tab gets a Rotator fade speed segmented control with 5 steps: Slow · Relaxed · Normal · Snappy · Fast

How it works

  • Backend includes fade_speed in the merged config response and seeds the default config with 0.8
  • App.tsx sets a CSS variable --rotator-fade-duration on the grid root element
  • RotatorWidget reads var(--rotator-fade-duration, 0.8s) — the hardcoded fallback means it still works on old configs without the key
  • Changing the slider in the admin panel writes to shared.fade_speed in the YAML; SSE hot-reload propagates it to all screens instantly

Test plan

  • Open admin panel → General tab — "Rotator fade speed" slider appears between language and news settings
  • Switch to "Fast" and observe rotator fades snap quickly on the display
  • Switch to "Slow" and observe a long 2 s cross-fade
  • "Normal" (middle step) matches the previous behaviour
  • Save and reload — setting persists
  • shared.fade_speed appears in the YAML after saving
  • Existing configs without fade_speed still work (defaults to 0.8 s)

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/niels-emmer/wall-cast/pull/5 **Author:** [@niels-emmer](https://github.com/niels-emmer) **Created:** 3/23/2026 **Status:** ✅ Merged **Merged:** 3/23/2026 **Merged by:** [@niels-emmer](https://github.com/niels-emmer) **Base:** `main` ← **Head:** `feature/rotator-fade-speed` --- ### 📝 Commits (1) - [`7c7a9c6`](https://github.com/niels-emmer/wall-cast/commit/7c7a9c677bb3a24d1dc9354b5e93087b310c587c) feat(rotator): add configurable fade speed setting ### 📊 Changes **7 files changed** (+73 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `backend/app/wall_config.py` (+2 -0) 📝 `config/wall-cast.example.yaml` (+5 -0) 📝 `docs/config-reference.md` (+2 -0) 📝 `frontend/src/App.tsx` (+2 -0) 📝 `frontend/src/admin/AdminPanel.tsx` (+59 -0) 📝 `frontend/src/types/config.ts` (+2 -0) 📝 `frontend/src/widgets/rotate/RotatorWidget.tsx` (+1 -1) </details> ### 📄 Description ## Summary - Adds a global `shared.fade_speed` config key (float, seconds) that controls the cross-fade animation duration for all rotator widgets across all screens - Previous hardcoded value (`0.8s`) becomes the default ("Normal") - Admin → General tab gets a **Rotator fade speed** segmented control with 5 steps: Slow · Relaxed · Normal · Snappy · Fast ## How it works - Backend includes `fade_speed` in the merged config response and seeds the default config with `0.8` - `App.tsx` sets a CSS variable `--rotator-fade-duration` on the grid root element - `RotatorWidget` reads `var(--rotator-fade-duration, 0.8s)` — the hardcoded fallback means it still works on old configs without the key - Changing the slider in the admin panel writes to `shared.fade_speed` in the YAML; SSE hot-reload propagates it to all screens instantly ## Test plan - [ ] Open admin panel → General tab — "Rotator fade speed" slider appears between language and news settings - [ ] Switch to "Fast" and observe rotator fades snap quickly on the display - [ ] Switch to "Slow" and observe a long 2 s cross-fade - [ ] "Normal" (middle step) matches the previous behaviour - [ ] Save and reload — setting persists - [ ] `shared.fade_speed` appears in the YAML after saving - [ ] Existing configs without `fade_speed` still work (defaults to 0.8 s) 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
zaph0d 2026-08-09 19:09:24 +02:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
github-mirrors/wall-cast#5
No description provided.