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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Add search-bar #4505

wants to merge 1 commit into from

Conversation

staner1
Copy link

@staner1 staner1 commented Oct 2, 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.

Great job on ordering the CSS imports correctly and ensuring no issues were found! Your attention to detail is commendable. Keep up the good work, and always strive to maintain this level of code quality. 👍💼 Remember to keep an eye on the little details mentioned in the feedback for future improvements!

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

Comment on lines +25 to +30
<input
type="text"
data-qa="keypress"
placeholder="Try “Los Angeles“"
class="search-bar__input"
/>

Choose a reason for hiding this comment

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

The attributes of the input element should each start on a new line with 2-space indentation relative to the tag, as there are more than two attributes. The tag’s closing bracket should be on the same level as the opening one. This will improve readability as per the checklist guidelines.

Comment on lines +37 to +41
<input
type="text"
placeholder="Try “Los Angeles“"
class="search-bar__input"
/>

Choose a reason for hiding this comment

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

Same as the previous comment, the attributes of this input element should be formatted correctly, with each attribute starting on a new line and proper indentation.

Comment on lines +2 to +4
font-family: Avenir;
src: url(../../fonts/Avenir.ttc);
font-weight: 400;

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 specify a list of comma-separated fonts to be used, ending with a generic font family, in case none of the specified fonts are available. For example: font-family: Avenir, Arial, sans-serif;.

@@ -0,0 +1,15 @@
.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.

Avoid fixing the height of elements if there is no specific requirement for it. This can lead to content overflow or unexpected layout issues when the content changes or scales. Let the content dictate the size of its container.

@@ -0,0 +1,14 @@
.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.

Avoid fixing the height of elements if there is no specific requirement for it. Let the content size dictate the container's size to prevent overflow or accidental scrollbars.


.search-bar--small .search-bar__input {
height: 20px;
margin-left: 33px;

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 to avoid potential margin collapse. Prefer to add margin on one side (either top or bottom) rather than on both sides.

border: 1px solid rgb(225, 231, 237);
border-radius: 4px;
box-shadow: 0 1px 8px 0 rgba(61, 78, 97, 0.1);
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 better to add only top or bottom margins to avoid potential margin collapse issues. If the design allows it, consider using only margin-bottom or only margin-top for spacing between elements.

padding: 0;
border: 0;

font-family: Avenir, Arial, 'Helvetica Neue', 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. This ensures that if the primary font fails to load for some reason, the browser has alternative fonts to fall back on. For example, you could specify a generic font family as a fallback: font-family: Avenir, Helvetica, Arial, sans-serif;

Copy link

@etojeDenys etojeDenys left a comment

Choose a reason for hiding this comment

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

lgtm

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