-
Notifications
You must be signed in to change notification settings - Fork 4.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
test solution #5040
base: master
Are you sure you want to change the base?
test solution #5040
Conversation
KrawczykDamiann
commented
Dec 4, 2024
•
edited
Loading
edited
- DEMO LINK
- TEST REPORT LINK
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.
Thank you for your hard work on this project! 😊 While your code is mostly on the right track, there are a few critical issues that need to be addressed to fully meet the task requirements. Specifically, the BEM blocks need proper definition, and the SCSS nesting and variable usage should be improved for consistency and maintainability. Additionally, the stars--N
modifiers need to be implemented correctly, and the unnecessary index.css
file should be removed. Please make these changes, and your solution will be in great shape! 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.
<link | ||
rel="preconnect" | ||
href="https://fonts.googleapis.com" | ||
/> | ||
<link | ||
rel="preconnect" | ||
href="https://fonts.gstatic.com" | ||
crossorigin="use-credentials" | ||
/> |
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 duplicate preconnect links for 'https://fonts.googleapis.com' and 'https://fonts.gstatic.com'. It's redundant to have multiple preconnect links for the same URL, as it can lead to unnecessary network requests. Consider removing the duplicates to optimize performance.
src/index.html
Outdated
@@ -9,10 +31,47 @@ | |||
<title>Product cards</title> | |||
<link | |||
rel="stylesheet" | |||
href="./styles/index.scss" | |||
href="./styles/index.css" |
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.
src/index.html
Outdated
<div class="title"> | ||
<div class="title__text"> | ||
APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A) | ||
</div> | ||
<div class="title__product-code">Product code:195434</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.
title can be element of card block or create separate file for title styles (because you should have separate file for each block)
src/styles/_button.scss
Outdated
@use './variables' as *; | ||
@use './mixins' as *; |
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.
@use './variables' as *; | |
@use './mixins' as *; |
src/styles/_card.scss
Outdated
@use './variables' as *; | ||
@use './mixins' as *; | ||
@use './stars' as *; |
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.
@use './variables' as *; | |
@use './mixins' as *; | |
@use './stars' as *; |
src/styles/_price.scss
Outdated
@use './variables' as *; | ||
@use './mixins' as *; |
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.
@use './variables' as *; | |
@use './mixins' as *; |
src/styles/_card.scss
Outdated
width: 98px; | ||
height: 14px; | ||
top: 246px; |
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.
width: 98px; | |
height: 14px; | |
top: 246px; |
src/styles/_card.scss
Outdated
width: $primary-width; | ||
height: 36px; | ||
top: 206px; |
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.
width: $primary-width; | |
height: 36px; | |
top: 206px; |
src/styles/_card.scss
Outdated
|
||
.title { | ||
display: inline; | ||
left: 16px; |
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.
left: 16px; |
src/styles/_card.scss
Outdated
top: 32px; | ||
left: 20px; |
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.
top: 32px; | |
left: 20px; |
src/index.html
Outdated
</div> | ||
<div class="card__stars"> | ||
<div class="card__stars-star"></div> | ||
<div class="card__stars-star"></div> | ||
<div class="card__stars-star"></div> | ||
<div class="card__stars-star"></div> | ||
<div class="card__stars-star"></div> | ||
<div class="card__stars-reviews">Reviews: 5</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.
if you have separate file stars then you should have stars block and you need container for star elements so you could use space-between
</div> | |
<div class="card__stars"> | |
<div class="card__stars-star"></div> | |
<div class="card__stars-star"></div> | |
<div class="card__stars-star"></div> | |
<div class="card__stars-star"></div> | |
<div class="card__stars-star"></div> | |
<div class="card__stars-reviews">Reviews: 5</div> | |
</div> | |
</div> | |
<div class="card__stars stars"> | |
<div class="stars__list"> | |
<div class="stars__star"></div> | |
<div class="stars__star"></div> | |
<div class="stars__star"></div> | |
<div class="stars__star"></div> | |
<div class="stars__star"></div> | |
</div> | |
<div class="stars__reviews">Reviews: 5</div> | |
</div> |
src/index.html
Outdated
<div class="card__price"> | ||
<div class="card__price-text">Price:</div> | ||
<div class="card__price-sum">$2,199</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.
<div class="card__price"> | |
<div class="card__price-text">Price:</div> | |
<div class="card__price-sum">$2,199</div> | |
</div> | |
<div class="card__price price"> | |
<div class="price__text">Price:</div> | |
<div class="price__sum">$2,199</div> | |
</div> |
src/index.html
Outdated
<a | ||
class="card__button" | ||
href="#" | ||
data-qa="hover" | ||
> |
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.
<a | |
class="card__button" | |
href="#" | |
data-qa="hover" | |
> | |
<a | |
class="card__button button" | |
href="#" | |
data-qa="hover" | |
> |
src/styles/_button.scss
Outdated
@@ -0,0 +1,23 @@ | |||
.card__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.
.card__button { | |
.button { |
src/styles/_button.scss
Outdated
width: $primary-width; | ||
margin-top: 15px; |
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.
width: $primary-width; | |
margin-top: 15px; | |
width: 100%; | |
margin-top: 16px; |
src/styles/_stars.scss
Outdated
background-repeat: no-repeat; | ||
} | ||
|
||
&-star:nth-child(n + 5) { |
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.
&-star:nth-child(n + 5) { | |
&__star:nth-child(n + 5) { |
src/styles/_variables.scss
Outdated
@@ -0,0 +1 @@ | |||
$primary-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.
create variables for colors
$primary-width: 166px; |
src/styles/index.scss
Outdated
body { | ||
@include center; |
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.
@include center; |
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.
resolve all comments
index.html:
https://github.com/mate-academy/layout_product-cards/pull/5040/files#r1882190599
https://github.com/mate-academy/layout_product-cards/pull/5040/files#r1882191391
https://github.com/mate-academy/layout_product-cards/pull/5040/files#r1882194957
button.scss:
https://github.com/mate-academy/layout_product-cards/pull/5040/files#r1882201056
price.scss:
https://github.com/mate-academy/layout_product-cards/pull/5040/files#r1882214053
variables.scss:
https://github.com/mate-academy/layout_product-cards/pull/5040/files#r1882234428
index.scss:
https://github.com/mate-academy/layout_product-cards/pull/5040/files#r1882235682
src/index.html
Outdated
<div class="card__stars stars"> | ||
<div class="stars__list"> | ||
<div class="stars__star"></div> | ||
<div class="stars__star"></div> | ||
<div class="stars__star"></div> | ||
<div class="stars__star"></div> | ||
<div class="stars__star"></div> | ||
<div class="stars__reviews">Reviews: 5</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.
<div class="card__stars stars"> | |
<div class="stars__list"> | |
<div class="stars__star"></div> | |
<div class="stars__star"></div> | |
<div class="stars__star"></div> | |
<div class="stars__star"></div> | |
<div class="stars__star"></div> | |
<div class="stars__reviews">Reviews: 5</div> | |
</div> | |
</div> | |
<div class="card__stars stars"> | |
<div class="stars__list"> | |
<div class="stars__star"></div> | |
<div class="stars__star"></div> | |
<div class="stars__star"></div> | |
<div class="stars__star"></div> | |
<div class="stars__star"></div> | |
</div> | |
<div class="stars__reviews">Reviews: 5</div> | |
</div> |
src/styles/_stars.scss
Outdated
|
||
line-height: 16px; | ||
width: 100%; | ||
margin-top: 17px; |
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-top: 17px; | |
margin-top: 16px; | |
display: flex; | |
justify-content: space-between; | |
align-items: flex-end; | |
&__list { | |
@include center; | |
} |
&__star { | ||
width: 16px; | ||
height: 16px; | ||
margin-right: 4px; | ||
justify-content: space-between; | ||
background-image: url('../images/star-active.svg'); | ||
background-repeat: no-repeat; | ||
} |
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 background-position: center;
&__star { | |
width: 16px; | |
height: 16px; | |
margin-right: 4px; | |
justify-content: space-between; | |
background-image: url('../images/star-active.svg'); | |
background-repeat: no-repeat; | |
} | |
&__star { | |
width: 16px; | |
height: 16px; | |
margin-right: 4px; | |
justify-content: space-between; | |
background-image: url('../images/star-active.svg'); | |
background-repeat: no-repeat; | |
background-position: center; | |
} |