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 #5017

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

Conversation

Stanislav0909
Copy link

No description provided.

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:

  1. CSS Selector Logic: The :nth-child selectors in your CSS are not correctly configured, which affects the functionality of the star rating system. For example, .stars--0 .stars__star:nth-child(-n+0) will not select any elements, and .stars--1 .stars__star:nth-child(-n+1) only selects the first child. This needs to be corrected to ensure the intended number of active stars is displayed.

  2. BEM Methodology: The task requires using BEM methodology with separate CSS files for each BEM block. Currently, all styles are in a single CSS file, which does not meet the core requirements.

These issues are critical as they impact the functionality and structure of your code. Once these are resolved, your solution will be much stronger. Keep up the great work, and I'm confident you'll nail it with these adjustments! 🚀

✨ 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 +17 to +22
.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.

The :nth-child selectors are incorrectly configured. For example, .stars--0 .stars__star:nth-child(-n+0) will not select any elements because -n+0 results in no valid index. Similarly, .stars--1 .stars__star:nth-child(-n+1) will only select the first child. Consider adjusting these selectors to correctly reflect the intended number of active stars. For instance, .stars--1 .stars__star:nth-child(-n+1) should be .stars--1 .stars__star:nth-child(-n+2) to select the first two stars.

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 the pull request. Here’s a quick rundown:

  1. Universal Selector Usage: The use of the universal selector * in your CSS for resetting margins can impact performance. It's recommended to avoid this and use more specific selectors.

  2. BEM Structure: Each BEM block should have its own separate file, but the current setup doesn't reflect this requirement. This is crucial for maintaining a scalable and organized codebase.

  3. HTML Formatting: The HTML file has inconsistent indentation. Following a consistent 2-space indentation is important for readability and maintaining coding standards.

  4. CSS Class Naming: Class names should reflect the meaning of the content rather than the style or tag names. For example, stars__star could be more descriptive of the content it represents.

  5. Semantic HTML: Using semantic tags enhances SEO and accessibility. Consider revising your HTML to incorporate these where possible.

  6. nth-child Selector Issue: The pattern -n+0 in your CSS will not select any elements, which might not be what you intended. Adjust this to ensure it selects the correct elements.

Addressing these points will help ensure your code meets the task requirements and is robust for future development. Keep up the great work, and I’m sure you’ll have this sorted in no time! 🚀

✨ 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 +17 to +22
.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.

The nth-child selectors are using a pattern -n+X where X is the number of stars to be styled. However, the pattern -n+0 in line 17 will not select any elements, which might not be the intended behavior. You might want to adjust this to ensure it selects the correct number of stars.

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 your submission! 🎉 Your code meets most of the task requirements, and I'm approving it to help you move forward with your learning journey. However, there are a few areas for improvement:

  1. HTML Structure: Avoid redundant classes like stars on inner div elements within the section with the same class.
  2. CSS Styling: Refrain from using tag names for styling, except for html and body. Also, consider adding fallback fonts for better compatibility.
  3. File Structure: Ensure each BEM block has its own file as per the task requirements.
  4. Semantic Tags: Double-check that all elements use the most semantically appropriate tags.
  5. Logical Error in CSS: Adjust the :nth-child selectors to correctly select the intended number of active stars.

Please review these comments to improve your code. Addressing these issues will enhance your skills and help you avoid similar problems in the future. Keep up the great work and continue learning from your experiences! 🚀

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

Comment on lines +19 to +24
.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 '-n+0' selector in '.stars--0 .stars__star:nth-child(-n+0)' will not select any elements, as it effectively means 'select none'. Similarly, the other selectors should be adjusted to correctly select the intended number of active stars. For example, '.stars--1 .stars__star:nth-child(-n+1)' should be '.stars--1 .stars__star:nth-child(-n+2)' to select the first star, 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