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 search-bar #4466

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

Conversation

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

You've put in some great effort here! 🌟 However, before we can move forward, we need to address a few key points to ensure your code is both functional and follows best practices. Please take a moment to correct the issues with the src attribute in input elements, and refine your class naming to accurately represent your content. Additionally, let's make sure the alt text for images is descriptive of their function. These changes will greatly enhance the accessibility and maintainability of your project. Keep up the good work, and with these tweaks, 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
class="search"
data-qa="big"
>
<button class="search--button">

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--button' seems to indicate a BEM modifier, but it is not clear what it is modifying.

src/index.html Outdated
Comment on lines 25 to 29
<img
class="search_img search--img--big"
src="/src/images/Search.svg"
alt="button"
/>

Choose a reason for hiding this comment

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

The alt attribute should describe the image content, not just 'button'. It should convey the function or purpose of the image, for example 'Search icon'.

src/index.html Outdated
>
<button class="search--button">
<img
class="search_img search--img--big"

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. Avoid using multiple modifiers in BEM and ensure that the class name is meaningful.

src/index.html Outdated
class="search"
data-qa="small"
>
<button class="search--button">

Choose a reason for hiding this comment

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

Ensure that class names represent the content meaningfully. The class 'search--button' does not clearly reflect its purpose or content.

src/index.html Outdated
Comment on lines 44 to 48
<img
class="search_img search--img--small"
src="/src/images/Search.svg"
alt="button"
/>

Choose a reason for hiding this comment

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

The alt attribute for the image should describe the content, such as 'Search icon', instead of just 'button'.

src/index.html Outdated
>
<button class="search--button">
<img
class="search_img search--img--small"

Choose a reason for hiding this comment

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

Class names should be meaningful and represent the content. The class 'search_img search--img--small' seems to mix BEM with other naming conventions, which can be confusing.

src/index.html Outdated
type="text"
data-qa="hover"
placeholder="Try “Los Angeles“"
src="/src/images/Search.svg"

Choose a reason for hiding this comment

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

The src attribute should not be used with input elements. If you meant to link an image for a background, consider using CSS instead.

src/style.css Outdated

.search:hover,
.search:focus-within {
box-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.

While using rgba for the box-shadow color is fine, it's a good practice to be consistent with color formats throughout your CSS. You've used hex color codes for borders and shadows elsewhere, so consider using the rgba equivalent of #3d4e611a for consistency.

src/style.css Outdated

.search--big::placeholder,
.search--small::placeholder {
font-family: Avenir, serif;

Choose a reason for hiding this comment

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

The font-family for placeholders should include a fallback font. In this case, you have specified 'serif' as a fallback for Avenir, but it would be more consistent with the body font stack to use 'Arial, Helvetica, sans-serif' as the fallback.

display: flex;
align-items: center;
justify-content: center;
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. It's recommended to add only top or bottom margins, but not both, to avoid potential margin collapse issues. In this case, you have only a top margin, which is fine, but ensure that the rest of your elements follow this practice as well.

Copy link

@anastasiiavorobiova anastasiiavorobiova left a comment

Choose a reason for hiding this comment

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

Great work! Make sure to push the file with a font
Screenshot 2024-09-11 at 17 37 45

@SerhiyPaziyc
Copy link
Author

Copy link

@VitaliyBondarenko1982 VitaliyBondarenko1982 left a comment

Choose a reason for hiding this comment

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

GJ!

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.

4 participants