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 solution #4869

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

add solution #4869

wants to merge 9 commits into from

Conversation

Knysh19
Copy link

@Knysh19 Knysh19 commented Nov 24, 2024

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 meets many of the task requirements, there are a few critical issues that need to be addressed before we can approve the pull request. The scale transformation on hover is too large, which might affect the layout or cause overlap with other elements. Additionally, ensure that all CSS values include appropriate units, such as 'px', to maintain cross-browser compatibility. Lastly, consider using a templating approach or JavaScript to dynamically generate repeated product card elements to reduce redundancy and improve maintainability. Once these issues are resolved, your solution will be in great shape! 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.

Comment on lines +87 to +309
>
BUY
</a>
</div>

<div class="card">
<img
class="card__image"
src="./images/imac.jpeg"
alt="iMac"
/>
<h2 class="card__title">
APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A)
</h2>
<p class="card__code">Product code: 195434</p>
<div class="card__review">
<div class="stars">
<div class="stars__star-active"></div>
<div class="stars__star-active"></div>
<div class="stars__star-active"></div>
<div class="stars__star-active"></div>
<div class="stars__star"></div>
</div>
<p class="card__review_count">Reviews: 5</p>
</div>
<div class="card__price">
<p class="card__price_text">Price:</p>
<p class="card__price_count">$2,199</p>
</div>
<a
href="#"
class="card__button"
>
BUY
</a>
</div>

<div class="card">
<img
class="card__image"
src="./images/imac.jpeg"
alt="iMac"
/>
<h2 class="card__title">
APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A)
</h2>
<p class="card__code">Product code: 195434</p>
<div class="card__review">
<div class="stars">
<div class="stars__star-active"></div>
<div class="stars__star-active"></div>
<div class="stars__star-active"></div>
<div class="stars__star-active"></div>
<div class="stars__star"></div>
</div>
<p class="card__review_count">Reviews: 5</p>
</div>
<div class="card__price">
<p class="card__price_text">Price:</p>
<p class="card__price_count">$2,199</p>
</div>
<a
href="#"
class="card__button"
>
BUY
</a>
</div>

<div class="card">
<img
class="card__image"
src="./images/imac.jpeg"
alt="iMac"
/>
<h2 class="card__title">
APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A)
</h2>
<p class="card__code">Product code: 195434</p>
<div class="card__review">
<div class="stars">
<div class="stars__star-active"></div>
<div class="stars__star-active"></div>
<div class="stars__star-active"></div>
<div class="stars__star-active"></div>
<div class="stars__star"></div>
</div>
<p class="card__review_count">Reviews: 5</p>
</div>
<div class="card__price">
<p class="card__price_text">Price:</p>
<p class="card__price_count">$2,199</p>
</div>
<a
href="#"
class="card__button"
>
BUY
</a>
</div>

Choose a reason for hiding this comment

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

The product card elements are repeated multiple times with identical content. Consider using a templating engine or JavaScript to dynamically generate these cards to avoid redundancy and improve maintainability.

.is-active::after {
content: '';
position: absolute;
bottom: -19;

Choose a reason for hiding this comment

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

The value for 'bottom' should include a unit (e.g., 'px'). Without a unit, this might not work as expected in some browsers.

Comment on lines 241 to 242
.card:hover {
transform: scale(1.2);

Choose a reason for hiding this comment

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

The scale transformation on hover might be too large (1.2), which could affect the layout or cause overlap with other elements. Consider using a smaller scale value to ensure a smoother user experience.

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.

Sorry, the pull request review was unsuccessful for the following reasons:

Warning

There are no files to review. Please make sure that you have added files to the pull request. Some files and directories may be ignored from the review or failed to load.
[CODE: 4]

Additional info:
Ignored files list:

  • src/index.html
  • src/styles/index.scss

If the issue is within your control, please address it.
The next review attempt will automatically launch in 1 hour.
If you believe this is an error or need assistance, please contact the support team.

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.

Sorry, the pull request review was unsuccessful for the following reasons:

Warning

There are no files to review. Please make sure that you have added files to the pull request. Some files and directories may be ignored from the review or failed to load.
[CODE: 4]

Additional info:
Ignored files list:

  • src/index.html
  • src/styles/index.scss

If the issue is within your control, please address it.
The next review attempt will automatically launch in 1 hour.
If you believe this is an error or need assistance, please contact the support team.

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.

Sorry, the pull request review was unsuccessful for the following reasons:

Warning

There are no files to review. Please make sure that you have added files to the pull request. Some files and directories may be ignored from the review or failed to load.
[CODE: 4]

Additional info:
Ignored files list:

  • src/index.html
  • src/styles/index.scss

If the issue is within your control, please address it.
The next review attempt will automatically launch in 1 hour.
If you believe this is an error or need assistance, please contact the support team.

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.

Sorry, the pull request review was unsuccessful for the following reasons:

Warning

There are no files to review. Please make sure that you have added files to the pull request. Some files and directories may be ignored from the review or failed to load.
[CODE: 4]

Additional info:
Ignored files list:

  • src/index.html
  • src/styles/index.scss

If the issue is within your control, please address it.
The next review attempt will automatically launch in 1 hour.
If you believe this is an error or need assistance, please contact the support team.

Copy link

@TarasHoliuk TarasHoliuk left a comment

Choose a reason for hiding this comment

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

GJ 👍 Added a few comments


.card__code {
font-size: 10px;
font-weight: 400;

Choose a reason for hiding this comment

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

400 is a default font-weight value - no need to set it everywhere

margin: 0;
}

.card {

Choose a reason for hiding this comment

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

move each BEM block to a separate file

Also, use SCSS nesting

Comment on lines 7 to 8
--blue-color: #00acdc;
--black-color: #060b35;

Choose a reason for hiding this comment

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

You've already defined such colors in SCSS variables above

.header {
display: flex;
justify-content: end;
gap: 243px;

Choose a reason for hiding this comment

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

redundant

Copy link
Author

Choose a reason for hiding this comment

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

What exactly can be simplified here?

Choose a reason for hiding this comment

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

image remove the gap and change the justify-content to space-between

margin: 0;
}

.nav__link-list {

Choose a reason for hiding this comment

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

Suggested change
.nav__link-list {
.nav__list {

@Knysh19 Knysh19 requested a review from TarasHoliuk December 10, 2024 16:25
Copy link

@volodymyr-soltys97 volodymyr-soltys97 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!
Let's improve your code

src/index.html Outdated
Comment on lines 33 to 41
<li class="nav__item">
<a
class="nav__link is-active"
href="#"
>
Apple
</a>
</li>
<li class="nav__link">Samsung</li>

Choose a reason for hiding this comment

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

Every word should be a link, fix it everywhere

Suggested change
<li class="nav__item">
<a
class="nav__link is-active"
href="#"
>
Apple
</a>
</li>
<li class="nav__link">Samsung</li>
<li class="nav__item">
<a
class="nav__link is-active"
href="#apple"
>
Apple
</a>
</li>
<li class="nav__item">
<a class="nav__link" href="#samsung">Samsung</a>
</li>

Comment on lines 1 to 4
$primary-color: #00acdc;
$font-color: #060b35;
$light-grey: #616070;
$font-family: 'Roboto', sans-serif;

Choose a reason for hiding this comment

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

Move variables to the separate file

Copy link
Author

Choose a reason for hiding this comment

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

How to do it?

Comment on lines 7 to 8
margin: 0;
min-width: 1024px;

Choose a reason for hiding this comment

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

Suggested change
margin: 0;
min-width: 1024px;

justify-content: end;
gap: 243px;
height: 60px;
background-color: #fff;

Choose a reason for hiding this comment

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

This color is default

Suggested change
background-color: #fff;

Comment on lines 40 to 68
.nav__list {
display: flex;
gap: 20px;
list-style-type: none;
margin: 0;
padding: 0;
}

.nav__link {
color: #060b35;
cursor: pointer;
text-transform: uppercase;
transition: color 0.3s;
position: relative;
line-height: 60px;
display: block;
height: 60px;
}

.nav {
display: flex;
align-items: center;
}

.nav__link:hover {
color: $primary-color;
}

.is-active {

Choose a reason for hiding this comment

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

Move header styles to the separate file

Comment on lines 85 to 103
.container {
display: grid;
grid-template-columns: repeat(1, 200px);
gap: 46px 48px;
justify-content: center;
padding: 50px 40px;

@media (min-width: 488px) {
grid-template-columns: repeat(2, 200px);
}

@media (min-width: 768px) {
grid-template-columns: repeat(3, 200px);
}

@media (min-width: 1024px) {
grid-template-columns: repeat(4, 200px);
}
}

Choose a reason for hiding this comment

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

Move container styles to the separate file

Comment on lines 115 to 140
border-radius: 5px;
width: 200px;
margin: 0;
padding: 32px 16px 16px;
font-family: $font-family;
border: 1px solid #f3f3f3;
transition:
transform 0.3s ease,
color 0.3s ease;
}

.card__image {
width: 160px;
height: 134px;
margin: 0 auto 40px;
display: block;
}

.card__title {
font-size: 12px;
font-weight: 500;
line-height: 18px;
color: $font-color;
margin-bottom: 4px;
transition: color 0.3s ease;
}

Choose a reason for hiding this comment

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

Move these styles to the separate card file styles styles, and use scss nesting everywhere

Comment on lines 163 to 177
.stars {
display: flex;
gap: 4px;
padding-left: 1px;
align-items: center;
}

.stars__star {
background-image: url(../images/star.svg);
width: 16px;
height: 16px;
background-repeat: no-repeat;
background-position: center;
}

Choose a reason for hiding this comment

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

Move stars styles to the separate file

Comment on lines +72 to +78
<div class="stars">
<div class="stars__star-active"></div>
<div class="stars__star-active"></div>
<div class="stars__star-active"></div>
<div class="stars__star-active"></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.

Fix it everywhere

Suggested change
<div class="stars">
<div class="stars__star-active"></div>
<div class="stars__star-active"></div>
<div class="stars__star-active"></div>
<div class="stars__star-active"></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>

Choose a reason for hiding this comment

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

image

.header {
display: flex;
justify-content: end;
gap: 243px;

Choose a reason for hiding this comment

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

image remove the gap and change the justify-content to space-between

Comment on lines +72 to +78
<div class="stars">
<div class="stars__star-active"></div>
<div class="stars__star-active"></div>
<div class="stars__star-active"></div>
<div class="stars__star-active"></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.

image

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.

5 participants