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 #4545

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

Conversation

veronikamaliar
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.

Great job so far! However, there are a few issues that need to be addressed, especially with regards to class naming and the use of semantic tags. Keep up the good work, and with a few tweaks, your code will be top-notch! 👍

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

src/index.html Outdated
@@ -11,22 +11,38 @@
content="ie=edge"
/>
<title>Document</title>

Choose a reason for hiding this comment

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

It is advisable to give your HTML document a more descriptive title, rather than the default 'Document'. This is important for SEO and for better understanding of the page content.

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.

It looks like you have two classes assigned to the same element. If 'search-bar' is a block, it should not be a child of itself ('search-bar__big'). Please consider revising your class naming to adhere to BEM methodology.

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.

Same issue here as in line 27. Please revise your class naming.

data-qa="keypress"
placeholder="Try “Los Angeles“"
/>
</label>

Choose a reason for hiding this comment

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

As per HTML Content checklist, it's recommended to use semantic tags where possible. In this case, 'label' tag is used without a 'for' attribute and without any text, which doesn't provide any semantic value. Consider removing the 'label' tag if it's not necessary, or provide a 'for' attribute linking to the 'id' of the input field.

data-qa="hover"
placeholder="Try “Los Angeles“"
/>
</label>

Choose a reason for hiding this comment

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

Same issue here as in line 32. Please revise your usage of 'label' tag.

src/style.css Outdated
}

body {
font-family: 'Avenir Book', sans-serif;

Choose a reason for hiding this comment

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

You have used a fallback font for the body tag, which is good practice. However, you should consider adding more fallback fonts. For instance, you can add 'Arial', 'Helvetica' as fallbacks. This will ensure that if 'Avenir Book' doesn't load, the browser will try to load 'Arial', then 'Helvetica', and finally 'sans-serif'.

}

.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.

You have defined the font-family for the class 'search-bar' as 'Avenir'. However, you have not defined a font-face for 'Avenir'. You should either define a font-face for 'Avenir' or use one of the fonts you have defined, like 'Avenir Book' or 'Avenir Heavy'.

font-family: Avenir, sans-serif;
width: 100%;
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.

You have added a top margin to the 'search-bar' class. This is not a good practice as per the checklist. Instead of adding margins to the top and bottom, it is recommended to add them to either the top or the bottom to avoid potential margin collapse.

}

.search-bar__big {
height: 70px;

Choose a reason for hiding this comment

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

You have fixed the height of the 'search-bar__big' class. Unless there is a requirement, it is recommended not to fix the container size. Let the content size dictate it to avoid overflow or accidental scroll bars.

}

.search-bar__small {
height: 42px;

Choose a reason for hiding this comment

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

Similar to the 'search-bar__big' class, you have also fixed the height of the 'search-bar__small' class. It is recommended not to fix the container size unless there is a requirement.

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.

You've done a really good job, but there are a few things you need to polish up. Don't forget to add fallback fonts in your CSS for better compatibility and make your 'title' tag more descriptive for SEO purposes. Also, please fix the 'for' attribute in the label element to match the 'id' of its associated input for accessibility. Keep it up, you're almost there! 😊

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

action="#"
data-qa="big"
>
<label for="search-input">

Choose a reason for hiding this comment

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

The 'for' attribute of the label element must be equal to the id of a non-hidden form control. Please add an 'id' attribute to the input and make sure it matches with 'for' attribute of the label. This is an accessibility issue.

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

Choose a reason for hiding this comment

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

The 'for' attribute of the label element must be equal to the id of a non-hidden form control. Please add an 'id' attribute to the input and make sure it matches with 'for' attribute of the label. This is an accessibility issue.

src/index.html Outdated
@@ -11,22 +11,38 @@
content="ie=edge"
/>
<title>Document</title>

Choose a reason for hiding this comment

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

The 'title' tag should be more descriptive about the content of the page. This is an SEO issue.

src/style.css Outdated
}

body {
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.

According to the checklist, remember to use fallback fonts - alternative font-family in case the main one doesn't work. You should provide a list of similar, fallback fonts that can be used if the user's computer doesn't have the first font specified. For example, you can modify this line to: font-family: Avenir, Arial, sans-serif;

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 work! There are just a few areas that could use some improvement. Remember to include a fallback font in your CSS file and avoid setting a fixed width to prevent overflow issues. Also, ensure your HTML attributes are correctly formatted and indented for better readability. Keep up the good work and continue learning! 😊👍

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

Comment on lines +21 to +34
<form
action="#"
data-qa="big"
>
<label for="search-input">
<input
id="search-input"
class="search-bar search-bar--big"
type="text"
data-qa="keypress"
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.

According to the checklist, you should add empty lines between multiline sibling blocks of HTML. This will improve readability.

Comment on lines +25 to +33
<label for="search-input">
<input
id="search-input"
class="search-bar search-bar--big"
type="text"
data-qa="keypress"
placeholder="Try “Los Angeles“"
/>
</label>

Choose a reason for hiding this comment

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

Remember about correct indentation between parent and child elements. Each level of nesting, including text, contained inside the element, requires 2-space offset. Also blank line shouldn't be between parent and child elements.

Comment on lines +26 to +32
<input
id="search-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.

Keep your attributes correctly formatted. If the HTML-element has long attribute values or number of attributes is more than 2 - start each one, including the first, on the new line with 2-space indentation related to tag. Tag’s closing bracket should be on the same level as opening one.

}

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. You can add 'Arial, Helvetica, sans-serif' as fallback fonts for 'Avenir'.

}

.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.

Remember to use fallback fonts - alternative font-family in case the main one doesn't work. You can add 'Arial, Helvetica, sans-serif' as fallback fonts for 'Avenir'.


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

Choose a reason for hiding this comment

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

Avoid fixing container size if there is no such requirement. Let the content size dictate it. To avoid overflow or accidental scroll bar.

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.

2 participants