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

test solution #5040

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

Conversation

KrawczykDamiann
Copy link

@KrawczykDamiann KrawczykDamiann commented Dec 4, 2024

Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a 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.

Comment on lines +13 to +21
<link
rel="preconnect"
href="https://fonts.googleapis.com"
/>
<link
rel="preconnect"
href="https://fonts.gstatic.com"
crossorigin="use-credentials"
/>

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"

Choose a reason for hiding this comment

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

image

Suggested change
href="./styles/index.css"
href="./styles/index.scss"

src/index.html Outdated
Comment on lines 48 to 53
<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>

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)

Comment on lines 1 to 2
@use './variables' as *;
@use './mixins' as *;

Choose a reason for hiding this comment

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

Suggested change
@use './variables' as *;
@use './mixins' as *;

Comment on lines 1 to 3
@use './variables' as *;
@use './mixins' as *;
@use './stars' as *;

Choose a reason for hiding this comment

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

Suggested change
@use './variables' as *;
@use './mixins' as *;
@use './stars' as *;

Comment on lines 1 to 2
@use './variables' as *;
@use './mixins' as *;

Choose a reason for hiding this comment

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

Suggested change
@use './variables' as *;
@use './mixins' as *;

Comment on lines 33 to 35
width: 98px;
height: 14px;
top: 246px;

Choose a reason for hiding this comment

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

Suggested change
width: 98px;
height: 14px;
top: 246px;

Comment on lines 21 to 23
width: $primary-width;
height: 36px;
top: 206px;

Choose a reason for hiding this comment

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

Suggested change
width: $primary-width;
height: 36px;
top: 206px;


.title {
display: inline;
left: 16px;

Choose a reason for hiding this comment

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

Suggested change
left: 16px;

Comment on lines 8 to 9
top: 32px;
left: 20px;

Choose a reason for hiding this comment

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

Suggested change
top: 32px;
left: 20px;

src/index.html Outdated Show resolved Hide resolved
src/index.html Outdated
Comment on lines 53 to 61
</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>

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

Suggested change
</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
Comment on lines 63 to 66
<div class="card__price">
<div class="card__price-text">Price:</div>
<div class="card__price-sum">$2,199</div>
</div>

Choose a reason for hiding this comment

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

Suggested change
<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
Comment on lines 68 to 72
<a
class="card__button"
href="#"
data-qa="hover"
>

Choose a reason for hiding this comment

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

Suggested change
<a
class="card__button"
href="#"
data-qa="hover"
>
<a
class="card__button button"
href="#"
data-qa="hover"
>

@@ -0,0 +1,23 @@
.card__button {

Choose a reason for hiding this comment

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

Suggested change
.card__button {
.button {

Comment on lines 6 to 7
width: $primary-width;
margin-top: 15px;

Choose a reason for hiding this comment

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

Suggested change
width: $primary-width;
margin-top: 15px;
width: 100%;
margin-top: 16px;

src/styles/_stars.scss Outdated Show resolved Hide resolved
background-repeat: no-repeat;
}

&-star:nth-child(n + 5) {

Choose a reason for hiding this comment

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

Suggested change
&-star:nth-child(n + 5) {
&__star:nth-child(n + 5) {

src/styles/_stars.scss Outdated Show resolved Hide resolved
@@ -0,0 +1 @@
$primary-width: 166px;

Choose a reason for hiding this comment

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

create variables for colors

Suggested change
$primary-width: 166px;

body {
@include center;

Choose a reason for hiding this comment

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

Suggested change
@include center;

src/index.html Outdated
Comment on lines 55 to 64
<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>

Choose a reason for hiding this comment

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

Suggested change
<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>


line-height: 16px;
width: 100%;
margin-top: 17px;

Choose a reason for hiding this comment

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

Suggested change
margin-top: 17px;
margin-top: 16px;
display: flex;
justify-content: space-between;
align-items: flex-end;
&__list {
@include center;
}

Comment on lines +8 to +15
&__star {
width: 16px;
height: 16px;
margin-right: 4px;
justify-content: space-between;
background-image: url('../images/star-active.svg');
background-repeat: no-repeat;
}

Choose a reason for hiding this comment

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

add background-position: center;

Suggested change
&__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;
}

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.

4 participants