Open malpern opened 2 weeks ago
This PR implements a new countdown timer demo that counts down from 10 seconds with interactive features, animations, and sound effects. The implementation includes a new HTML page with embedded JavaScript for timer functionality and CSS for styling, along with necessary backend route changes and static file serving setup.
classDiagram
class TimerCountdown {
- int INITIAL_SECONDS
- int INITIAL_MINUTES
- int seconds
- int minutes
- bool isPaused
- counter
+ startTimer()
+ Timer()
+ initializeTimer(elements)
+ updateTimerState(elements)
+ attachTimerClickHandler(elements)
+ updateTimerDisplay(element, mins, secs, useBlinkingColon)
+ handleSounds(action, sounds)
+ handleFinishState(elements)
+ handleFinishClick(event, elements)
+ resetTimer(elements)
}
note for TimerCountdown "This class handles the countdown timer logic, including state management, display updates, and sound control."
Change | Details | Files |
---|---|---|
Added a new countdown timer demo page with interactive features |
|
src/bboard/assets/timer_countdown.html |
Updated backend to support the new timer demo |
|
src/bboard/main.py src/bboard/demo/clock_display.py |
Updated development dependencies |
|
.pre-commit-config.yaml |
I added a new demo, "timer_countdown()" which counts down from 10 and plays sounds and animates when time is up. If you see any usability issues, edge cases, or have suggestions let me know.
Summary by Sourcery
Add a new timer countdown feature that includes a 10-second countdown with sound effects and animations. Update the pre-commit configuration to use the latest versions of nbstripout and pre-commit-hooks.
New Features:
Enhancements:
Build: