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

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

add task solution #4479

wants to merge 2 commits into from

Conversation

izotovav
Copy link

@izotovav izotovav commented Sep 21, 2024

  • DEMO LINK
  • TEST REPORT LINK
  • Icon implemented using background-image CSS property
  • Inputs are written inside of 'form' tag with correctly passed attributes
  • All Typical Mistakes from BEM lesson theory are checked.
  • Code follows all the Code Style Rules ❗️

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.

While you're doing great, we need to address a few important issues before we can merge your Pull Request. There are concerns about fixed container sizes, which could lead to content overflow, the use of the universal selector '*', and potential margin collapse due to setting both top and bottom margins. Please take a moment to review and adjust these areas. Remember, your hard work is truly appreciated, and these changes will ensure your code is top-notch! Keep up the good work! 🌟

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

src/index.html Outdated
data-qa="keypress"
placeholder="Try “Los Angeles“"
/>
<div class="search-bar_container">

Choose a reason for hiding this comment

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

Consider using a semantic tag such as <header> or <section> for the search bar container instead of a non-semantic <div>, to improve the structure and SEO of your page.

src/index.html Outdated
data-qa="keypress"
placeholder="Try “Los Angeles“"
/>
<div class="search-bar_container">

Choose a reason for hiding this comment

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

The class name 'search-bar_container' should represent the meaning of the content, not the styles or tag names. A more semantic name like 'search-container' might be better.

class="search-bar top-search-bar"
data-qa="big"
>
<input

Choose a reason for hiding this comment

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

The alt attribute is missing on the input element. Although it's not required for input elements, if you had images, remember to provide meaningful alt text for images.

Comment on lines +12 to +17
* {
font-family: Avenir-Book, Arial, Helvetica, sans-serif;
font-weight: 300;
font-style: normal;
color: rgba(61, 78, 97, 1);
box-sizing: border-box;

Choose a reason for hiding this comment

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

The '' selector impacts performance and should not be used. It's better to set styles specifically for elements that require them. Also, avoid setting global font styles on the '' selector; use 'body' or specific classes instead.

}

body {
margin-top: 0;

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 by adding only top or bottom, but not both. It seems you have set the top margin here, ensure that you're not also setting the bottom margin elsewhere for the same element to avoid potential margin collapse.

}

.search-bar {
margin-top: 20px;

Choose a reason for hiding this comment

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

Following the same principle as the previous comment, ensure that you're not setting both top and bottom margins for elements to avoid potential margin collapse issues.

background-position: top 15px left 13px;
background-size: 11px 11px;
font-size: 14px;
}

Choose a reason for hiding this comment

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

It is recommended not to fix container sizes unless there's a specific requirement for it. Ensure that the fixed heights for the '.search-bar-input--top' and '.search-bar-input--bottom' are indeed necessary and that the content does not overflow or create an accidental scrollbar.

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! 🌟 All the feedback provided is about minor issues related to code style and best practices. None of them are critical enough to warrant a REQUEST_CHANGES decision. Keep up the good work, and consider these tips to enhance your code in the future! 👍

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

Comment on lines +20 to +31
<header class="search-container">
<form
class="search-bar top-search-bar"
data-qa="big"
>
<input
class="search-bar-input search-bar-input--top"
type="text"
data-qa="keypress"
placeholder="Try “Los Angeles“"
/>
</form>

Choose a reason for hiding this comment

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

Consider adding an empty line between the header tag and the form tag to add some 'air' and simplify reading, as they are sibling elements. However, do not add an empty line between the form and its child input as they are parent and child elements.

Comment on lines +21 to +29
<form
class="search-bar top-search-bar"
data-qa="big"
>
<input
class="search-bar-input search-bar-input--top"
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 attributes in the input tag 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 one. Please adjust the formatting of the input tag to match the guideline.

Comment on lines +33 to +42
<form
class="search-bar bottom-search-bar"
data-qa="small"
>
<input
class="search-bar-input search-bar-input--bottom"
type="text"
data-qa="hover"
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 attributes in the input tag 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 one. Please adjust the formatting of the input tag to match the guideline.

Comment on lines +12 to +17
* {
font-family: Avenir-Book, Arial, Helvetica, sans-serif;
font-weight: 300;
font-style: normal;
color: rgba(61, 78, 97, 1);
box-sizing: border-box;

Choose a reason for hiding this comment

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

Avoid using the * selector as it impacts performance. It's better to set styles only for elements that require them.

}

* {
font-family: Avenir-Book, 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. It's good you have Arial and Helvetica, but you should also include a generic family like 'sans-serif' at the end.

Comment on lines +20 to +22
body {
margin-top: 0;
}

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. Add only top or bottom margins, but not both, to avoid potential margin collapse issues.

Comment on lines +24 to +26
.search-bar {
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 a margin-top on the .search-bar class. If there are no specific requirements for the container size, consider letting the content size dictate the spacing instead of fixing it with margins.

Comment on lines +28 to +37
.search-bar-input {
width: 100%;
height: 100%;
background-image: url(images/Search.svg);
background-repeat: no-repeat;
border-radius: 4px;
border: 1px solid #e1e7ed;
box-shadow: 0 1px 8px 0 #3d4e611a;
box-sizing: border-box;
}

Choose a reason for hiding this comment

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

Avoid fixing container sizes like width and height unless required. Let the content size dictate the container size to avoid overflow or accidental scroll bars.

Copy link

@vadiimvooo vadiimvooo left a comment

Choose a reason for hiding this comment

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

Well done

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