Skip to content

add task solution#6589

Open
whomngmnt wants to merge 3 commits intomate-academy:masterfrom
whomngmnt:develop
Open

add task solution#6589
whomngmnt wants to merge 3 commits intomate-academy:masterfrom
whomngmnt:develop

Conversation

@whomngmnt
Copy link

  • Yellow stars are added with container modifier + pseudo-selector (NO extra classes)
  • Each BEM block has its own separate file
  • All Typical Mistakes from BEM lesson theory are checked.
  • 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.

Review Summary

Great job on the visual implementation of the star rating component! The HTML is well-structured, and your CSS correctly styles the active and inactive stars using BEM modifiers.

However, this solution requires a change to meet all project requirements. The current file structure violates a key BEM principle mentioned in the checklist: 'Each BEM block has its own separate file' [CHECKLIST ITEM #2]. All styles are currently in src/style.css, but the styles for the stars block should be in their own dedicated file.

Please move the styles related to the .stars block into a separate CSS file to align with the required BEM methodology for project structure.


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

Important

Fix the issues, commit the changes, and then re-request my review using the Re-request review button2 in the Reviewers tab.

Tip

If you have any comments about this review, please leave a message in the Add a comment section below and mention me with the @mateacademy-ai-mentor tag3.
I will read your message during my next review of your pull request. Please do not reply directly to my comments, as that feature is not supported yet.

Caution

Do not close the pull request until the review is complete. Closing it early can lead to unexpected behavior and disrupt the review process.

Footnotes

  1. Rate AI review example

  2. Re-request AI review example

  3. Add AI review comments example

src/style.css Outdated
Comment on lines +6 to +10
.stars {
display: flex;
line-height: 0;
font-size: 0;
}

Choose a reason for hiding this comment

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

This violates the checklist item: 'Each BEM block has its own separate file'. To follow BEM principles, styles for the stars block should be in their own file (e.g., stars.css), separate from global styles like body.

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

If the issue is within your control, please address it.
The next review attempt will automatically launch in about 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.

Review Summary

Great work on the visual implementation and the HTML structure! You've correctly used BEM modifiers and pseudo-selectors to style the stars.

This submission requires changes because the core architectural requirement from the previous review has not yet been met. All styles for the .stars block must be moved out of src/style.css and into their own separate file. This is a critical project rule, as noted in the checklist [CHECKLIST ITEM #2].

Please create a new CSS file for the stars block and move all its related styles there. After that small change, your work will be ready to go!


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

Important

Fix the issues, commit the changes, and then re-request my review using the Re-request review button2 in the Reviewers tab.

Tip

If you have any comments about this review, please leave a message in the Add a comment section below and mention me with the @mateacademy-ai-mentor tag3.
I will read your message during my next review of your pull request. Please do not reply directly to my comments, as that feature is not supported yet.

Caution

Do not close the pull request until the review is complete. Closing it early can lead to unexpected behavior and disrupt the review process.

Footnotes

  1. Rate AI review example

  2. Re-request AI review example

  3. Add AI review comments example

src/style.css Outdated
Comment on lines +6 to +42
.stars {
display: flex;
}

.stars__star {
width: 16px;
height: 16px;
background-image: url(./images/star.svg);
background-size: 13px 12px;
background-repeat: no-repeat;
background-position: center;
margin-right: 4px;
}

.stars__star:last-child {
margin-right: 0;
}

.stars--1 .stars__star:nth-child(-n + 1) {
background-image: url(./images/star-active.svg);
}

.stars--2 .stars__star:nth-child(-n + 2) {
background-image: url(./images/star-active.svg);
}

.stars--3 .stars__star:nth-child(-n + 3) {
background-image: url(./images/star-active.svg);
}

.stars--4 .stars__star:nth-child(-n + 4) {
background-image: url(./images/star-active.svg);
}

.stars--5 .stars__star:nth-child(-n + 5) {
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.

This violates checklist item #2: 'Each BEM block has its own separate file'. The styles for the stars block (from .stars down to the last modifier) should be in their own dedicated CSS file, separate from global styles like body. This was the main point of the previous review and still needs to be addressed.

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.

Review Summary

Excellent work addressing the previous feedback by moving the stars block styles into its own file! Your BEM structure and use of pseudo-selectors are implemented perfectly.

I am approving this solution as an educational override to help you progress, but please note there is one small but critical fix needed. The automated checks are failing because the relative paths to the background images in src/styles/stars.css are incorrect. Since stars.css is inside the styles folder, you need to go up one directory (..) to access the images folder.

To fix this, simply change all instances of url(./images/...) to url(../images/...). After that small correction, your project will be perfect. Keep up the great work!


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

Footnotes

  1. Rate AI review example

Comment on lines +8 to +36
background-image: url(./images/star.svg);
background-size: 13px 12px;
background-repeat: no-repeat;
background-position: center;
margin-right: 4px;
}

.stars__star:last-child {
margin-right: 0;
}

.stars--1 .stars__star:nth-child(-n + 1) {
background-image: url(./images/star-active.svg);
}

.stars--2 .stars__star:nth-child(-n + 2) {
background-image: url(./images/star-active.svg);
}

.stars--3 .stars__star:nth-child(-n + 3) {
background-image: url(./images/star-active.svg);
}

.stars--4 .stars__star:nth-child(-n + 4) {
background-image: url(./images/star-active.svg);
}

.stars--5 .stars__star:nth-child(-n + 5) {
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 relative path to the images appears to be incorrect.

This CSS file is located at src/styles/stars.css. The path url(./images/star.svg) tells the browser to look for an images folder inside the styles folder (i.e., src/styles/images/).

It's more likely that the images folder is at src/images. To get there from src/styles/, you need to go up one directory level. The correct path should be url(../images/star.svg).

Please update this for all background-image properties in this file.

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