Skip to content

add solution#6592

Open
sunshine-coder-prog wants to merge 2 commits intomate-academy:masterfrom
sunshine-coder-prog:develop
Open

add solution#6592
sunshine-coder-prog wants to merge 2 commits intomate-academy:masterfrom
sunshine-coder-prog:develop

Conversation

@sunshine-coder-prog
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 job on implementing the star rating component! The HTML structure is well-organized, and the CSS logic for displaying the active stars is efficient.

However, this requires changes because the project's file structure rules have not been followed. The checklist specifies that each BEM block must have its own separate file [CHECKLIST ITEM #2]. In your submission, the styles for the .stars block are combined with general page styles in src/style.css. Please move all styles related to the stars block into their own dedicated file, such as stars.css.

Additionally, as a minor improvement, the empty <header> tag in index.html doesn't add semantic value and can be removed.

Once you've separated the CSS files, your solution will be ready!


✨ 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/index.html Outdated
<h1>Stars</h1>
<!-- #endregion -->
<body class="body">
<header class="header"></header>

Choose a reason for hiding this comment

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

While using semantic tags like <header> is good practice, an empty one doesn't add semantic value to the page. If this element is not intended to hold any content, it would be better to remove it.

src/style.css Outdated
Comment on lines +1 to +33
/* #region page */
.body {
margin: 0;
}

.stars {
margin: 0;
padding: 0;
display: flex;
list-style: none;
align-items: center;
}

.stars__star {
width: 16px;
height: 16px;
background-image: url(images/star.svg);
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),
.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 file violates checklist item #2: 'Each BEM block has its own separate file'.

You've combined general page styles (.body) with the styles for a specific BEM block (.stars). According to the BEM methodology and the project guidelines, the styles for the stars block should be in a separate file, for example, stars.css.

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 this pull request! You've successfully addressed all the feedback from the previous review, particularly by separating the styles for the .stars block into its own dedicated file. The code is now clean, well-structured, and fully meets all the task requirements. I am approving your solution. 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

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