-
-
Notifications
You must be signed in to change notification settings - Fork 149
Glasgow | ITP May 25 | Mirabelle Morah | Data Groups | Sprint-3 | Alarm Clock #603
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?
Glasgow | ITP May 25 | Mirabelle Morah | Data Groups | Sprint-3 | Alarm Clock #603
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.
Well done! You have done a good job at finishing the code for the alarm. A couple of small comments that you should resolve easily.
I would consider two ideas that I think would be useful for you. You clearly have a good understanding of the code at this stage, so you can think about user experience and code readability.
User Experience is very important, you want to make sure your customers want and enjoy to use the products you create. Think how you use apps, what kind of feedback is there when you take an action? How do you see errors? What happens when you try to do something that you can't/not allowed to? Think how these are handled by other well designed apps and how you can integrate that in your work.
Code readability is another one of those "nice to do" things. If others are reading your code, you want to make sure it is easily understood and it makes sense. Often times you may find yourself able to achieve something in code with a single line. That sounds great, but you should always consider if it is easy to read for others, or even for yourself a year down the line.
if (isNaN(currentTime) || currentTime <= 0) { | ||
document.getElementById("timeRemaining").innerText = | ||
"Time Remaining: 00:00"; | ||
return; | ||
} |
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.
I would also consider resetting the input
to be empty. This way you can let the user know that an action has indeed happened, but it did not resolve into any meaningful result as the input was not valid.
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.
I have put this into consideration and actioned.
Sprint-3/alarmclock/style.css
Outdated
margin: 0; | ||
padding: 0; | ||
font-family: rubik, sans-serif; | ||
margin: 10px 0; |
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.
You don't need two margin
declarations here. See which one you need. As a side question - which of these two do you think will take precedence here?
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.
You're right that was an oversight. The last margin will take effect "margin: 10px 0; because it's being read in a 'cascading' format. I have taken off the first one
…et Alarm" button is clicked.
Thank you for the feedback! I have taken off the extra margin and made the input box reset to "empty" once "set alarm" button is hit, completed the two comments now. On your feedback on UX and code understanding, I will keep improving on this. Thanks.
|
Thank you for addressing those. Keep up the great work! I think this covers all requirements for the task so I shall mark it as complete. |
Learners, PR Template
Self checklist
Changelist
Questions
Nil. Thank you.