-
-
Notifications
You must be signed in to change notification settings - Fork 157
Sheffield| May 2025| Mayowa Fadare| Sprint 3| Alarm Clock #712
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- On page load, the clock shows 10 seconds. Why starts at 10 seconds?
- When the clock countdowns to 0, the input field is disabled. Once disabled, I could not figure out a way to enable it.

- I don't understand how the interface work.
- "Start Alarm" and "Pause Alarm" buttons are disabled at all times.
- What is the purpose of the "Flash Background" button?
- Only three of the buttons are assigned an event listener. That means four of the buttons won't respond to mouse click (even when they are enabled).
- While the clock is counting down, clicking "Stop Alarm" follow by clicking "Resume Alarm" will trigger the alarm sound even though the countdown has not yet reached zero.
Sprint-3/alarmclock/alarmclock.js
Outdated
if (typeof window !== "undefined") { | ||
window.onload = setup; | ||
window.setup = setup; | ||
window.setAlarm = setAlarm; | ||
window.pauseAlarm = pauseAlarm; | ||
window.resumeAlarm = resumeAlarm; | ||
window.playAlarm = playAlarm; | ||
window.flashBackground = flashBackground; | ||
window.updateTimeDisplay = updateTimeDisplay; | ||
window.formatTime = formatTime; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this for? Can the code work equally well without this code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the review, Start and Stop button now working as expected, every other button removed.
582910b
to
3272128
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
App is working good now.
12ad2ca
to
4a802b8
Compare
Learners, PR Template
Self checklist
Changelist
Briefly explain your PR.
Questions
Ask any questions you have for your reviewer.