-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Develop #4495
base: master
Are you sure you want to change the base?
Develop #4495
Conversation
Krrampuss
commented
Sep 27, 2024
- DEMO LINK
- TEST REPORT LINK
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey there! 👋 It looks like there are a few areas in your code that could be improved. Specifically, the naming of classes such as '.big' and '.small' should be more descriptive to reflect the content or purpose rather than the style. Also, be mindful of using tag names for styling and consider adding more descriptive fallback fonts. Don't worry about the text shadow and container size for now, but do keep an eye on consistency with margins and indentation. Keep up the good work, and with a bit of tweaking, your code will be even better! 😊👍
✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨
src/index.html
Outdated
<form | ||
data-qa="big" | ||
action="#" | ||
> | ||
<input | ||
class="big form" | ||
type="text" | ||
data-qa="keypress" | ||
placeholder="Try “Los Angeles“" | ||
/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Class names should represent the meaning of the content, not the styles or tag names. The class name 'big form' on line 25 is not descriptive of the content. Consider using a class name that describes the role or content of the form or input element.
src/index.html
Outdated
<form | ||
data-qa="small" | ||
action="#" | ||
> | ||
<input | ||
class="small form" | ||
type="text" | ||
placeholder="Try “Los Angeles“" | ||
/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar to the previous comment, 'small form' as class names on line 37 are not descriptive. Use class names that reflect the content or purpose of the element.
.form { | ||
font-family: Avenir, sans-serif; | ||
display: block; | ||
margin-top: 20px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Be consistent with your margins. You've added a top margin here, so ensure you're not adding bottom margins elsewhere to the same element to avoid potential margin collapse.
color: #3d4e61; | ||
border: 1px solid #e1e7ed; | ||
border-radius: 4px; | ||
box-shadow: 0 1px 8px 0 #3d4e611a; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't fix container size (if there is no such a requirement). Here you've set a width of 100%, which is fine for responsiveness, but ensure that the content can dictate the size and that there's no overflow or accidental scrollbar.
} | ||
|
||
.big { | ||
font-size: 16px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't use tag names for styling (except 'html' and 'body'). It's better to use classes to style elements to avoid conflicts and increase reusability. Although '.big' is a class, the name could be confused with a styling utility rather than a meaningful class name.
} | ||
|
||
.small { | ||
font-size: 14px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same comment as above for the '.small' class applies here. Consider using a more descriptive class name that represents the meaning of the content.
background-size: contain; | ||
text-shadow: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.25)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Be cautious with text shadows as they can sometimes make text less readable. Ensure that this effect is actually enhancing the user experience.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your work is coming along well! 🌟 However, there are a few areas that need attention before we can approve the Pull Request. Please consider the following:
- Ensure content dictates container size and avoid fixed heights to prevent overflow.
- Use consistent margins to avoid margin collapse.
- Include a fallback font-family for better cross-browser compatibility.
- Use hyphens or underscores in class names instead of spaces for better readability.
- Reflect the purpose of elements in class names rather than their style or HTML tags.
- Properly format and indent your HTML attributes for better code readability.
These changes will help maintain the functionality and improve the quality of your code. Keep up the good work, and once these adjustments are made, your Pull Request should be good to go! 👍
✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨
.form { | ||
font-family: Avenir, sans-serif; | ||
display: block; | ||
margin-top: 20px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's recommended to use margins consistently, either top or bottom, but not both, to avoid potential margin collapse issues.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job on the progress! 👍 Remember to avoid setting fixed sizes on containers unless required, maintain consistent margins, use fallback font families, and ensure proper attribute formatting. Your class naming should be meaningful, reflecting content rather than styles. Keep these points in mind for future work! Happy coding! 😊
✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨
data-qa="keypress" | ||
placeholder="Try “Los Angeles“" | ||
/> | ||
<body class="body"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The class name 'body' does not represent the meaning of the content. Class names should reflect the purpose or identity of the content, not the tag name or styles being applied. Consider using a more meaningful class name that describes the role or type of content within the element.
<form | ||
data-qa="big" | ||
action="#" | ||
> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keep attributes correctly formatted: Since there are more than two attributes, each one should start on a new line with 2-space indentation relative to the tag, and the closing bracket should be on the same level as the opening tag.
<input | ||
class="search_input_big | ||
form" | ||
type="text" | ||
data-qa="keypress" | ||
placeholder="Try “Los Angeles“" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The class attribute value is not properly closed with a quotation mark. This might cause unexpected behavior or errors in your HTML.
<form | ||
data-qa="small" | ||
action="#" | ||
> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keep attributes correctly formatted: Since there are more than two attributes, each one should start on a new line with 2-space indentation relative to the tag, and the closing bracket should be on the same level as the opening tag.
class="search_input_small | ||
form" | ||
type="text" | ||
placeholder="Try “Los Angeles“" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The class attribute value is not properly closed with a quotation mark, and there is an inconsistent indentation in the class attribute value. Ensure that the value is properly enclosed with quotation marks and follow the 2-space indentation rule.
} | ||
|
||
.body { | ||
font-family: Avenir, Arial, Helvetica, sans-serif; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remember to use fallback fonts - alternative font-family in case the main one doesn't work. While you have provided Arial and Helvetica as fallbacks, it's a good practice to always include a generic family name at the end, such as 'sans-serif'.
} | ||
|
||
.form { | ||
font-family: Avenir, Arial, Helvetica, sans-serif; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As mentioned before, consider adding a generic family name as the last fallback for the font-family property.
.form { | ||
font-family: Avenir, Arial, Helvetica, sans-serif; | ||
display: block; | ||
margin-top: 20px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Be consistent with your margins. You've added a margin-top here, but ensure that you're not using both margin-top and margin-bottom for other elements to avoid potential margin collapse.
.search_input_big{ | ||
font-size: 16px; | ||
background: url(images/Search.svg) no-repeat; | ||
background-size: 19px; | ||
box-sizing: border-box; | ||
background-position: 26px center; | ||
padding-left: 62px; | ||
height: 70px; | ||
background-color: #ffff; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't fix container size if there is no such requirement. Here you have set a fixed height for the search input. Make sure that the content can dictate the size to avoid overflow or accidental scroll bar. If the fixed height is not a specific requirement, consider using padding and line-height to control the size.
.search_input_small{ | ||
font-size: 14px; | ||
box-shadow: 0 1px 8px 0 #3d4e611a; | ||
background: url(images/Search.svg) no-repeat 13px center/11px 11px; | ||
height: 42px; | ||
padding-left: 33px; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar to the previous comment, avoid fixing the size of containers like input fields unless explicitly required.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good work 👍