Skip to content
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

LONDON | CHAITRA SHETTY | Module-User-Focused-Data | WEEK 2 #310

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Chaitra-Shetty
Copy link

@Chaitra-Shetty Chaitra-Shetty commented Nov 3, 2024

Learners, PR Template

Self checklist

  • I have committed my files one by one, on purpose, and for a reason
  • I have titled my PR with COHORT_NAME | FIRST_NAME LAST_NAME | REPO_NAME | WEEK
  • I have tested my changes
  • My changes follow the style guide
  • My changes meet the requirements of this task

Changelist

Briefly explain your PR.

This PR creates a valid HTML customer form with the following features:

  • Includes fields for name, email, date etc. fields
  • Applies CSS styling
  • Ensures form validation for required fields using HTML attributes

Questions

Ask any questions you have for your reviewer.

Copy link

netlify bot commented Nov 3, 2024

Deploy Preview for cyf-ufd ready!

Name Link
🔨 Latest commit 5a28920
🔍 Latest deploy log https://app.netlify.com/sites/cyf-ufd/deploys/672cb27a4ff07b000811915f
😎 Deploy Preview https://deploy-preview-310--cyf-ufd.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

@Chaitra-Shetty Chaitra-Shetty added the Needs Review Participant to add when requesting review label Nov 3, 2024
@Chaitra-Shetty Chaitra-Shetty requested a review from cjyuan November 3, 2024 09:39
Copy link

@cjyuan cjyuan left a comment

Choose a reason for hiding this comment

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

  • May I suggest using a HTML validator (https://validator.w3.org/) to check for potential errors in your HTML code?
  • What is the Lighthouse accessibility score you got from your Chrome browser? Mine indicates there is still room for improvement.
  • Not all input elements meet this acceptance criteria: " I show which element is focused."

required
minlength="3"
maxlength="40"
Copy link

Choose a reason for hiding this comment

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

This is not required, but if you were also told, a name must contain at least two non-space characters. how would you enforce that?

Copy link
Author

@Chaitra-Shetty Chaitra-Shetty Nov 7, 2024

Choose a reason for hiding this comment

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

@cjyuan okay, thanks. If the name must contain at least 2 characters then I would add attribute minlength= "2"

<div class="input">
<label for="XS">XS</label>
<input type="radio" name="tshirtSize" id="XS" value="XS" required />
Copy link

Choose a reason for hiding this comment

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

Any reason you chose to use radio buttons for size and drop-down list for colors? They both allow a user to select one item, but when should one use radio buttons and when should one use drop-down list?

Copy link
Author

Choose a reason for hiding this comment

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

@cjyuan I chose radio buttons for size and a dropdown for colors primarily for visual impact. Using a dropdown allows the color values to be displayed clearly, making it easy for the user to select. Additionally, radio buttons work well for sizes since they restrict selection to a single option

<label for="tshirtColor">T-shirt Color</label>
<select name="tshirtColor" id="tshirtColor" required>
<option value="Black">Black</option>
Copy link

Choose a reason for hiding this comment

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

There is an approach to not select a default value from the list so that the user is always required to explicitly select an item from the list. This way, we can ensure the user is aware of the choices.

Copy link
Author

Choose a reason for hiding this comment

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

@cjyuan yes, we can achieve it by using a placeholder option like' select a color' so that the user can explicitly select the color.

@cjyuan cjyuan added Reviewed Volunteer to add when completing a review and removed Needs Review Participant to add when requesting review labels Nov 4, 2024
@Chaitra-Shetty
Copy link
Author

I have made the necessary changes, Could you please review it? Thanks for your time

@Chaitra-Shetty Chaitra-Shetty requested a review from cjyuan November 7, 2024 12:30
@Chaitra-Shetty Chaitra-Shetty added Needs Review Participant to add when requesting review Complete Participant to add when work is complete and review comments have been addressed labels Nov 7, 2024
@OracPrime OracPrime removed the Needs Review Participant to add when requesting review label Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Complete Participant to add when work is complete and review comments have been addressed Reviewed Volunteer to add when completing a review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants