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

Develop #3887

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

Develop #3887

wants to merge 11 commits into from

Conversation

lLiashko
Copy link

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.

Good job.
Please check comments

src/index.html Outdated
<h1>Search bar airbnb</h1>
<body data-qa="hover">
<!--First bar-->
<div class="search-bar search-bar__big" data-qa="big">

Choose a reason for hiding this comment

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

Suggested change
<div class="search-bar search-bar__big" data-qa="big">
<form class="search-bar" data-qa="big">

use form tag instead div
search-bar__big element is redundant.
set all styles for search-bar and just change necessary for small form in search-bar__small element.
same for other elements

src/style.css Outdated
Comment on lines 21 to 22
padding: 0;
border: 0;

Choose a reason for hiding this comment

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

Suggested change
padding: 0;
border: 0;

redundant. body doesn't have default paddings or magins.

src/style.css Outdated
Comment on lines 26 to 28
input {
width: 100%;
}

Choose a reason for hiding this comment

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

style by class instead by tag

Suggested change
input {
width: 100%;
}

src/style.css Outdated
width: 100%;
}

input::placeholder {

Choose a reason for hiding this comment

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

Suggested change
input::placeholder {
.search-bar__text::placeholder {

src/style.css Outdated
color: #3d4e61;
font-family: Avenir, sans-serif;
font-weight: 400;
line-height: normal;

Choose a reason for hiding this comment

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

instead width 100% you can make this element block. it will allow to set height, and width will be 100% by default

Suggested change
line-height: normal;
line-height: normal;
display: block;
height: 100%;

Choose a reason for hiding this comment

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

Still not fixed

src/style.css Outdated
Comment on lines 103 to 108
.search-bar__text-big {
margin-left: 60px;
padding-right: 29px;
font-size: 16px;
width: 129px;
height: 22px;

Choose a reason for hiding this comment

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

Suggested change
.search-bar__text-big {
margin-left: 60px;
padding-right: 29px;
font-size: 16px;
width: 129px;
height: 22px;
.search-bar__text-big {
padding-left: 60px;
padding-right: 29px;
font-size: 16px;

src/style.css Outdated
Comment on lines 111 to 117
.search-bar__text-small {
justify-content: flex-end;
font-size: 14px;
width: 126.29px;
height: 20px;
padding-left: 33px;
}

Choose a reason for hiding this comment

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

Suggested change
.search-bar__text-small {
justify-content: flex-end;
font-size: 14px;
width: 126.29px;
height: 20px;
padding-left: 33px;
}
.search-bar__text-small {
justify-content: flex-end;
font-size: 14px;
height: 20px;
padding-left: 33px;
}

do not hardcode width. it will make visible placeholder and will be possible to write text on full input

Copy link
Author

Choose a reason for hiding this comment

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

Thank you for comments! I've changed my code

Copy link

@volodymyr-soltys97 volodymyr-soltys97 left a comment

Choose a reason for hiding this comment

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

Good job 👍
Let's improve your code
The search must span the entire width of the browser window
image

src/index.html Outdated
<body>
<h1>Search bar airbnb</h1>
<body data-qa="hover">
<!--First bar-->

Choose a reason for hiding this comment

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

Comment is redundant here

Suggested change
<!--First bar-->

Copy link
Author

Choose a reason for hiding this comment

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

They help me to find right bar quicker

src/index.html Outdated
Comment on lines 16 to 20
<input
class="search-bar__text"
type="text"
placeholder="Try &quot;Los Angeles&quot;"
data-qa="keypress">

Choose a reason for hiding this comment

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

Suggested change
<input
class="search-bar__text"
type="text"
placeholder="Try &quot;Los Angeles&quot;"
data-qa="keypress">
<input
class="search-bar__text"
type="text"
placeholder="Try &quot;Los Angeles&quot;"
data-qa="keypress"
>

Choose a reason for hiding this comment

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

That is correct formatting - it's better to stick to it

src/index.html Outdated
placeholder="Try &quot;Los Angeles&quot;"
data-qa="keypress">
</form>
<!--Second bar-->

Choose a reason for hiding this comment

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

Suggested change
<!--Second bar-->

src/index.html Outdated
data-qa="keypress">
</form>
<!--Second bar-->
<div class="search-bar search-bar__small" data-qa="small">

Choose a reason for hiding this comment

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

Use a semantic tag form here instead of div

src/style.css Outdated
font-family: Avenir;
src: url("./fonts/Avenir-Book.ttf") format("truetype");
font-weight: 300;
font-style: normal;

Choose a reason for hiding this comment

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

Default value, so you can just remove it everywhere

Suggested change
font-style: normal;

src/style.css Outdated
@@ -1 +1,107 @@
/* add styles here */
@font-face {
font-family: Avenir;
src: url("./fonts/Avenir-Book.ttf") format("truetype");

Choose a reason for hiding this comment

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

Suggested change
src: url("./fonts/Avenir-Book.ttf") format("truetype");
src: url("./fonts/Avenir-Book.ttf");

Copy link
Author

Choose a reason for hiding this comment

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

Another mentor in chat sent me this example, so I don't really understand which variant is right

Choose a reason for hiding this comment

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

you may google what does it mean

generally, it's needed to explicitly set the format of the font file:
https://css-tricks.com/snippets/css/using-font-face-in-css/

but it could work w/o it

so you may keep any variant

src/style.css Outdated
color: #3d4e61;
font-family: Avenir, sans-serif;
font-weight: 400;
line-height: normal;

Choose a reason for hiding this comment

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

Still not fixed

src/style.css Outdated
Comment on lines 74 to 76
/* #endregion */

/* #region text */

Choose a reason for hiding this comment

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

Remove comments everywhere

Suggested change
/* #endregion */
/* #region text */

Copy link
Author

Choose a reason for hiding this comment

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

Could you please explain why? In lecture videos they are used almost everywhere and it really helps

Choose a reason for hiding this comment

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

yes, it could be helpful during the development (when you write code), but it's not ok to push it (in case this code goes to production)
Generally, it's not critical here, but at least FYI - we don't want to push such code in production in real life

In the future you will divide a separate blocks in separate files anyway 🙂

Copy link
Author

Choose a reason for hiding this comment

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

thank you foR the explanation!

Copy link

@TarasHoliuk TarasHoliuk left a comment

Choose a reason for hiding this comment

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

GJ 👍
Some fixes are still needed to make it better)

src/index.html Outdated
Comment on lines 16 to 20
<input
class="search-bar__text"
type="text"
placeholder="Try &quot;Los Angeles&quot;"
data-qa="keypress">

Choose a reason for hiding this comment

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

That is correct formatting - it's better to stick to it

src/style.css Outdated
background: linear-gradient(180deg, #FFF 0%, #F6F6F7 100%);
}

.search-bar input[type="text"] {

Choose a reason for hiding this comment

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

do not use such selectors (combined)
you have 1 class for it

Suggested change
.search-bar input[type="text"] {
.search-bar-text {

src/style.css Outdated
color: #3d4e61;
font-family: Avenir, sans-serif;
font-weight: 400;
line-height: normal;

Choose a reason for hiding this comment

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

agree - no need to add default browser styles:
image

padding-right: 75%;
}

.search-bar__text:focus {

Choose a reason for hiding this comment

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

you should add a gradient to the input, and make it 100% width

also typed text should have a different font-weight - 800 (Avenir-Heavy)

src/style.css Outdated
justify-content: flex-end;
font-size: 14px;
padding-left: 33px;
padding-right: 75%;

Choose a reason for hiding this comment

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

why?

}

.search-bar:hover {
background: #FFF;

Choose a reason for hiding this comment

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

redundant
it might overwrite gradient when input is focused

@lLiashko lLiashko requested a review from TarasHoliuk December 17, 2023 11:55
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! Almost done

src/index.html Outdated
type="text"
placeholder="Try &quot;Los Angeles&quot;"
data-qa="keypress"
>

Choose a reason for hiding this comment

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

Suggested change
>
>

src/style.css Outdated
font-family: Avenir, sans-serif;
font-weight: 400;
padding-left: 62px;
padding-right: 68%;

Choose a reason for hiding this comment

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

Suggested change
padding-right: 68%;
padding-right: 62px;

border: none;
outline: none;
display: block;
height: 100%;

This comment was marked as resolved.

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!

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.

5 participants