Skip to content

Commit eca2128

Browse files
authored
Merge branch 'CodeYourFuture:main' into feature/wireframe
2 parents 9d357cd + a7b8a25 commit eca2128

4 files changed

Lines changed: 116 additions & 24 deletions

File tree

.github/workflows/validate-pr-metadata.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,5 @@ jobs:
1515
- uses: actions/checkout@v4
1616
- uses: CodeYourFuture/actions/validate-pr-metadata@main
1717
with:
18+
give_more_specific_comment_for_earlier_learners: true
1819
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Form-Controls/README.md

Lines changed: 27 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,44 +8,60 @@
88
- [ ] Write a valid form
99
- [ ] Test with Devtools
1010
- [ ] Refactor using Devtools
11+
- [ ] Use version control by committing often and pushing regularly to GitHub
12+
- [ ] Develop the habit of writing clean, well-structured, and error-free code
1113
<!--{{<objectives>}}>-->
1214

1315
## Task
1416

15-
We are selling t-shirts. Write a form to collect the following data:
17+
We are selling T-shirts. Write a form to collect the following data:
1618

1719
Our customers already have accounts, so we know their addresses and charging details already. We don't need to collect that data. We want to confirm they are the right person, then get them to choose a colour and size.
1820

1921
Writing that out as a series of questions to ask yourself:
2022

21-
1. What is the customer's name? I must collect this data, and validate it. But what is a valid name? I must decide something.
22-
2. What is the customer's email? I must make sure the email is valid. Email addresses have a consistent pattern.
23-
3. What colour should this t-shirt be? I must give 3 options. How will I make sure they don't pick other colours?
24-
4. What size does the customer want? I must give the following 6 options: XS, S, M, L, XL, XXL
23+
1. What is the customer's name? I must collect this data and ensure it contains at least two non-space characters.
24+
2. What is the customer's email? I must make sure the email is valid. Email addresses follow a consistent pattern.
25+
3. What colour should this T-shirt be? I must provide 3 options. How will I ensure they do not choose other colours?
26+
4. What size does the customer want? I must provide the following 6 options: XS, S, M, L, XL, XXL
2527

2628
All fields are required.
2729
Do not write a form action for this project.
2830

29-
## Developers must test their work.
31+
## Acceptnce Criteria
32+
33+
### Developers must test their work.
3034

3135
Let's write out our testable criteria. Check each one off as you complete it.
3236

33-
- [ ] I have used HTML only.
34-
- [x] I have not used any CSS or JavaScript.
37+
- [ ] I have only used HTML and CSS.
38+
- [ ] I have not used any JavaScript.
3539

3640
### HTML
3741

38-
- [ ] My form is semantic html.
42+
- [ ] My form is semantic HTML.
3943
- [ ] All inputs have associated labels.
4044
- [ ] My Lighthouse Accessibility score is 100.
41-
- [ ] I require a valid name. I have defined a valid name as a text string of two characters or more.
45+
- [ ] I require a valid name.
4246
- [ ] I require a valid email.
4347
- [ ] I require one colour from a defined set of 3 colours.
4448
- [ ] I require one size from a defined set of 6 sizes.
4549

46-
## Resources
50+
### Developers must adhere to professional standards.
51+
52+
> Before you say you're done: Is your code readable? Does it run correctly? Does it look professional?
4753
54+
These practices reflect the level of quality expected in professional work.
55+
They ensure your code is reliable, maintainable, and presents a polished, credible experience to users.
56+
57+
- [ ] My HTML code has no errors or warnings when validated using https://validator.w3.org/
58+
- [ ] My code is consistently formatted
59+
- [ ] My page content is free of typos and grammatical mistakes
60+
- [ ] I commit often and push regularly to GitHub
61+
62+
## Resources
4863
- [MDN: Form controls](https://developer.mozilla.org/en-US/docs/Learn/Forms)
4964
- [MDN: Form validation](https://developer.mozilla.org/en-US/docs/Learn/Forms/Form_validation)
5065
- [Lighthouse](https://developers.google.com/web/tools/lighthouse)
5166
- [Lighthouse Guide](https://programming.codeyourfuture.io/guides/testing/lighthouse)
67+
- [Format Code and Make Logical Commits in VS Code](../practical_guide.md)

Wireframe/README.md

Lines changed: 30 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,5 @@
11
# Wireframe
22

3-
![Wireframe](./wireframe.png)
4-
5-
Using the provided wireframe and resources, write a new webpage explaining:
6-
7-
1. What is the purpose of a README file?
8-
1. What is the purpose of a wireframe?
9-
1. What is a branch in Git?
10-
11-
There are some provided HTML and CSS files you can use to get started. You can use these files as a starting point or create your own files from scratch. You _must_ modify the HTML and CSS files to meet the acceptance criteria and you must check this criteria yourself before you submit your work.
12-
133
## Learning Objectives
144

155
<!--{{<objectives>}}>-->
@@ -19,20 +9,47 @@ There are some provided HTML and CSS files you can use to get started. You can u
199
- [ ] Check a webpage against a wireframe layout
2010
- [ ] Test web code using [Lighthouse](https://programming.codeyourfuture.io/guides/testing/lighthouse)
2111
- [ ] Use version control by committing often and pushing regularly to GitHub
12+
- [ ] Develop the habit of writing clean, well-structured, and error-free code
2213
<!--{{</objectives>}}>-->
2314

15+
## Task
16+
![Wireframe](./wireframe.png)
17+
18+
Using the provided wireframe and resources, write a new webpage explaining:
19+
20+
1. What is the purpose of a README file?
21+
1. What is the purpose of a wireframe?
22+
1. What is a branch in Git?
23+
24+
The page layout should closely match the wireframe. Exact replication is the goal, but small differences may be accepted.
25+
26+
There are some provided HTML and CSS files you can use to get started. You can use these files as a starting point or create your own files from scratch. You _must_ modify the HTML and CSS files to meet the acceptance criteria and you must check this criteria yourself before you submit your work.
27+
2428
## Acceptance Criteria
2529

2630
- [ ] Semantic HTML tags are used to structure the webpage.
2731
- [ ] The page scores 100 for Accessibility in the Lighthouse audit.
28-
- [ ] The page header includes a title and description.
29-
- [ ] The articles section has three unique articles, each including an image, title, summary, and a link.
30-
- [ ] The page footer is fixed to the bottom of the viewport.
3132
- [ ] The webpage is styled using a linked .css file.
3233
- [ ] The webpage is properly committed and pushed to a branch on GitHub.
34+
- [ ] The articles section contains three distinct articles, each with its own unique image, title, summary, and link.
35+
- [ ] The page footer is fixed to the bottom of the viewport.
36+
- [ ] The page layout closely match the wireframe.
37+
38+
### Developers must adhere to professional standards.
39+
40+
> Before you say you're done: Is your code readable? Does it run correctly? Does it look professional?
41+
42+
These practices reflect the level of quality expected in professional work.
43+
They ensure your code is reliable, maintainable, and presents a polished, credible experience to users.
44+
45+
- [ ] My HTML code has no errors or warnings when validated using https://validator.w3.org/
46+
- [ ] My code is consistently formatted
47+
- [ ] My page content is free of typos and grammatical mistakes
48+
- [ ] I commit often and push regularly to GitHub
3349

3450
## Resources
3551

3652
- [Wireframe](https://www.productplan.com/glossary/wireframe/)
3753
- [Semantic HTML](https://www.w3schools.com/html/html5_semantic_elements.asp)
3854
- [:first-child](https://developer.mozilla.org/en-US/docs/Web/CSS/:first-child)
55+
- [Format Code and Make Logical Commits in VS Code](../practical_guide.md)

practical_guide.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
## Clean Code and Smart Commits: A Practical Guide
2+
3+
### 1. Formatting code consistently
4+
5+
- In VS Code, right-click anywhere in the editor and choose "Format Document" from the context menu.
6+
7+
- You can also use the shortcut:
8+
- Windows/Linux: `Shift + Alt + F`
9+
- macOS: `Shift + Option + F`
10+
11+
- More details: https://code.visualstudio.com/docs/editing/codebasics#_formatting
12+
13+
---
14+
### 2. Enabling automatic formatting
15+
16+
- Open your VS Code settings (user or workspace settings).
17+
- Guide: https://code.visualstudio.com/docs/getstarted/settings#_creating-user-and-workspace-settings
18+
- Search for `editor format`
19+
- Set `editor.formatOnSave` and `editor.formatOnPaste` to true
20+
21+
This ensures your code stays clean without needing manual formatting each time.
22+
23+
---
24+
25+
### 3. Committing files often, in meaningful groups
26+
27+
Creating small, focused commits improves both your workflow and team collaboration.
28+
29+
Why this matters:
30+
- **Clarity**: Each commit tells a clear story (one feature, one fix, one change).
31+
- **Debugging**: Easy to find and undo the commit that caused a bug.
32+
- **Collaboration**: Teammates can review and understand changes faster.
33+
- **History**: Project log becomes a readable timeline, not a messy dump.
34+
- **Safety**: Progress is saved in safe, logical steps—less risk of losing work.
35+
36+
#### Appraoch 1: Using VS Code
37+
38+
- In the Source Control panel, stage individual files instead of all changes.
39+
- Commit only what is staged.
40+
- Watch this video (around 12:50): https://www.youtube.com/watch?v=z5jZ9lrSpqk&t=705
41+
42+
#### Approach 2: Using Git commands
43+
44+
1. Stage a changed file (`git add`)
45+
46+
e.g.: To stage a modified file named `index.html`
47+
```
48+
git add index.html
49+
```
50+
51+
2. Commit the staged changes: (`git commit`)
52+
53+
e.g.: To commit the staged changes with a short commit message
54+
```
55+
git commit -m "Fix syntax error"
56+
```
57+
58+
- Additional resource: [W3School Git Tutorial](https://www.w3schools.com/git/default.asp?remote=github)

0 commit comments

Comments
 (0)