Skip to content

North west | 26-ITP-Sept | Brian Yorachi | Sprint 1 | Form controls - #1516

Open
BrianY315 wants to merge 8 commits into
CodeYourFuture:mainfrom
BrianY315:feature/form-controls
Open

BrianY315 wants to merge 8 commits into
CodeYourFuture:mainfrom
BrianY315:feature/form-controls

Conversation

@BrianY315

@BrianY315 BrianY315 commented Sep 13, 2026

Copy link
Copy Markdown

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.

@netlify

netlify Bot commented Sep 13, 2026

Copy link
Copy Markdown

Deploy Preview for cyf-onboarding-module ready!

Name Link
🔨 Latest commit b4b6f2f
🔍 Latest deploy log https://app.netlify.com/projects/cyf-onboarding-module/deploys/6aad70d916d92f0009c5e872
😎 Deploy Preview https://deploy-preview-1516--cyf-onboarding-module.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
2 paths audited
Performance: 100 (no change from production)
Accessibility: 100 (no change from production)
Best Practices: 100 (no change from production)
SEO: 91 (🟢 up 5 from production)
PWA: -
View the detailed breakdown and full score reports
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions

This comment has been minimized.

@BrianY315 BrianY315 changed the title Northwest | 26-ITP-Sept | Brian Yorachi | Sprint 1 | Form controls North west | 26-ITP-Sept | Brian Yorachi | Sprint 1 | Form controls Sep 13, 2026
@Liam310 Liam310 added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Sep 14, 2026
@valentina-starr1

Copy link
Copy Markdown

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.

@BrianY315

Copy link
Copy Markdown
Author

@valentina-starr1

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.

@cjyuan

cjyuan commented Sep 17, 2026

Copy link
Copy Markdown
Contributor
image
  1. Your PR description is not yet formatted correctly. Could you refer to some of these completed PRs to see how the PR description should look like, and then update your PR description accordingly?

To learn more about Markdown, see

  1. In ITP, the PR will only be reviewed; it won't be merged into CYF's repo.

@cjyuan cjyuan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread Form-Controls/task-Tshirts Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You were supposed to implement the form in index.html.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

index.html is the correct file for the T-shirt form task.

Comment thread Form-Controls/task-Tshirts Outdated
Comment on lines +6 to +12
<style>
body {
font-family: Arial, sans-serif;
background: #f7f7f7;
padding: 40px;
line-height: 1.6;
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you move the internal CSS to an external fie? It is best practice to separate CSS from HTML.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread Form-Controls/task-Tshirts Outdated
Comment on lines +64 to +70
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>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • 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.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 cjyuan added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Sep 17, 2026
@BrianY315 BrianY315 added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Sep 18, 2026

@cjyuan cjyuan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread Form-Controls/task-Tshirts Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread Form-Controls/index.html Outdated
Comment on lines +43 to +56
<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>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know why the for and id attributes on lines 43-56 are optional?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@cjyuan cjyuan removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Sep 18, 2026
@BrianY315 BrianY315 added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. and removed Reviewed Volunteer to add when completing a review with trainee action still to take. labels Sep 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants