Conversation
✅ Deploy Preview for cyf-onboarding-module ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This comment has been minimized.
This comment has been minimized.
|
Great work on this, The form implementation looks solid and addresses all requirements: Correct input fields and semantic structure (Name, Email, Colour, Size). Proper regex validation (.\S.\S.*) ensuring at least two non-space characters for the name. Complete size dropdown list with all 6 required options (XS through XXL). Strong accessibility setup with linked labels (for) and aria-describedby helper text. This PR is approved and ready to merge. |
|
I am having trouble doing a merge on this PR. I cannot see the merge button as I passed all criteria? any guidance would be welcome. |
To learn more about Markdown, see
|
cjyuan
left a comment
There was a problem hiding this comment.
Code is well formatted and free of syntax error. Well done.
Could you address the inline comments?
Suggestion: Use AI to explore "How to address inline comments in a PR?" and then practice what you learn in this PR.
There was a problem hiding this comment.
You were supposed to implement the form in index.html.
There was a problem hiding this comment.
index.html is the correct file for the T-shirt form task.
| <style> | ||
| body { | ||
| font-family: Arial, sans-serif; | ||
| background: #f7f7f7; | ||
| padding: 40px; | ||
| line-height: 1.6; | ||
| } |
There was a problem hiding this comment.
Could you move the internal CSS to an external fie? It is best practice to separate CSS from HTML.
There was a problem hiding this comment.
Thanks for the review. I’ve updated the form and moved the CSS into a separate stylesheet as requested. I also kept the naming consistent across the form fields.
| id="customer-name" | ||
| name="customer-name" | ||
| required | ||
| pattern=".*\S.*\S.*" | ||
| aria-describedby="nameHelp" | ||
| > | ||
| <small id="nameHelp">Name must contain at least two non‑space characters.</small> |
There was a problem hiding this comment.
customer-name- This naming convention is called kebab-case.nameHelp- This naming convention is called camelCase.
It's best practice to use a consistent naming convention throughout.
There was a problem hiding this comment.
I’ve updated the form field names to use a consistent naming convention throughout the page, using kebab-case for the form IDs and names to keep them clear and consistent.
cjyuan
left a comment
There was a problem hiding this comment.
Code looks good.
Note:
The PR description is not yet in the right format -- You should keep the original self-checklist and maintain the order of Self-checklist, Task-Code, and Changelist sections.
Have you watched this How To Submit Coursework at CodeYourFuture video before? At 7:25 mark, the video shows how to prepare the PR Description.
You don't need to change this PR description; you can practice it in future PRs.
There was a problem hiding this comment.
The code had been moved to index.html. If this file is no longer needed, you should remove it from this PR branch to keep the branch clean.
| <label class="option" for="tshirt-colour-red"> | ||
| <input id="tshirt-colour-red" name="tshirt-colour" type="radio" value="red" required /> | ||
| <span>Red</span> | ||
| </label> | ||
|
|
||
| <label class="option" for="tshirt-colour-blue"> | ||
| <input id="tshirt-colour-blue" name="tshirt-colour" type="radio" value="blue" /> | ||
| <span>Blue</span> | ||
| </label> | ||
|
|
||
| <label class="option" for="tshirt-colour-black"> | ||
| <input id="tshirt-colour-black" name="tshirt-colour" type="radio" value="black" /> | ||
| <span>Black</span> | ||
| </label> |
There was a problem hiding this comment.
Do you know why the for and id attributes on lines 43-56 are optional?
There was a problem hiding this comment.
I removed the redundant for and matching id attributes where the label already wraps the control, and committed the change. for + id are useful when the label and input are separate elements, since this is not the case I have removed them as they are already paired.


Self checklist
[X ] I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
[X ] My changes meet the requirements of the task
[X ] I have tested my changes
[X ] My changes follow the style guide
Task Code
CYF-1004
Changelist
I created an HTML form for ordering a T-shirt. It collects the following data: customer's name, email, t-shirt colour and size.
Summary
This PR implements the T-shirt order form with the required fields and validation.