-
-
Notifications
You must be signed in to change notification settings - Fork 193
West Midlands | ITP-Sept-25 | Georgina Rogers | Sprint 3 | Alarm Clock #905
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
|
Your PR's title isn't in the expected format. Please check the expected title format, and update yours to match. Reason: Wrong number of parts separated by |s If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed). If this PR needs reviewed, please add the 'Needs Review' label to this PR after you have resolved the issues listed above. |
|
Your PR description contained template fields which weren't filled in. Check you've ticked everything in the self checklist, and that any sections which prompt you to fill in an answer are either filled in or removed. If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed). If this PR needs reviewed, please add the 'Needs Review' label to this PR after you have resolved the issues listed above. |
3 similar comments
|
Your PR description contained template fields which weren't filled in. Check you've ticked everything in the self checklist, and that any sections which prompt you to fill in an answer are either filled in or removed. If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed). If this PR needs reviewed, please add the 'Needs Review' label to this PR after you have resolved the issues listed above. |
|
Your PR description contained template fields which weren't filled in. Check you've ticked everything in the self checklist, and that any sections which prompt you to fill in an answer are either filled in or removed. If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed). If this PR needs reviewed, please add the 'Needs Review' label to this PR after you have resolved the issues listed above. |
|
Your PR description contained template fields which weren't filled in. Check you've ticked everything in the self checklist, and that any sections which prompt you to fill in an answer are either filled in or removed. If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed). If this PR needs reviewed, please add the 'Needs Review' label to this PR after you have resolved the issues listed above. |
cjyuan
left a comment
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.
Code is very solid.
At "some point", the clock could appear as -1:-1. Is that what you intended?
| <h1 id="timeRemaining" class="time-remaining"> | ||
| Time Remaining:<br />00:00 | ||
| </h1> |
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.
(Optional change)
You could also consider structuring the HTML like this:
<div id="timeRemaining" class="time-remaining">
<div>Time Remaining:</div>
<div id="timeDisplay">00:00</div>
</div>
This approach has several benefits:
-
Cleaner JavaScript: The JS only needs to update the dynamic value, not the static label.
-
Better semantics:
h1is meant for page headings, whiledivorspanis more appropriate for generic UI elements. Font size and visual hierarchy should be handled with CSS instead. -
More flexible layout: Avoid using
<br>for spacing or layout in application UIs -- CSS provides far greater control and maintainability.
| <button id="stop" class="stop-button">STOP</button> | ||
| </div> | ||
|
|
||
| <script src="alarmclock.js"></script> |
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.
(Optional change)
You could also consider loading the JS code as an ES module:
<script src="alarmclock.js" type="module"></script>
This offers a couple of key advantages:
-
deferis implied: Module scripts are loaded asynchronously and executed only after the HTML document has been fully parsed. -
Scoped execution: The code runs in the module scope, avoiding unintended pollution of the global namespace.
cjyuan
left a comment
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.
Changes are good. Indentation is a bit off after latest changes.
Learners, PR Template
Self checklist
Changelist
Alarm clock function written, HTML improved for readability, and alarm tested in live server
Questions
Had to copy over all my changes from a another closed pull request due to conflicting changes.