Skip to content

stars in plase#6585

Open
Pavel-8888 wants to merge 2 commits intomate-academy:masterfrom
Pavel-8888:develop
Open

stars in plase#6585
Pavel-8888 wants to merge 2 commits intomate-academy:masterfrom
Pavel-8888:develop

Conversation

@Pavel-8888
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.

Review Summary

Great work on implementing the star rating component! The BEM structure and CSS logic are well done. However, a couple of changes are needed before this can be approved.

The most critical issue is that the background images for the stars are not loading on the demo page. This is because the paths in src/style.css are absolute (e.g., url(/src/images/star.svg)). Please change them to be relative to the CSS file, like url('../images/star.svg'), so they work correctly after deployment.

Additionally, the project requires each BEM block to have its own CSS file. [CHECKLIST ITEM #2] Please move all the styles related to the .stars block into a dedicated file.

Once these fixes are in, your project will be in great shape!


✨ 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 +17 to +31
background-image: url(/src/images/star.svg);
background-position: center;
background-repeat: no-repeat;
}

.stars > .stars__star:last-child {
margin: 0;
}

.stars--1 > .stars__star:first-child,
.stars--2 > .stars__star:nth-child(-n + 2),
.stars--3 > .stars__star:nth-child(-n + 3),
.stars--4 > .stars__star:nth-child(-n + 4),
.stars--5 > .stars__star:nth-child(-n + 5) {
background-image: url(/src/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 paths to the background images are absolute from the server root. This can cause problems when deploying to a subdirectory, like on GitHub Pages. It's better to use relative paths from the CSS file, for example: url('images/star.svg').

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 on the HTML structure and fixing the image paths—the component is looking great! However, one crucial requirement from the checklist still needs to be addressed before this can be approved. All CSS for the .stars BEM block must be moved into its own separate file, as stated in [CHECKLIST ITEM #2]. Currently, these styles are in src/style.css. Please create a new file (e.g., stars.css) for the .stars block styles to complete the task. This is a key practice for building modular and maintainable components.


✨ 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

Comment on lines +7 to +32
.stars {
display: flex;
padding: 0;
}

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

.stars > .stars__star:last-child {
margin: 0;
}

.stars--1 > .stars__star:first-child,
.stars--2 > .stars__star:nth-child(-n + 2),
.stars--3 > .stars__star:nth-child(-n + 3),
.stars--4 > .stars__star:nth-child(-n + 4),
.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'. All styles for the .stars block (from this line to the end of the file) should be moved to a separate file, for example, stars.css. The body reset styles can remain here in style.css. This practice helps keep your components organized and reusable.

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.

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.

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

@Anton-Kuchmasov Anton-Kuchmasov left a comment

Choose a reason for hiding this comment

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

Well done!

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.

3 participants