-
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
finish task #5043
base: master
Are you sure you want to change the base?
finish task #5043
Conversation
Andrew1256
commented
Dec 5, 2024
- 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.
Hello! 😊 It looks like there are a few critical issues that need to be addressed before we can approve your Pull Request. Here’s a summary of the main points that need your attention:
-
BEM Methodology: The HTML structure does not fully utilize the BEM naming conventions. For example, class names like
product__card--image
andproduct__content__mark--stars
do not adhere to the BEM block__element--modifier pattern. It's important to follow these conventions for consistency and maintainability. -
SCSS Nesting and Variables: The SCSS files need proper nesting for elements and modifiers. Additionally, SCSS variables should be placed in a separate file as required by the task. This helps in maintaining a clean and organized codebase.
-
Missing Attributes: The
data-qa
attributes are missing in the HTML file. Specifically,data-qa="card"
should be added to the card block anddata-qa="hover"
to theBUY
link. These attributes are crucial for the task requirements. -
Stars Block Functionality: The
stars.scss
file should handle allstars--N
modifiers to highlight the firstN
stars, not juststars--0
. This functionality is essential for the task. -
Code Style and Structure: The code does not fully adhere to the specified code style rules, particularly in terms of BEM naming conventions and SCSS structure. Ensuring code style consistency is important for readability and future maintenance.
Please address these issues, and feel free to reach out if you need any help. Once these changes are made, your code will be in great shape! Keep up the good work, and I’m looking forward to seeing your improvements! 🚀
✨ 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 | ||
href="https://fonts.googleapis. | ||
com/css2?family=Poppins:ital,wght@0,100; | ||
0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900; | ||
1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800; | ||
1,900&family=Roboto:ital,wght@0,100;0,300;0,400; | ||
0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700; | ||
1,900&display=swap" rel="stylesheet"> |
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 typo in the URL for the Google Fonts stylesheet. The URL is split across multiple lines, which might cause issues. Ensure the URL is complete and correctly formatted on a single line to avoid loading errors.
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.
Sorry, the pull request review was unsuccessful for the following reasons:
Warning
No changes were made in the pull request since the last review. Please make sure that you have added files to the pull request and committed the changes.
[CODE: 7]
If the issue is within your control, please address it.
The next review attempt will automatically launch in 1 hour.
If you believe this is an error or need assistance, please contact the support team.
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 job on addressing many of the previous issues! 🎉 While there are still some areas that need improvement, such as fully adhering to BEM naming conventions and ensuring dynamic functionality for star ratings, your progress is commendable.
Here are the key points to focus on:
-
BEM Methodology: Ensure all class names follow the BEM block__element--modifier pattern for consistency and maintainability. For example, class names like
.content__mark__stars
should be updated to align with BEM conventions. -
Dynamic Star Ratings: The current implementation for highlighting stars is hardcoded. Consider a more flexible approach to handle different star ratings dynamically.
-
Redundant Class Definitions: Avoid redundancy by consolidating duplicate class definitions, such as
.content__price
. -
CSS Reference: Ensure the
href
attribute in your HTML points to a compiled CSS file, not an SCSS file.
Your efforts to improve the code structure and style are evident, and this approval is to encourage you to continue refining your skills. Please review the comments and address the critical issues to enhance the functionality and maintainability of your code. Keep up the good work and learn from these insights! 🚀
✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨
<link | ||
rel="stylesheet" | ||
href="./styles/index.scss" |
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 should point to a CSS file, not an SCSS file. Please ensure that the SCSS is compiled to CSS and update the reference accordingly.
<link | ||
rel="stylesheet" | ||
href="./styles/index.scss" | ||
/> | ||
</head> | ||
<body> | ||
<h1>Product cards</h1> | ||
<body class="card"> |
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 class
attribute here should follow the BEM naming convention. Consider using a more appropriate BEM block name.
<body class="card"> | ||
<main class="product-card" data-qa="card"> | ||
<div | ||
class="product-card__image"> |
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 class name product-card__image
should follow the BEM naming convention. Ensure that it is consistent with the block name used for the main card.
</div> | ||
|
||
<div class="product-card__content"> | ||
<div class="content__text"> |
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 class name content__text
does not follow the BEM naming convention. It should be prefixed with the block name, such as product-card__content__text
.
</div> | ||
|
||
<div class="content__mark"> | ||
<div class="content__mark__stars"> |
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 class name content__mark__stars
should follow the BEM naming convention. Consider using product-card__content__mark__stars
.
justify-content: space-between; | ||
} | ||
|
||
.mark__reviews { |
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 class name .mark__reviews
should follow the BEM naming convention. Consider using .product-card__content__mark__reviews
.
.content__price { | ||
display: flex; | ||
justify-content: space-between; | ||
padding-top: 24px; | ||
} | ||
.content__price { | ||
color: $secondary-text-color; | ||
font-size: 12px; | ||
line-height: 18px; | ||
} |
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 class .content__price
is defined twice. Ensure that the styles are consolidated into a single definition to avoid redundancy.
} | ||
|
||
|
||
.price__value { |
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 class name .price__value
should follow the BEM naming convention. Consider using .product-card__content__price__value
.
line-height: 18px; | ||
} | ||
|
||
.buy__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.
The class name .buy__button
should follow the BEM naming convention. Consider using .product-card__content__buy__button
.
.stars--N .stars__star:nth-child(-n+4) { | ||
background-image: url("../images/star-active.svg"); | ||
} |
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 selector .stars--N .stars__star:nth-child(-n+4)
is hardcoded to highlight the first 4 stars. To handle different star ratings dynamically, consider using a more flexible approach, such as dynamically setting the class based on the rating value (e.g., .stars--3
for a 3-star rating).