-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Card commit #1 #5920
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
base: master
Are you sure you want to change the base?
Card commit #1 #5920
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Summary
Decision: REQUEST_CHANGES — there are critical blockers that violate explicit requirements.
Why: Several core checklist items are not met, which will break automated checks and required functionality.
Critical issues to fix:
- Incorrect BEM block name for the card
- Where:
src/index.html
line with root card element (usesclass="product__wrapper"
), andsrc/styles/card.scss
selectors (use.product
) - Requirement: Checklist #1 — implement a
card
block (separate fromstars
) - How to fix: Rename the root element class to
card
and refactor all related selectors to.card
, e.g.,card__image
,card__title
, etc. Avoidproduct
as a block name.
- Where:
- Flexbox not used for the card layout
- Where:
src/styles/card.scss
- Requirement: Card layout must use Flexbox
- How to fix: Add
display: flex
(and appropriateflex-direction
, gaps/alignment) to the main card container and/or its internal layout wrappers per the mockup.
- Where:
- Card width must include border
- Where:
src/styles/card.scss
- Requirement: Card width exactly 200px including border (Req 1.4, checklist 3.7)
- How to fix: Add
box-sizing: border-box;
to.card
to ensure borders are included in the 200px width.
- Where:
- Variables file import missing in card.scss
- Where:
src/styles/card.scss
- Requirement: Checklist #3 — variables in a separate file and imported where needed
- How to fix: Add
@import 'variables';
(or your chosen import method) at the top so$color-white
,$color-blue
, etc., resolve correctly.
- Where:
- Incomplete stars modifiers
- Where:
src/styles/stars.scss
- Requirement: Checklist #4 —
stars--N
for N=1..5 must highlight first N stars - How to fix: Implement modifiers for
stars--1
,--2
,--3
,--4
,--5
so only the first N items get the highlighted background.
- Where:
Minor suggestions:
- Consider a global
*, *::before, *::after { box-sizing: border-box; }
reset for consistency. - Double-check the product image path in HTML to match your build output expectations.
You’re very close—your project structure, variables, and the stars
block foundation look good. Address the items above and you should be set to pass. Keep it up!
✨ 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
src/index.html
Outdated
<div | ||
class="product__wrapper" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The root card element uses class="product__wrapper"
instead of the required BEM block name card
. This violates checklist item #1: "Implement two separate BEM blocks: card and stars." The card block must be named card
, not product__wrapper
.
src/styles/card.scss
Outdated
@@ -0,0 +1,92 @@ | |||
.product { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This violates checklist item #1: "Implement two separate BEM blocks: card and stars." The card block must be named card
, not product
. All elements should be nested under .card
instead of .product
.
src/styles/card.scss
Outdated
@@ -0,0 +1,92 @@ | |||
.product { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are using SCSS variables like $color-white
and $color-blue
, but there is no import of the variables file. This violates checklist item #3: "Define SCSS variables for main values ... and place them in a separate variables file that is imported where needed."
border: 1px solid rgba(243, 243, 243, 1); | ||
border-radius: 5px; | ||
padding: 32px 0 16px; | ||
width: 200px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The card width is set to 200px, but you must ensure that the border is included in the total width. Add box-sizing: border-box;
to the card block to satisfy requirement 1.4 and checklist item 3.7.
src/styles/stars.scss
Outdated
margin: 0; | ||
} | ||
|
||
.stars--4 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This violates checklist item #4: "Implement stars--N modifiers so that for each valid N, the first N star elements are visually highlighted while others are not." Only stars--4
is implemented. You must add modifiers for all valid N (1 to 5).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Summary
Decision: REQUEST_CHANGES
Your work is strong overall (clean BEM, good structure, correct assets, global resets and fonts). However, there are critical blockers that violate explicit checklist items and affect required functionality.
Critical issues to fix
-
stars.scss – Missing required modifiers (Checklist #4)
- Location:
src/styles/stars.scss
- Issue: Only
.stars--4
is implemented. The component must support.stars--1
,.stars--2
,.stars--3
,.stars--4
, and.stars--5
, with the first N stars highlighted for each modifier. - Why it’s wrong: The task requires verifiable support for all rating levels used (1–5). With only
--4
, other ratings cannot render correctly. - How to fix: Add modifiers for all N or generate them via a loop. For example, use a loop to target
.stars--#{n} .stars__item:nth-child(-n+#{n})
and apply the active background image. Ensure.stars__item
has the default (inactive) star, and the active state overrides it for the first N items.
- Location:
-
card.scss – Width must include border in final 200px (Checklist 3.7)
- Location:
src/styles/card.scss
,.card__wrapper
width and border (exact line numbers may vary, but wherewidth: 200px
and border are defined) - Issue: There’s no explicit
box-sizing: border-box;
on.card__wrapper
(or.card
). While you have a global reset inindex.scss
, the checklist explicitly requires ensuring the card’s computed width is 200px including border at the component level. - Why it’s wrong: Without explicit
box-sizing
on the card container, the requirement can be inadvertently broken if global styles change. Review feedback flagged this as a violation. - How to fix: Add
box-sizing: border-box;
to.card__wrapper
(or to.card
if you move the sizing there). Example:.card__wrapper { box-sizing: border-box; width: 200px; border: 1px solid ... }
.
- Location:
Minor suggestions
- Consider placing primary layout/sizing on the root
.card
container for clarity, keeping.card__wrapper
for inner layout if needed.
You’re very close—address these items and it should fully meet the requirements. Keep up the good work!
✨ 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
border: 1px solid rgba(243, 243, 243, 1); | ||
border-radius: 5px; | ||
padding: 32px 0 16px; | ||
width: 200px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This violates checklist item 3.7: "Ensure the card total width computes to 200px including border (i.e., account for border width in sizing; box-sizing choice must yield correct final width)." Add box-sizing: border-box;
to .card__wrapper
(or globally) to ensure the border is included in the 200px width.
src/styles/stars.scss
Outdated
.stars--4 { | ||
.stars__star { | ||
@for $i from 1 through 4 { | ||
&:nth-child(#{$i}) { | ||
background-image: url('../images/star-active.svg'); | ||
} | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This violates checklist item #4: "Implement stars--N modifiers (where N corresponds to rating levels used in the layout) so that the first N stars are highlighted correctly for each N. This must be verifiable for all supported N values." Only .stars--4
is implemented. You must provide .stars--1
, .stars--2
, .stars--3
, .stars--4
, and .stars--5
modifiers so that the first N stars are highlighted for each N.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Summary
Educational Approval
Fantastic work—this implementation cleanly meets the task’s requirements and demonstrates solid SCSS + BEM practices. Highlights:
- BEM/SCSS structure is clear and modular (
card
andstars
blocks in separate files). - Stars modifiers
.stars--1…--5
are generated via an SCSS loop, correctly highlighting the first N stars (checklist #4). - Card width is precisely handled with explicit
box-sizing: border-box;
on.card__wrapper
, ensuring the 200px requirement is met. - Accessibility/semantics are sound:
main
container,button
for BUY, and meaningful structure. - Parcel + Google Fonts integration is correct; assets are referenced from
src/images
as required.
Minor polish ideas (optional, for learning):
- Consider adding
:focus-visible
styles to the BUY button for better keyboard accessibility. - If this grew, extract additional SCSS variables (e.g., spacing, font-sizes) for easier theming.
Great job—everything important is in place and tidy. Keep up the strong attention to detail!
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
DEMO LINK
TEST REPORT LINK
there 2 BEM blocks
card
andstars
each in their own fileSCSS Nesting is used for
elements
,modifiers
andpseudo-classes
SCSS Variables are used for main values and placed in a separate file
all
stars--N
modifiers work as expected (Highlight firstN
stars)Code follows all the Code Style Rules ❗️