Skip to content

Manchester | 26-ITP-Sep | Mathew Shaibu | Sprint 3 | Alarm clock - #1525

Open
MattCarolus10 wants to merge 25 commits into
CodeYourFuture:mainfrom
MattCarolus10:alarm-clock
Open

MattCarolus10 wants to merge 25 commits into
CodeYourFuture:mainfrom
MattCarolus10:alarm-clock

Conversation

@MattCarolus10

Copy link
Copy Markdown

Self checklist

  • I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
  • My changes meet the requirements of the task
  • I have tested my changes
  • My changes follow the style guide

Task code

CYF-1098

Changelist

Added pause button, Stop Alarm clears the flashing interval, pause button stops the countdown, Set Alarm starts fresh countdown

@MattCarolus10 MattCarolus10 added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Nov 13, 2026
@LonMcGregor LonMcGregor added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Nov 16, 2026
String(minutes).padStart(2, "0") +
":" +
String(remainingSeconds).padStart(2, "0");
timer = setInterval(() => {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

If Set Alarm is clicked twice before the first countdown ends, what interval does the first callback clear when it reaches zero?

To "like" or "dislike" this comment, please follow this link

Comment on lines +20 to +21
timer = setInterval(() => {
seconds--;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

How does a zero or blank duration reach the seconds === 0 check after the first tick?

To "like" or "dislike" this comment, please follow this link

clearInterval(flashTimer);
});
document.getElementById("pause").addEventListener("click", () => {
clearInterval(timer);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

After this clears the countdown interval, what lets the user resume that same countdown?

To "like" or "dislike" this comment, please follow this link

let timer;
window.addEventListener("load", () => {
document.getElementById("stop").addEventListener("click", () => {
clearInterval(flashTimer);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

If Stop Alarm is clicked while the page is red, what changes its background back after this interval is cleared?

To "like" or "dislike" this comment, please follow this link

@cyf-ai-code-reviewer cyf-ai-code-reviewer Bot removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Nov 16, 2026
@cyf-ai-code-reviewer cyf-ai-code-reviewer Bot added the Reviewed Volunteer to add when completing a review with trainee action still to take. label Nov 16, 2026
@cyf-ai-code-reviewer

Copy link
Copy Markdown

The CYF AI review has left comments. It will only review a PR one time. When you have addressed these comments, please request review again and a volunteer will take a look.

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

Labels

Reviewed Volunteer to add when completing a review with trainee action still to take.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants