Skip to content

Unified transition style + speed#41

Open
csader wants to merge 7 commits into
mainfrom
feat/transition-style-speed
Open

Unified transition style + speed#41
csader wants to merge 7 commits into
mainfrom
feat/transition-style-speed

Conversation

@csader
Copy link
Copy Markdown
Owner

@csader csader commented May 15, 2026

Summary

  • Collapses flap_effect (wave/sync/slot) and transition style into a single transition_style setting
  • 13 order-based styles (ltr, rtl, diagonal, spiral, etc.) + sync + slot
  • Global default in Settings, per-app override via manifest, per-page override in compose and app playlists
  • Sim reflects active transition style — JS getAnimationOrder() mirrors Python, polling loop applies correct per-module delays
  • Smart speed defaults: slot→80ms, sync→0ms (hidden), others→15ms

Bug fixes

Test plan

  • Set style=diagonal in Settings — all transitions use diagonal order
  • Set style=sync — all modules arrive simultaneously (sim shows this)
  • Set style=slot — spin then lock in L→R
  • Compose tab: set style=rtl, push — display uses rtl
  • App playlist compose entry: set style=spiral — that page uses spiral
  • Existing animation apps unaffected

🤖 Generated with Claude Code

@csader csader force-pushed the feat/transition-style-speed branch 2 times, most recently from 1c70058 to b71d37a Compare May 16, 2026 03:38
Chris and others added 7 commits May 17, 2026 14:22
Three new effects selectable in Settings > Transition Effect:
- Wave: modules stagger L→R with configurable ms between each
- Sync: all modules arrive simultaneously (farthest starts first)
- Slot: all spin to random chars, then lock in L→R

Effects apply globally to all display transitions. No firmware
changes required — all timing is controlled Pi-side.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Collapses flap_effect (wave/sync/slot) into transition_style, which
  now includes all 13 order-based styles plus sync and slot
- Removes flap_effect/flap_effect_speed settings entirely
- Global default: transition_style + transition_speed in Settings
- Per-app override: _send_with_effect checks plugin_{id}_transition_style
- Per-page: compose tab and app playlist compose entries have style/speed controls
- _send_with_effect now takes page_style string (not pre-converted order)
  and resolves priority: per-page > per-app > global

Closes #34

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- slot → 80ms (makes lock-in effect visible)
- sync → 0ms (speed is irrelevant, timing is distance-based)
- all others → 15ms (fast, near-simultaneous)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…n badge

- #33: send_to_display_sync treated current_indices=-1 as dist=128,
  making all modules start simultaneously on first run. Now treats -1
  as position 0 so stagger works correctly from the start.
- #33: Hide speed input when sync style is selected (speed is irrelevant),
  applied on settings load and on style change.
- #35: Slot machine spin chars could match the target char, making some
  modules appear to lock in during the spin phase. Now ensures spin char
  always differs from target.
- #36: send_to_display now updates current_display_string and publishes
  MQTT state before the serial loop, so the browser sim reflects the
  new text immediately.
- Version badge now uses Jinja template variable instead of hardcoded string.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- /current_state now returns transition_style and transition_speed
- JS getAnimationOrder() mirrors the Python function for all 13 styles
- Polling loop applies correct per-module delays based on active style:
  - Order-based styles (ltr, rtl, diagonal, spiral, etc.): modules start
    in the configured order with transition_speed ms between each
  - Sync: shorter-distance modules start later so all arrive simultaneously
  - Slot: all modules spin to random chars, then lock in L→R after 1.5s

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
playlist_loop() and _run_app_playlist() were missing global declarations
for last_transition_style and last_transition_speed, so assignments were
treated as local variables and the module-level globals never updated.
Also moved style/speed tracking before the skip-if-unchanged check so
the sim reflects the correct style even when the text hasn't changed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@csader csader force-pushed the feat/transition-style-speed branch from b71d37a to b00c589 Compare May 17, 2026 19:38
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