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

finish task #5043

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

finish task #5043

wants to merge 2 commits into from

Conversation

Andrew1256
Copy link

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.


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:

  1. BEM Methodology: The HTML structure does not fully utilize the BEM naming conventions. For example, class names like product__card--image and product__content__mark--stars do not adhere to the BEM block__element--modifier pattern. It's important to follow these conventions for consistency and maintainability.

  2. 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.

  3. Missing Attributes: The data-qa attributes are missing in the HTML file. Specifically, data-qa="card" should be added to the card block and data-qa="hover" to the BUY link. These attributes are crucial for the task requirements.

  4. Stars Block Functionality: The stars.scss file should handle all stars--N modifiers to highlight the first N stars, not just stars--0. This functionality is essential for the task.

  5. 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.

Comment on lines +12 to +19
<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">

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.

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.

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.

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 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:

  1. 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.

  2. Dynamic Star Ratings: The current implementation for highlighting stars is hardcoded. Consider a more flexible approach to handle different star ratings dynamically.

  3. Redundant Class Definitions: Avoid redundancy by consolidating duplicate class definitions, such as .content__price.

  4. 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! ✨

Comment on lines 20 to 22
<link
rel="stylesheet"
href="./styles/index.scss"

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">

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">

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">

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">

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 {

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.

Comment on lines +70 to +79
.content__price {
display: flex;
justify-content: space-between;
padding-top: 24px;
}
.content__price {
color: $secondary-text-color;
font-size: 12px;
line-height: 18px;
}

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 {

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 {

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.

Comment on lines +14 to +16
.stars--N .stars__star:nth-child(-n+4) {
background-image: url("../images/star-active.svg");
}

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).

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