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

add task solution #4484

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

Conversation

miroshnykow
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 things to address in your code. The image paths should be consistent, and margins should be standardized to prevent layout issues. Also, don't forget to include a fallback font and to keep attributes formatted correctly. Lastly, the class names should be meaningful and the indentation consistent. Keep up the good work, and with these adjustments, 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 19 to 46
<body>
<input
type="text"
data-qa="keypress"
placeholder="Try “Los Angeles“"
/>
<form
action="#"
data-qa="big"
>
<label>
<input
class="search-bar search-bar__big"
type="text"
data-qa="keypress"
placeholder="Try “Los Angeles“"
/>
</label>
</form>

<input
type="text"
data-qa="hover"
placeholder="Try “Los Angeles“"
/>
<form
action="#"
data-qa="small"
>
<label>
<input
class="search-bar search-bar__small"
type="text"
data-qa="hover"
placeholder="Try “Los Angeles“"
/>
</label>
</form>

Choose a reason for hiding this comment

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

There should be empty lines between sibling form blocks to simplify reading and add some "air" to the code structure.

src/index.html Outdated
data-qa="big"
>
<label>
<input

Choose a reason for hiding this comment

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

Consider using a div or section element to wrap the input field inside the label for better semantics and style targeting.

src/index.html Outdated
<label>
<input
class="search-bar search-bar__big"
type="text"

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 'search-bar__big' suggests a BEM naming convention but is being used to indicate the size. Consider a more meaningful name that describes the purpose or context instead of the size.

src/index.html Outdated
>
<label>
<input
class="search-bar search-bar__small"

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, 'search-bar__small' should be replaced with a class name that reflects the function or context of the element rather than its size.

src/index.html Outdated
>
<label>
<input
class="search-bar search-bar__big"

Choose a reason for hiding this comment

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

The type attribute value 'text' should be on the same line as the class attribute, following the rule that if an element has more than two attributes, each one, including the first, should start on a new line with 2-space indentation.

src/index.html Outdated
data-qa="small"
>
<label>
<input

Choose a reason for hiding this comment

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

The type attribute value 'text' should be on the same line as the class attribute for consistency with the formatting rule for multiple attributes.

}

.search-bar {
font-family: Avenir, sans-serif;

Choose a reason for hiding this comment

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

Consider adding a fallback font family after 'Avenir'. If 'Avenir' fails to load for some reason, the browser will use the fallback font instead.

box-sizing: border-box;
width: 100%;

margin-top: 20px;

Choose a reason for hiding this comment

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

According to the checklist, be consistent with your margins. Choose either top or bottom margins for elements, but not both, to avoid potential margin collapse issues.

.search-bar__small:focus {
border: 1px solid #e1e7ed;
text-shadow: none;
background-image: url(/src/images/Search.svg),

Choose a reason for hiding this comment

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

Make sure the path to the image is consistent across the CSS file. Here, the path starts with '/src/images/Search.svg', while elsewhere it is 'images/Search.svg'. Use a consistent path to ensure the image loads correctly in all cases.

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 your Pull Request! There are a few minor suggestions like considering responsive design for margins, using fallback font-families, and improving class names for better clarity. Also, keep an eye on the formatting of your attributes and indentation for a cleaner code structure. These are not critical issues, so your PR is approved! Keep up the good work, and remember that these small improvements can make your code even better in the future! 😊👍

✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨

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

Choose a reason for hiding this comment

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

Keep your attributes correctly formatted. If the element has more than 2 attributes, start each one on a new line with a 2-space indentation related to the tag.

src/index.html Outdated
Comment on lines 28 to 32
<input
class="search-bar search-bar__big"
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 input element's attributes should be formatted according to the guidelines. Each attribute should start on a new line with a 2-space indentation.

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

Choose a reason for hiding this comment

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

Keep your attributes correctly formatted. If the element has more than 2 attributes, start each one on a new line with a 2-space indentation related to the tag.

src/index.html Outdated
Comment on lines 46 to 50
<input
class="search-bar search-bar__small"
type="text"
data-qa="hover"
placeholder="Los Angeles"

Choose a reason for hiding this comment

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

The input element's attributes should be formatted according to the guidelines. Each attribute should start on a new line with a 2-space indentation.

src/index.html Outdated
Comment on lines 28 to 32
<input
class="search-bar search-bar__big"
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 search-bar__big could be misinterpreted as a style rather than the meaning of the content.

src/index.html Outdated
Comment on lines 46 to 50
<input
class="search-bar search-bar__small"
type="text"
data-qa="hover"
placeholder="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 search-bar__small could be misinterpreted as a style rather than the meaning of the content.

}

.search-bar {
font-family: Avenir, sans-serif;

Choose a reason for hiding this comment

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

Consider adding a fallback font-family for Avenir in case it fails to load. For example, 'font-family: Avenir, Arial, sans-serif;'. This ensures text is still readable with a default font.

box-sizing: border-box;
width: 100%;

margin-top: 20px;

Choose a reason for hiding this comment

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

According to the checklist, be consistent with your margins. It's recommended to add margins only to the top or bottom of elements, not both, to avoid potential margin collapse.

box-sizing: border-box;
width: 100%;

margin-top: 20px;

Choose a reason for hiding this comment

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

The .search-bar class has a fixed margin-top, which might not be flexible for different contexts. Consider using a more responsive design approach unless a fixed size is a specific requirement.

Copy link

@volodymyr-soltys97 volodymyr-soltys97 left a comment

Choose a reason for hiding this comment

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

Hi, there is no styles on the demo link, you need to make a deploy again and check it after on the demo
image


<label>

<div>

Choose a reason for hiding this comment

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

Redundant

Suggested change
<div>


<label>

<div>

Choose a reason for hiding this comment

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

Suggested change
<div>

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