-
Notifications
You must be signed in to change notification settings - Fork 4k
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 solution #3933
base: master
Are you sure you want to change the base?
add solution #3933
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Solid work @rwlp! And bonus points for the attention to details; your search bar looks identical to the Figma design 👏
I've noticed some minor improvements that I'll actually request you to go over for I believe fixing those issues will make this project simply perfect!
Hi EdPirro, I work in issues, but appear conflitcts that I can't edit some parts of index.htm file. Let me know if I need to make some actions or more adjustments in code. |
Hi @EdPirro, if is possilbe return about the coments in styles.css ( lines 74 to 78) about rules in naming modifiers. |
src/index.html
Outdated
<h1>Search bar airbnb</h1> | ||
|
||
<body class="page__body"> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No needed empty-line:
There's no need to add a line between a parent tag and it's first child, add empty lines between sibling elements
src/index.html
Outdated
action="post" | ||
class="form" | ||
data-qa="big" | ||
> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mismatching indentation:
When opening a tag, be sure to match both ends of the tag in the same alignment. The correct way would be:
<form
action="post"
class="form"
data-qa="big"
>
src/index.html
Outdated
class="icon-search icon-search--size-big form__search-button-big" | ||
type="submit" | ||
name="buttom search" | ||
></button> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mismatching indentation:
Same as above, closing tag should match opening tag:
<button
id="icon-search-big"
class="icon-search icon-search--size-big form__search-button-big"
type="submit"
name="buttom search"
>
</button>
data-qa="keypress" | ||
type="text" | ||
placeholder="Try "Los Angeles"" | ||
> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing closing tag:
I believe you forgot to add the closing tag to this input.
<input
id="input-search"
class="input-search input-search--size-big form__search-input-big"
data-qa="keypress"
type="text"
placeholder="Try "Los Angeles""
>
</input>
class="input-search input-search--size-small form__search-input-small" | ||
type="text" | ||
placeholder="Try "Los Angeles"" | ||
> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing closing tag:
Same error as above
src/index.html
Outdated
> | ||
<button | ||
id="icon-search-big" | ||
class="icon-search icon-search--size-big form__search-button-big" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrong BEM naming:
If the Block is "form" and the Element is "search-button", why is it also called "icon-search" ?
Correct naming would look like: "form__search-button search-button search-button--size-big".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll make the chagens, in fact I use the worong DOM element to represent the button in project. Thank you for adivice.
src/index.html
Outdated
|
||
<input | ||
id="input-search" | ||
class="input-search input-search--size-big form__search-input-big" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrong BEM naming:
Same issue as above.
|
||
<form | ||
action="post" | ||
class="form" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing Block parent:
Same naming as before, should contain parent block class here also: class="container__form form"
src/index.html
Outdated
> | ||
<button | ||
id="icon-search-small" | ||
class="icon-search icon-search--size-small form__search-button-small" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrong BEM naming:
Check the other comments, same issue happened before.
src/index.html
Outdated
|
||
<input | ||
id="small-search" | ||
class="input-search input-search--size-small form__search-input-small" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrong BEM naming:
Check the other comments, same issue happened before.
Hi everyone, I made the changes again. Notice that the task says: This search bar will be part of big project. I'm following the conventios thats rellies in oficial content on Mate Academy platform, please if have another conventions, I kindly ask you to send me documentation or content that guides the implementation of the aforementioned convention before carrying out the review. This helps me to be more agile in correcting tasks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job, @rwlp! Great attention to details and following the documentation, responding to a change request is not always about making changes in your code, sometimes simply explaining your thinking process is enough and you did that very well!
I added just a little suggestion for you to keep in mind for the next tasks, if you have any questions about it, please ask them in the qna chat!
.input-search--size--big::placeholder { | ||
font-weight: 300; | ||
color: #3D4E61; | ||
} | ||
|
||
.input-search--size--big:focus { | ||
color: #3D4E61; | ||
text-shadow: 0 4px 4px #00000040; | ||
} | ||
|
||
.input-search--size--small { | ||
height: 42px; | ||
padding-left: 33px; | ||
font-size: 14px; | ||
font-weight: 400; | ||
line-height: 19px; | ||
} | ||
|
||
.input-search--size--small::placeholder { | ||
font-weight: 300; | ||
color:#3D4E61; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The styles for input-search--size--big::placeholder
and input-search--size--small::placeholder
are the same, which means with either modifier the input-seach block will have the same style; since input-search is always used with one of these modifiers maybe you should consider not making this style belonging to the modifier but to the actual input-search; that is:
.input-search::placeholder {
font-weight: 300;
color: #3D4E61;
}
DEMO LINK
TEST REPORT LINK
[x ] Icon implemented using background-image CSS property
[ x] Inputs are written inside of 'form' tag with correctly passed attributes
[ x] All
Typical Mistakes
fromBEM
lesson theory are checked.[ x] Code follows all the Code Style Rules ❗️
PS.:
-The 'npm test' is simpler than figma. but I tried to implement it more faithfully to figma.
-The figma mock has a text shadow in the small default search bar, but the test refuses when implemented.