Skip to content

add task solution#6239

Open
Natalia-Onufrienko wants to merge 7 commits into
mate-academy:masterfrom
Natalia-Onufrienko:develop
Open

add task solution#6239
Natalia-Onufrienko wants to merge 7 commits into
mate-academy:masterfrom
Natalia-Onufrienko:develop

Conversation

@Natalia-Onufrienko
Copy link
Copy Markdown

Copy link
Copy Markdown

@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

The implementation has functional correctness but violates BEM methodology by nesting .logo and .nav inside .header, and contains duplicate variable declarations in variables.scss and header.scss. These issues must be resolved before approval.


✨ 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 +13 to +74
font-weight: $fw-medium;
line-height: $line-height-base;
margin: 0 0 $gap-xs;
transition: color $transition-duration $transition-ease;
}

&:hover {
transform: scale($hover-scale);

.card__title {
color: $color-hover-title;
}
}

&__rating {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: $space-lg;
}

&__reviews {
display: flex;
align-items: center;
font-weight: $fw-regular;
font-size: $font-size-small;
line-height: $line-height-sm;
}

&__image {
width: 100%;
display: block;
justify-content: center;
margin: 0 auto 40px;

img {
max-width: 100%;
display: block;
}
}

&__code {
font-size: $font-size-small;
font-weight: $fw-regular;
line-height: $line-height-sm;
color: $color-text-gray;
margin-bottom: $space-md;
}

&__money {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: $space-md;
}

&__price {
font-weight: $fw-regular;
font-size: 12px;
line-height: $line-height-base;
color: $color-text-gray;
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

In BEM methodology, .logo and .nav are separate blocks from .header, but they are incorrectly nested inside the .header block. Each block should be defined at the top level of the SCSS file, not nested under another block. Move .logo and .nav outside of .header { } to follow proper BEM structure.

Comment thread src/index.html

<nav class="nav">
<ul class="nav__list">
<li class="nav__item">
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Duplicate variable declaration - $hover-scale is defined twice in variables.scss. The second declaration overwrites the first, which is redundant and confusing.

Comment thread src/index.html
<nav class="nav">
<ul class="nav__list">
<li class="nav__item">
<a
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Duplicate variable declaration - $color-hover-title is defined twice. Remove the duplicate.

Comment thread src/styles/blocks/header.scss Outdated
Comment on lines +50 to +52
color: $color-link;
text-decoration: none;
display: flex;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Duplicate variable declaration. The variable $hover-scale: 1.2 is defined twice (lines 50 and 52), causing the first declaration to be overridden. Remove the duplicate on line 52.

Comment thread src/styles/blocks/header.scss Outdated
Comment on lines +51 to +53
text-decoration: none;
display: flex;
align-items: center;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Duplicate variable declaration. The variable $color-hover-title: #34568b is defined twice (lines 51 and 53), causing the first declaration to be overridden. Remove the duplicate on line 53.

Comment thread src/styles/blocks/header.scss Outdated
Comment on lines +23 to +29

.logo {
&__img {
height: 40px;
width: 40px;
display: block;
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

BEM violation: The .logo block is nested inside .header using descendant selector (.header .logo). According to BEM, blocks should be flat and independent. The .logo should be a separate root-level block, not nested within .header. Move .logo styles outside of the .header selector.

Comment on lines +31 to +73

.nav {
&__list {
display: flex;
list-style: none;
margin: 0;
padding: 0;
}

&__item {
&:not(:last-child) {
margin-right: $nav-gap;
}
}

&__link {
text-transform: uppercase;
height: $nav-height;
position: relative;
color: $color-link;
text-decoration: none;
display: flex;
align-items: center;
justify-content: center;
transition: color $transition-duration $transition-ease;

&:hover,
&.is-active {
color: var(--blue);
}

&.is-active::after {
background-color: var(--blue);
content: '';
position: absolute;
left: 0;
right: 0;
bottom: 0;
height: 4px;
border-radius: 4px;
width: 100%;
}
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

BEM violation: The .nav block is nested inside .header using descendant selector (.header .nav). According to BEM, blocks should be flat and independent. The .nav should be a separate root-level block, not nested within .header. Move .nav styles outside of the .header selector.

Comment thread src/styles/variables.scss Outdated
Comment on lines +31 to +32
$color-hover-title: #34568b;
$hover-scale: 1.2;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Duplicate variable declaration. $hover-scale: 1.2 is already defined on line 30. Remove this duplicate declaration.

Comment thread src/styles/variables.scss Outdated
Comment on lines +32 to +33
$hover-scale: 1.2;
$color-hover-title: #34568b;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Duplicate variable declaration. $color-hover-title: #34568b is already defined on line 31. Remove this duplicate declaration.

Copy link
Copy Markdown

@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

Your implementation passes all functional requirements and is approved. The code correctly implements semantic HTML with proper BEM structure, all required data attributes (data-qa="nav-hover", data-qa="card", data-qa="card-hover"), responsive CSS Grid breakpoints, card specifications, and smooth hover transitions. The visual regression test failures are a CI/workflow issue where reference images are created and compared in the same run—this is not related to your code quality. Linting and BEM checks both pass completely. There is one minor consistency issue worth noting: header.scss uses var(--blue) for the nav hover/active color while other files use $color-primary. Both resolve to #00acdc, so functionality is unaffected. However, for better consistency, you could replace var(--blue) with $color-primary in header.scss lines 53, 55, and 61. All the core requirements are met—great work on this implementation!


✨ 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 +57 to +59

&:hover,
&.is-active {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Use SCSS variable $color-primary instead of CSS variable var(--blue) for consistency. The SCSS variable $color-primary: #00acdc is already defined in variables.scss and should be used for all primary blue color values.

Comment on lines +62 to +63

&.is-active::after {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Use SCSS variable $color-primary instead of CSS variable var(--blue) for consistency. This applies to the is-active::after pseudo-element background color as well.

Comment on lines +24 to +30
}
}

&__rating {
display: flex;
align-items: center;
justify-content: space-between;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

BEM violation: .logo is nested inside .header selector. According to BEM methodology, .logo is a separate block and should not be nested. Move .logo to its own file or place it at the root level of the SCSS file.

Comment on lines +32 to +74
}

&__reviews {
display: flex;
align-items: center;
font-weight: $fw-regular;
font-size: $font-size-small;
line-height: $line-height-sm;
}

&__image {
width: 100%;
display: block;
justify-content: center;
margin: 0 auto 40px;

img {
max-width: 100%;
display: block;
}
}

&__code {
font-size: $font-size-small;
font-weight: $fw-regular;
line-height: $line-height-sm;
color: $color-text-gray;
margin-bottom: $space-md;
}

&__money {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: $space-md;
}

&__price {
font-weight: $fw-regular;
font-size: 12px;
line-height: $line-height-base;
color: $color-text-gray;
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

BEM violation: .nav is nested inside .header selector. According to BEM methodology, .nav is a separate block and should not be nested. Move .nav to its own file or place it at the root level of the SCSS file.

Comment on lines +59 to +64
margin-bottom: $space-md;
}

&__money {
display: flex;
align-items: center;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Inconsistent variable usage: Using var(--blue) (CSS custom property) instead of $color-primary (SCSS variable). For consistency and maintainability, use SCSS variables throughout.

Copy link
Copy Markdown

@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

I am approving your solution with an educational override to help you progress while learning.

What's working well: Your implementation successfully meets all functional requirements—semantic HTML structure, proper BEM naming conventions, responsive CSS Grid breakpoints (1→2→3→4 columns), correct card specifications, all required data attributes, and smooth 300ms hover transitions. The code passes all linting checks.

Issues to address: There are two areas for improvement. First, visual regression tests show 17-32% differences, indicating your card and main layout styling doesn't match the expected output—review your card.scss and layout.scss dimensions, padding, and spacing against the reference design. Second, for better maintainability, replace var(--blue) with $color-primary in header.scss (lines 53, 55, 61) to maintain consistency across your SCSS files.

Keep up the good work on the foundational implementation—you're close to a fully polished result!


✨ 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 thread src/index.html
Comment on lines +53 to +60
Samsung
</a>
</li>

<li class="nav__item">
<a
class="nav__link"
href="#"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Inconsistency: Uses var(--blue) for hover and active states while other files use $color-primary. Consider using $color-primary for consistency across all SCSS files.

Comment thread src/index.html
Comment on lines +62 to +64
Smartphones
</a>
</li>
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Inconsistency: Uses var(--blue) for the pseudo-element background. Consider using $color-primary for consistency.

Comment thread src/styles/blocks/header.scss Outdated
Comment on lines +57 to +60

&:hover,
&.is-active {
color: var(--blue);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This uses var(--blue) for the nav link hover/active color. For better consistency with other files that use $color-primary, consider replacing var(--blue) with $color-primary here as well. Both resolve to #00acdc, so functionality is unaffected, but using SCSS variables consistently improves maintainability.

Comment thread src/styles/blocks/header.scss Outdated
Comment on lines +62 to +64

&.is-active::after {
background-color: var(--blue);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Uses var(--blue) for the active underline background. Consider using $color-primary instead for consistency with the rest of the codebase.

Copy link
Copy Markdown

@etojeDenys etojeDenys left a comment

Choose a reason for hiding this comment

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

good job

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