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 solution #3933

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

add solution #3933

wants to merge 7 commits into from

Conversation

rwlp
Copy link

@rwlp rwlp commented Jan 4, 2024

  • 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 from BEM 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.

@rwlp rwlp closed this Jan 29, 2024
@rwlp rwlp reopened this Jan 29, 2024
@rwlp rwlp closed this Jan 29, 2024
@rwlp rwlp reopened this Jan 29, 2024
@rwlp rwlp closed this Jan 29, 2024
@rwlp rwlp reopened this Jan 29, 2024
Copy link

@EdPirro EdPirro left a 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!

src/index.html Outdated Show resolved Hide resolved
src/index.html Outdated Show resolved Hide resolved
src/style.css Outdated Show resolved Hide resolved
@rwlp
Copy link
Author

rwlp commented Feb 22, 2024

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.

@rwlp rwlp requested a review from EdPirro February 24, 2024 14:36
@rwlp
Copy link
Author

rwlp commented Feb 24, 2024

Hi @EdPirro, if is possilbe return about the coments in styles.css ( lines 74 to 78) about rules in naming modifiers.
The convention(https://en.bem.info/methodology/naming-convention/#two-dashes-style) apparently accepts element/block--modifier-name--modifier-value(notice the double hyphens). You recomended another convention. Could you provide documentation you used?

src/index.html Outdated
<h1>Search bar airbnb</h1>

<body class="page__body">

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

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>

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 &quot;Los Angeles&quot;"
>

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 &quot;Los Angeles&quot;"
>
</input>

class="input-search input-search--size-small form__search-input-small"
type="text"
placeholder="Try &quot;Los Angeles&quot;"
>

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"

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

Copy link
Author

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"

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"

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"

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"

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.

@rwlp
Copy link
Author

rwlp commented Feb 27, 2024

Hi everyone, I made the changes again.

Notice that the task says: This search bar will be part of big project.
So the classes blocks button, inputs and form, can be used in other codes
The elements classes only handle external configurations like positions, margins, etc.

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.

@rwlp rwlp requested a review from pedro-ruas February 27, 2024 20:02
Copy link

@EdPirro EdPirro 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, @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!

Comment on lines +111 to +132
.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;
}
Copy link

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;
}

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