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

Develop #4495

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Develop #4495

wants to merge 6 commits into from

Conversation

Krrampuss
Copy link

Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a 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
Comment on lines 20 to 29
<form
data-qa="big"
action="#"
>
<input
class="big form"
type="text"
data-qa="keypress"
placeholder="Try “Los Angeles“"
/>

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
Comment on lines 32 to 40
<form
data-qa="small"
action="#"
>
<input
class="small form"
type="text"
placeholder="Try “Los Angeles“"
/>

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.

src/style.css Outdated Show resolved Hide resolved
.form {
font-family: Avenir, sans-serif;
display: block;
margin-top: 20px;

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;

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;

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;

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.

Comment on lines +66 to +67
background-size: contain;
text-shadow: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.25));

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.

Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a 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! ✨

src/index.html Outdated Show resolved Hide resolved
src/index.html Outdated Show resolved Hide resolved
src/style.css Outdated Show resolved Hide resolved
src/style.css Outdated Show resolved Hide resolved
.form {
font-family: Avenir, sans-serif;
display: block;
margin-top: 20px;

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.

src/style.css Outdated Show resolved Hide resolved
src/style.css Show resolved Hide resolved
Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a 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">

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.

Comment on lines +20 to +23
<form
data-qa="big"
action="#"
>

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.

Comment on lines +24 to +29
<input
class="search_input_big
form"
type="text"
data-qa="keypress"
placeholder="Try “Los Angeles“"

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.

Comment on lines +33 to +36
<form
data-qa="small"
action="#"
>

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.

Comment on lines +38 to +41
class="search_input_small
form"
type="text"
placeholder="Try “Los Angeles“"

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;

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;

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;

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.

Comment on lines +39 to +47
.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;

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.

Comment on lines +50 to +56
.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;
}

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.

Copy link

@BudnikOleksii BudnikOleksii left a comment

Choose a reason for hiding this comment

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

Good work 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants