Skip to content

Conversation

@nahommesfin77
Copy link

Learners, PR Template

Self checklist

  • I have committed my files one by one, on purpose, and for a reason
  • I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
  • I have tested my changes
  • My changes follow the style guide
  • My changes meet the requirements of this task

Changelist

Alarm Clock:

Implemented countdown functionality that updates the title with time remaining.
Added alarm sound playback when the timer reaches zero.
Created a stop button to stop the sound of the alarm.
Updated index.html title to "Alarm clock app

@nahommesfin77 nahommesfin77 added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Aug 17, 2025
@LonMcGregor LonMcGregor added the Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. label Aug 18, 2025
Copy link

@LonMcGregor LonMcGregor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work on this task, I have found one edge case for you to consider: What happens when you try to start a new timer when the old one has finished and is still playing an alarm? Can you think of any way to improve that userexperience?

@LonMcGregor LonMcGregor added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. labels Aug 18, 2025
@nahommesfin77
Copy link
Author

Good work on this task, I have found one edge case for you to consider: What happens when you try to start a new timer when the old one has finished and is still playing an alarm? Can you think of any way to improve that userexperience?

line 35

I have added alarmInput.value = ""; so that the input is cleared automatically after the alarm sound started.

@nahommesfin77 nahommesfin77 added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. and removed Reviewed Volunteer to add when completing a review with trainee action still to take. labels Aug 18, 2025
@LonMcGregor
Copy link

What about the alarm itself? What happens if you start a new alarm while the old sound is still playing?

@LonMcGregor LonMcGregor added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Aug 18, 2025
@nahommesfin77
Copy link
Author

What about the alarm itself? What happens if you start a new alarm while the old sound is still playing?

I see the issue now, if a new alarm is set, the old sound just keeps playing. I fixed this issue by pausing the alarm audio.pause(); and reseting the alarm sound to 0 audio.currentTime = 0; to stop the alarm when a new alarm is set.

Lines 20 & 21
audio.pause();
audio.currentTime = 0;

@nahommesfin77
Copy link
Author

Thank you for the feedbacks and suggestions you have given me to improve my work throughout this sprint.

@nahommesfin77 nahommesfin77 added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. and removed Reviewed Volunteer to add when completing a review with trainee action still to take. labels Aug 18, 2025
@LonMcGregor LonMcGregor added Complete Volunteer to add when work is complete and all review comments have been addressed. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Aug 19, 2025
@LonMcGregor
Copy link

Great work - you are done with this PR and sprint now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Complete Volunteer to add when work is complete and all review comments have been addressed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants