-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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 #4797
base: master
Are you sure you want to change the base?
add task solution #4797
Conversation
yurzxw
commented
Oct 23, 2024
•
edited
Loading
edited
- DEMO LINK
- TEST REPORT LINK
- All component follow BEM and use SCSS
- repaeted sizes and special colors are put to variables
- Grid is used for the columns
- cards are shown in 1, 2, 3 or 4 columns based on screen resolution
- All changes on :hover are smooth
- Code follows all the Code Style Rules ❗️
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.
There are several critical issues that need to be addressed, including a syntax error in the grid layout, potential layout issues with scaling and padding, and an undefined mixin. Please resolve these to ensure the functionality and maintainability of the code. Keep up the good work! 😊
✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨
🔄 Fix the issues, commit the changes, and then re-request my review using the Re-request review
button in the Reviewers tab.
<a | ||
href="#" | ||
class="moyo" | ||
> | ||
<img | ||
src="./images/logo.png" | ||
alt="Moyo" | ||
/> | ||
</a> |
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 anchor tag has an href attribute set to '#', which might not be functional. Ensure that this is intentional or replace it with a valid URL if needed.
src/index.html
Outdated
<a | ||
href="#" | ||
class="nav_item__link is-active" | ||
> | ||
Apple | ||
</a> |
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 href attribute is set to '#', which might not be functional. Consider providing a valid URL or ensuring this is intentional for navigation purposes.
src/index.html
Outdated
<a | ||
href="#" | ||
class="nav_item__link" | ||
> | ||
Samsung | ||
</a> |
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 href attribute is set to '#', which might not be functional. Consider providing a valid URL or ensuring this is intentional for navigation purposes.
src/index.html
Outdated
<a | ||
href="#" | ||
class="nav_item__link" | ||
> | ||
Smartphones | ||
</a> |
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 href attribute is set to '#', which might not be functional. Consider providing a valid URL or ensuring this is intentional for navigation purposes.
src/index.html
Outdated
<a | ||
href="#" | ||
class="nav_item__link" | ||
data-qa="nav-hover" | ||
> | ||
Laptops & Computers | ||
</a> |
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 href attribute is set to '#', which might not be functional. Consider providing a valid URL or ensuring this is intentional for navigation purposes.
src/index.html
Outdated
<a | ||
href="#" | ||
class="buy" | ||
> | ||
buy | ||
</a> |
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 href attribute is set to '#', which might not be functional. Consider providing a valid URL or ensuring this is intentional for navigation purposes.
src/styles/button.scss
Outdated
width: 166px; | ||
height: 40px; | ||
background-color: #00acdc; | ||
color: #fff; | ||
text-decoration: none; | ||
border-radius: 5px; | ||
margin: 0 16px 16px; | ||
padding: 12px 70px; |
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 width is set to 166px and padding is set to 12px 70px. This could cause layout issues as the total width including padding exceeds the specified width, potentially causing overflow or unexpected layout behavior. Consider adjusting the width or padding to ensure consistency.
row-gap: 46px; | ||
padding: 50px 40px; | ||
|
||
@include on-all; |
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 '@include on-all;' directive is used here, but it's not clear if 'on-all' is defined elsewhere in your SCSS files. Ensure that 'on-all' is a valid mixin or remove this line if it's not needed.
src/styles/product_card.scss
Outdated
&:hover { | ||
transition: 0.3s; | ||
transform: scale(1.2); |
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 transform: scale(1.2) on hover might cause layout issues by affecting the surrounding elements. Consider using a different approach or ensuring that the surrounding layout can accommodate this scaling without causing overflow or layout shifts.
src/styles/utils/mixins.scss
Outdated
@@ -0,0 +1,21 @@ | |||
@mixin on-all { | |||
@media (min-width: 0) { | |||
grid-template-columns: 1, 1fr; |
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.
There is a syntax error in 'grid-template-columns: 1, 1fr;'. The correct syntax should be 'grid-template-columns: repeat(1, 1fr);' to ensure proper grid layout.
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.
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.
Good job 👍
Let's improve your code
src/index.html
Outdated
@@ -22,6 +22,404 @@ | |||
</head> | |||
|
|||
<body> | |||
<h1>Catalog</h1> | |||
<div class="moyo_catalog"></div> |
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.
Remove it
<div class="moyo_catalog"></div> |
src/index.html
Outdated
<ul class="nav_list"> | ||
<li class="nav_item"> | ||
<a | ||
href="#" | ||
class="nav_item__link is-active" |
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.
Fix classes everywhere
<ul class="nav_list"> | |
<li class="nav_item"> | |
<a | |
href="#" | |
class="nav_item__link is-active" | |
<ul class="nav__list"> | |
<li class="nav__item"> | |
<a | |
href="#" | |
class="nav__link is-active" |
src/index.html
Outdated
<div class="card_price"> | ||
<p class="card_text">Price:</p> | ||
<p class="card_dollars">$2,199</p> | ||
</div> |
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.
<div class="card_price"> | |
<p class="card_text">Price:</p> | |
<p class="card_dollars">$2,199</p> | |
</div> | |
<div class="card__price"> | |
<p class="card__price--label">Price:</p> | |
<p class="card__price--value">$2,199</p> | |
</div> |
src/index.html
Outdated
</div> | ||
<a | ||
href="#" | ||
class="buy" |
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.
class="buy" | |
class="card__button" |
</div> | ||
<div |
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.
Add the blank line between the cards
</div> | |
<div | |
</div> | |
<div |
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.
Still not fixed.
justify-content: space-between; | ||
} |
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.
justify-content: space-between; | |
} | |
justify-content: space-between; | |
padding: 0 50px; | |
} |
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.
Still not fixed
src/styles/moyo_header.scss
Outdated
.nav { | ||
padding-right: 50px; | ||
top: 0; | ||
bottom: 0; | ||
} |
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.
.nav { | |
padding-right: 50px; | |
top: 0; | |
bottom: 0; | |
} |
.moyo { | ||
display: flex; | ||
justify-content: center; | ||
margin-left: 50px; |
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.
margin-left: 50px; |
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.
Still not fixed
src/index.html
Outdated
<li class="nav_item"> | ||
<a | ||
href="#" | ||
class="nav_item__link z" |
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.
What is z
?
class="nav_item__link z" | |
class="nav__link" |
src/styles/moyo_header.scss
Outdated
.z { | ||
margin-right: 0; | ||
} |
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.
.z { | |
margin-right: 0; | |
} |
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 work! Consider fixing previous comments
font-size: 14px; | ||
font-weight: 700; | ||
text-align: center; | ||
width: 166px; |
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.
Not fixed
text-align: center; | ||
width: 166px; | ||
height: 40px; | ||
background-color: #00acdc; |
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.
Not fixed
src/styles/button.scss
Outdated
transition: $transition-time; | ||
|
||
&:hover { | ||
background-color: #fff; |
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.
Consider creating a variable for the repeating color
margin-right: 4px; | ||
} | ||
|
||
.stars--4 .stars__star:nth-child(-n + 4) { |
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.
Consider adding styles for other modifiers
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.
Still not fixed
src/styles/product_card.scss
Outdated
border-radius: 5px; | ||
box-sizing: border-box; | ||
width: 200px; | ||
height: 408px; |
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.
height: 408px; |
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.
Seems like there is no fixes from last comments. Please feel free to ask for help in fe_chat.
</div> | ||
<div |
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.
Still not fixed.
font-size: 14px; | ||
font-weight: 700; | ||
text-align: center; | ||
width: 166px; |
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.
Still not fixed
text-align: center; | ||
width: 166px; | ||
height: 40px; | ||
background-color: #00acdc; |
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.
Still not fixed
color: var(--hover-color); | ||
border: 1px solid var(--hover-color); |
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.
Still not fixed
} | ||
|
||
:root { | ||
--hover-color: #00acdc; |
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.
Still not fixed
justify-content: space-between; | ||
} |
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.
Still not fixed
.moyo { | ||
display: flex; | ||
justify-content: center; | ||
margin-left: 50px; |
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.
Still not fixed
margin-right: 4px; | ||
} | ||
|
||
.stars--4 .stars__star:nth-child(-n + 4) { |
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.
Still not fixed