London| 26-ITP-May | Mandip Sanger | Sprint 3 | Alarm Clock - #1435
London| 26-ITP-May | Mandip Sanger | Sprint 3 | Alarm Clock#1435mandipsanger wants to merge 8 commits into
Conversation
This comment has been minimized.
This comment has been minimized.
cjyuan
left a comment
There was a problem hiding this comment.
-
You missed updating
index.htmlaccording to an instruction inreadme.md. -
Currently when starting a new countdown, the application does not always return to a clean initial state, which can lead to inconsistent behaviour between runs.
Note: a user may not click the "Stop Alarm" button first before starting a new count down.
| <label for="alarmSet">Set time to:</label> | ||
| <input id="alarmSet" type="number" /> | ||
| <label for="alarmSet">Set time in seconds:</label> | ||
| <input id="alarmSet" type="number" min="1" step="1" placeholder="Enter seconds" /> |
There was a problem hiding this comment.
Note: Without a form, the browser won't check the input against the constraints min="1" step="1".
Change is optional.
cjyuan
left a comment
There was a problem hiding this comment.
I assume this PR is ready to be re-reviewed.
Changes look good.
| if (!Number.isInteger(numberValue)) { | ||
| alert("only enter an integer value."); | ||
| return; // exit a function if not an integer | ||
| alert("Only enter an integer value."); | ||
| return; | ||
| } | ||
|
|
||
| //step 4 validate if it is greater than 0 | ||
| // Step 4: validate if it is greater than 0 | ||
| if (numberValue <= 0) { | ||
| alert("only enter a number which is bigger than 0"); | ||
| return; //Exit a funciton if not greater than 0 | ||
| alert("Only enter a number which is bigger than 0."); | ||
| return; | ||
| } |
There was a problem hiding this comment.
Notes:
-
Could probably just check both conditions in the one if-statement and then change the message to mention "... positive integer".
-
While
alert()is convenient to use, it is not a user-friendly way to notify the user an error.
No change needed.
|
The files changed in this PR don't match what is expected for this task. Please check that you committed the right files for the task, and that there are no accidentally committed files from other sprints. Please review the 'files changed' tab at the top of the page. Here is an example of a file that has been changed on this branch but shouldn't be: 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. |
1 similar comment
|
The files changed in this PR don't match what is expected for this task. Please check that you committed the right files for the task, and that there are no accidentally committed files from other sprints. Please review the 'files changed' tab at the top of the page. Here is an example of a file that has been changed on this branch but shouldn't be: 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. |
|
In your most recent commit, you introduced a modified file in the todo-list folder. Could your revert the change to that file to keep this PR clean? |
|
The files changed in this PR don't match what is expected for this task. Please check that you committed the right files for the task, and that there are no accidentally committed files from other sprints. Please review the 'files changed' tab at the top of the page. Here is an example of a file that has been changed on this branch but shouldn't be: 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. |
1 similar comment
|
The files changed in this PR don't match what is expected for this task. Please check that you committed the right files for the task, and that there are no accidentally committed files from other sprints. Please review the 'files changed' tab at the top of the page. Here is an example of a file that has been changed on this branch but shouldn't be: 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. |
Self checklist
Sprint 3 AlarmClock