Skip to content

Glasgow| 25-ITP-May | Bassam Alshujaa | Sprint 3 | Data-Groups #703

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

Bassam-Radwan
Copy link

@Bassam-Radwan Bassam-Radwan commented Jul 25, 2025

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

I've implemented all files and added changes to the Html files

Questions

Ask any questions you have for your reviewer.

@Bassam-Radwan Bassam-Radwan changed the title Glasgow| 25-ITP-May | | Sprint 1 | Alarm Clock Glasgow| 25-ITP-May | | Sprint 1 | Data-Sprint-3 Jul 25, 2025
@Bassam-Radwan Bassam-Radwan changed the title Glasgow| 25-ITP-May | | Sprint 1 | Data-Sprint-3 Glasgow| 25-ITP-May | Bassam Alshujaa | Sprint 1 | Data-Groups Jul 25, 2025
@Bassam-Radwan Bassam-Radwan changed the title Glasgow| 25-ITP-May | Bassam Alshujaa | Sprint 1 | Data-Groups Glasgow| 25-ITP-May | Bassam Alshujaa | Sprint 3 | Data-Groups Jul 25, 2025
@Bassam-Radwan Bassam-Radwan added the Needs Review Participant to add when requesting review label Jul 25, 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 start on this sprint - there are a few parts of the tasks still to implement

return;
}

setTimeout(playAlarm, seconds * 1000); // play alarm after the entered time

Choose a reason for hiding this comment

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

The alarm sound is playing correctly, but you also need to update the timer on the page.

@@ -1,25 +1,68 @@
function populateTodoList(todos) {
let list = document.getElementById("todo-list");
// Write your code to create todo list elements with completed and delete buttons here, all todos should display inside the "todo-list" element.
list.innerHTML = "";

Choose a reason for hiding this comment

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

Remember what the readme file asks for - you need a button that can toggle the completed state of the task. Without this, it's not possible to fully test this.

@LonMcGregor LonMcGregor added Reviewed Volunteer to add when completing a review and removed Needs Review Participant to add when requesting review labels Jul 28, 2025
@Bassam-Radwan
Copy link
Author

Thanks for your feedback, @LonMcGregor! I've updated the alarm clock to show the time remaining on screen and the todo list to delete tasks and add a line-through style to completed tasks.

@Bassam-Radwan Bassam-Radwan added Needs Review Participant to add when requesting review and removed Reviewed Volunteer to add when completing a review labels Jul 30, 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.

Great work on the todolist - it is done now.

However, there is still a problem with the alarm clock's display - I've left a comment about that

timeOnScreen--;
document.getElementById(
"timeRemaining"
).innerText = `TimeRemaining: ${mins}: ${timeOnScreen}`;

Choose a reason for hiding this comment

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

There is still a problem with the way you are handling displaying the timer. Here is a test case for you to try: Run the clock from 70 seconds. Can you see the problem that happens? Where in the code does the problem lie?

@LonMcGregor LonMcGregor added Reviewed Volunteer to add when completing a review and removed Needs Review Participant to add when requesting review labels Jul 31, 2025
@Bassam-Radwan
Copy link
Author

Bassam-Radwan commented Aug 1, 2025

Thanks @LonMcGregor for your feedback. I've updated the alarm to work with different cases.

@Bassam-Radwan Bassam-Radwan added Needs Review Participant to add when requesting review and removed Reviewed Volunteer to add when completing a review labels Aug 1, 2025
@LonMcGregor
Copy link

Good changes. It now handles larger inputs right. But what happens if I start a clock with a long timer (e.g. 60 seconds), then while it is running I start the timer again with a short time, e.g. 2 seconds? What would you expect to happen?

@LonMcGregor LonMcGregor added Reviewed Volunteer to add when completing a review and removed Needs Review Participant to add when requesting review labels Aug 1, 2025
@Bassam-Radwan
Copy link
Author

I updated the function by adding a clearInterval at the begining of the set alarm. I think now it works well.

@Bassam-Radwan Bassam-Radwan added Needs Review Participant to add when requesting review and removed Reviewed Volunteer to add when completing a review labels Aug 1, 2025
@LonMcGregor
Copy link

Great. You are done with this sprint now. Well done!

@LonMcGregor LonMcGregor removed the Needs Review Participant to add when requesting review label Aug 1, 2025
@LonMcGregor LonMcGregor added the Complete Volunteer to add when work is complete and review comments have been addressed label Aug 1, 2025
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 review comments have been addressed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants