-
-
Notifications
You must be signed in to change notification settings - Fork 155
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
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.
Good start on this sprint - there are a few parts of the tasks still to implement
Sprint-3/alarmclock/alarmclock.js
Outdated
return; | ||
} | ||
|
||
setTimeout(playAlarm, seconds * 1000); // play alarm after the entered time |
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.
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 = ""; |
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.
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.
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. |
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.
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
Sprint-3/alarmclock/alarmclock.js
Outdated
timeOnScreen--; | ||
document.getElementById( | ||
"timeRemaining" | ||
).innerText = `TimeRemaining: ${mins}: ${timeOnScreen}`; |
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.
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?
Thanks @LonMcGregor for your feedback. I've updated the alarm to work with different cases. |
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? |
I updated the function by adding a clearInterval at the begining of the set alarm. I think now it works well. |
Great. You are done with this sprint now. Well done! |
Learners, PR Template
Self checklist
Changelist
I've implemented all files and added changes to the Html files
Questions
Ask any questions you have for your reviewer.