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

Add task solution #5318

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

Conversation

SofiiaPelenska
Copy link

  • DEMO LINK

  • TEST REPORT 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.

Thank you for your hard work on this project! 😊 While your code is mostly on the right track, there are a few critical issues that need to be addressed before we can proceed. The logical error in the nth-child selectors is significant because it affects the functionality of displaying active stars correctly. Additionally, the class naming and file structure do not fully comply with the task requirements, which could lead to maintenance challenges in the future. Please make these adjustments, and you'll be all set! Keep up the great work! 🌟

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

src/style.css Outdated
Comment on lines 23 to 28
.stars--0 .stars_star:nth-child(-n + 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) {

Choose a reason for hiding this comment

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

There is a logical error in the nth-child selectors. The selectors are intended to apply the active star image to a certain number of stars, but the range specified by nth-child(-n + 0) will not select any elements. You should adjust the selectors to correctly apply the active image to the intended number of stars. For example, for '.stars--0', you might want to use '.stars--0 .stars_star:nth-child(-n + 1)' to select the first star, and so on for the other classes.

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 effort on implementing the star rating system! 🌟 While the Pull Request is approved to help you progress in your learning journey, there are a few critical issues that need attention:

  1. Class Naming: The current class names like stars--0, stars--1 are not descriptive enough. Consider using more meaningful names such as stars--active or stars--inactive to enhance readability and maintainability.

  2. Active Stars Logic: The nth-child selectors are not correctly highlighting the active stars. Ensure that the selectors match the intended number of active stars based on the zero-based index used in your HTML.

  3. File Structure: Each BEM block should have its own separate file. This is essential for maintaining a clean and organized codebase.

Please review the comments and make the necessary improvements. Addressing these issues will not only meet the task requirements but also enhance the overall quality of your code. Keep up the good work and continue learning from these experiences! 💪

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

Comment on lines +17 to +63
<div class="stars stars--0">
<div class="stars_star"></div>
<div class="stars_star"></div>
<div class="stars_star"></div>
<div class="stars_star"></div>
<div class="stars_star"></div>
</div>

<div class="stars stars--1">
<div class="stars_star"></div>
<div class="stars_star"></div>
<div class="stars_star"></div>
<div class="stars_star"></div>
<div class="stars_star"></div>
</div>

<div class="stars stars--2">
<div class="stars_star"></div>
<div class="stars_star"></div>
<div class="stars_star"></div>
<div class="stars_star"></div>
<div class="stars_star"></div>
</div>

<div class="stars stars--3">
<div class="stars_star"></div>
<div class="stars_star"></div>
<div class="stars_star"></div>
<div class="stars_star"></div>
<div class="stars_star"></div>
</div>

<div class="stars stars--4">
<div class="stars_star"></div>
<div class="stars_star"></div>
<div class="stars_star"></div>
<div class="stars_star"></div>
<div class="stars_star"></div>
</div>

<div class="stars stars--5">
<div class="stars_star"></div>
<div class="stars_star"></div>
<div class="stars_star"></div>
<div class="stars_star"></div>
<div class="stars_star"></div>
</div>

Choose a reason for hiding this comment

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

The class names stars--0, stars--1, etc., are not descriptive. Consider using class names that better reflect the purpose or state of these elements, such as stars--active or stars--inactive, to improve readability and maintainability.

Comment on lines +23 to +27
.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) {

Choose a reason for hiding this comment

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

The nth-child selectors are not correctly highlighting the active stars. Since the HTML uses zero-based indexing for the classes (e.g., stars--0), the selectors should be adjusted to match the correct number of active stars. For example, .stars--1 should highlight the first star, .stars--2 should highlight the first two stars, and so on.

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