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 task solution #4839

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

Conversation

YaroslavaSemyda
Copy link

  • DEMO LINK

  • TEST REPORT LINK

  • All components follow BEM and use SCSS

  • Repeated 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 ❗️

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 pull request! 😊 While your code meets most of the task requirements, there are a few critical issues that need to be addressed before we can approve it:

  1. SCSS Nesting Issue: The .card__title is incorrectly nested within its own :hover pseudo-class. This should be corrected by directly applying the color change within the :hover block without nesting.

  2. Duplicate CSS Properties: The border-radius property is defined twice for the .card class. Please remove the duplicate declaration to ensure consistency and avoid confusion.

  3. HTML Redundancy: The card elements are repeated multiple times with the same content. Consider using a templating engine or JavaScript to dynamically generate these cards. This will make your code more maintainable and reduce redundancy.

Please address these issues to enhance the functionality and maintainability of your code. Once these changes are made, we can proceed with the approval. Keep up the great 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 +159 to +401
class="card__image"
alt="Picture of iMac 27 inch Retina"
/>
<h3 class="card__title">
APPLE A1419 iMac 27" Retina
<br />
5K Monoblock (MNED2UA/A)
</h3>
<p class="card__product-code">Product code: 195434</p>
<div class="card__review">
<div class="card__stars stars stars--4">
<span class="stars__star"></span>
<span class="stars__star"></span>
<span class="stars__star"></span>
<span class="stars__star"></span>
<span class="stars__star"></span>
</div>
<p class="card__review-text">Reviews: 5</p>
</div>
<div class="card__price">
<p class="card__price-title">Price:</p>
<p class="card__price-numbers">$2,199</p>
</div>
<a
href="#"
class="card__link"
>
Buy
</a>
</div>

<!-- Card 7 -->
<div class="catalog__card card">
<img
src="./images/imac.jpeg"
class="card__image"
alt="Picture of iMac 27 inch Retina"
/>
<h3 class="card__title">
APPLE A1419 iMac 27" Retina
<br />
5K Monoblock (MNED2UA/A)
</h3>
<p class="card__product-code">Product code: 195434</p>
<div class="card__review">
<div class="card__stars stars stars--4">
<span class="stars__star"></span>
<span class="stars__star"></span>
<span class="stars__star"></span>
<span class="stars__star"></span>
<span class="stars__star"></span>
</div>
<p class="card__review-text">Reviews: 5</p>
</div>
<div class="card__price">
<p class="card__price-title">Price:</p>
<p class="card__price-numbers">$2,199</p>
</div>
<a
href="#"
class="card__link"
>
Buy
</a>
</div>

<!-- Card 8 -->
<div class="catalog__card card">
<img
src="./images/imac.jpeg"
class="card__image"
alt="Picture of iMac 27 inch Retina"
/>
<h3 class="card__title">
APPLE A1419 iMac 27" Retina
<br />
5K Monoblock (MNED2UA/A)
</h3>
<p class="card__product-code">Product code: 195434</p>
<div class="card__review">
<div class="card__stars stars stars--4">
<span class="stars__star"></span>
<span class="stars__star"></span>
<span class="stars__star"></span>
<span class="stars__star"></span>
<span class="stars__star"></span>
</div>
<p class="card__review-text">Reviews: 5</p>
</div>
<div class="card__price">
<p class="card__price-title">Price:</p>
<p class="card__price-numbers">$2,199</p>
</div>
<a
href="#"
class="card__link"
>
Buy
</a>
</div>

Choose a reason for hiding this comment

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

The card elements are repeated multiple times with the same content. Consider using a templating engine or JavaScript to dynamically generate these cards to avoid redundancy and make the code more maintainable.

Comment on lines 24 to 27
border-radius: $border-radius;
padding: 32px 16px 16px;
position: relative;
border-radius: 8px;

Choose a reason for hiding this comment

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

The 'border-radius' property is defined twice for the '.card' class. Consider removing the duplicate declaration to avoid confusion and ensure consistency.

Comment on lines 48 to 54
&:hover {
transform: scale(1.2);
z-index: 10;

.card__title {
color: #34568b;
}

Choose a reason for hiding this comment

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

The nesting of '.card__title' inside its own ':hover' pseudo-class is incorrect. The '.card__title' should not be nested within ':hover' as it is already being targeted. Consider removing the nested '.card__title' and directly applying the color change within the ':hover' block.

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.

Great job on addressing most of the previous issues! 🎉 Your SCSS files are well-structured and follow a clear BEM naming convention, which is excellent for maintainability and readability. However, there are a few points to consider for further improvement:

  1. HTML Redundancy: The HTML file still contains repeated card elements with identical content. To enhance maintainability, consider using a templating engine or JavaScript to dynamically generate these cards.

  2. SCSS Nesting Issue: Ensure that the .card__title hover effect is correctly applied without incorrect nesting. It should be directly applied within the :hover block.

  3. Duplicate CSS Properties: The border-radius property was previously duplicated in the .card class. Make sure to remove any duplicate declarations to maintain consistency.

These adjustments will help you improve your code quality and maintainability. Keep up the great work, and continue learning from these experiences! 🚀

✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨

Comment on lines +120 to +401
class="card__image"
alt="Picture of iMac 27 inch Retina"
/>
<h3 class="card__title">
APPLE A1419 iMac 27" Retina
<br />
5K Monoblock (MNED2UA/A)
</h3>
<p class="card__product-code">Product code: 195434</p>
<div class="card__review">
<div class="card__stars stars stars--4">
<span class="stars__star"></span>
<span class="stars__star"></span>
<span class="stars__star"></span>
<span class="stars__star"></span>
<span class="stars__star"></span>
</div>
<p class="card__review-text">Reviews: 5</p>
</div>
<div class="card__price">
<p class="card__price-title">Price:</p>
<p class="card__price-numbers">$2,199</p>
</div>
<a
href="#"
class="card__link"
>
Buy
</a>
</div>

<!-- Card 7 -->
<div class="catalog__card card">
<img
src="./images/imac.jpeg"
class="card__image"
alt="Picture of iMac 27 inch Retina"
/>
<h3 class="card__title">
APPLE A1419 iMac 27" Retina
<br />
5K Monoblock (MNED2UA/A)
</h3>
<p class="card__product-code">Product code: 195434</p>
<div class="card__review">
<div class="card__stars stars stars--4">
<span class="stars__star"></span>
<span class="stars__star"></span>
<span class="stars__star"></span>
<span class="stars__star"></span>
<span class="stars__star"></span>
</div>
<p class="card__review-text">Reviews: 5</p>
</div>
<div class="card__price">
<p class="card__price-title">Price:</p>
<p class="card__price-numbers">$2,199</p>
</div>
<a
href="#"
class="card__link"
>
Buy
</a>
</div>

<!-- Card 8 -->
<div class="catalog__card card">
<img
src="./images/imac.jpeg"
class="card__image"
alt="Picture of iMac 27 inch Retina"
/>
<h3 class="card__title">
APPLE A1419 iMac 27" Retina
<br />
5K Monoblock (MNED2UA/A)
</h3>
<p class="card__product-code">Product code: 195434</p>
<div class="card__review">
<div class="card__stars stars stars--4">
<span class="stars__star"></span>
<span class="stars__star"></span>
<span class="stars__star"></span>
<span class="stars__star"></span>
<span class="stars__star"></span>
</div>
<p class="card__review-text">Reviews: 5</p>
</div>
<div class="card__price">
<p class="card__price-title">Price:</p>
<p class="card__price-numbers">$2,199</p>
</div>
<a
href="#"
class="card__link"
>
Buy
</a>
</div>

Choose a reason for hiding this comment

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

The card elements are repeated multiple times with the same content. Consider using a templating engine or JavaScript to dynamically generate these cards. This will make your code more maintainable and reduce redundancy.

Comment on lines +53 to +55
&:hover .card__title {
color: #34568b;
}

Choose a reason for hiding this comment

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

The .card__title is incorrectly nested within its own :hover pseudo-class. This should be corrected by directly applying the color change within the :hover block without nesting.

background: $color-bg-white;
width: $card-width;
border: 1px solid #f3f3f3;
border-radius: $border-radius;

Choose a reason for hiding this comment

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

The border-radius property is defined twice for the .card class. Please remove the duplicate declaration to ensure consistency and avoid confusion.

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.

2 participants