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

Develop #4996

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

Develop #4996

wants to merge 5 commits into from

Conversation

BTakhaiev
Copy link

@BTakhaiev BTakhaiev commented Jan 10, 2025

❗️ Replace <your_account> with your GitHub username and copy the links to the Pull Request description:

❗️ Copy this Checklist to the Pull Request description after links, and put - [x] before each point after you checked it.

  • All components follow BEM and use SCSS
  • Repeated sizes and special colors are put to variables
  • Grid is used for the columns
  • Cards are shown in 1, 2, 3, or 4 columns based on screen resolution
  • All changes on :hover are smooth
  • 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! However, there are a few critical issues that need to be addressed before we can proceed:

  1. Undefined Variables: Several SCSS variables such as $main-button-color, $font-size-base, $main-text-color, $second-text-color, and $card-padding are used but not defined. This will lead to compilation errors. Please ensure all variables are defined in a central variables file or earlier in the relevant SCSS files.

  2. BEM Methodology: The code does not consistently follow BEM conventions. For example, class names like .conteiner should be corrected to .container to adhere to proper spelling and BEM conventions.

  3. Data Attributes: The task requires specific data-qa attributes to be added to certain elements, which are currently missing. Please add data-qa="card" to the first card and data-qa="card-hover" to the "Buy" link inside the first card.

  4. Grid Layout and Media Queries: The SCSS should include media queries to adjust the grid layout for different screen sizes as specified in the task requirements. This is currently missing.

  5. Hover Effects: Ensure that all specified hover effects are implemented with smooth transitions over 300ms.

Please address these issues to meet the task requirements. Once resolved, your code will be in great shape! Keep up the good work, and don't hesitate to reach out if you need any help. 😊

✨ 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 +112 to +453
<button class="card__button">buy</button>
</div>

<div class="card">
<div class="card__img">
<a
href="#"
class="card__img-img"
></a>
</div>

<h1 class="card__header">
APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A)
</h1>

<p class="card__product-code">Product code: 195434</p>

<div class="card__response">
<div class="card__response-starsLine stars">
<a
href="#"
class="stars__line"
></a>
<a
href="#"
class="stars__line"
></a>
<a
href="#"
class="stars__line"
></a>
<a
href="#"
class="stars__line"
></a>
<a
href="#"
class="stars__line"
></a>
</div>

<p class="card__response-reviews">Reviews: 5</p>
</div>

<div class="card__price">
<p class="card__price-price">Price:</p>
<p class="card__price-tag">$2,199</p>
</div>

<button class="card__button">buy</button>
</div>

<div class="card">
<div class="card__img">
<a
href="#"
class="card__img-img"
></a>
</div>

<h1 class="card__header">
APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A)
</h1>

<p class="card__product-code">Product code: 195434</p>

<div class="card__response">
<div class="card__response-starsLine stars">
<a
href="#"
class="stars__line"
></a>
<a
href="#"
class="stars__line"
></a>
<a
href="#"
class="stars__line"
></a>
<a
href="#"
class="stars__line"
></a>
<a
href="#"
class="stars__line"
></a>
</div>

<p class="card__response-reviews">Reviews: 5</p>
</div>

<div class="card__price">
<p class="card__price-price">Price:</p>
<p class="card__price-tag">$2,199</p>
</div>

<button class="card__button">buy</button>
</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 the same content. Consider using a templating engine or JavaScript to dynamically generate these cards to avoid redundancy and improve maintainability.

background-color: #fff;
display: flex;
flex-direction: column;
padding: $card-padding;

Choose a reason for hiding this comment

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

The variable $card-padding is used here, but it is not defined within this file. Ensure that $card-padding is defined in a variables file or earlier in this file to avoid compilation errors.

}

&__header {
font-size: $font-size-base;

Choose a reason for hiding this comment

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

The variable $font-size-base is used here, but it is not defined within this file. Ensure that $font-size-base is defined in a variables file or earlier in this file to avoid compilation errors.

font-size: $font-size-base;
line-height: 18px;
font-weight: 500;
color: $main-text-color;

Choose a reason for hiding this comment

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

The variable $main-text-color is used here, but it is not defined within this file. Ensure that $main-text-color is defined in a variables file or earlier in this file to avoid compilation errors.

font-size: 10px;
line-height: 14px;
font-weight: 400;
color: $second-text-color;

Choose a reason for hiding this comment

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

The variable $second-text-color is used here, but it is not defined within this file. Ensure that $second-text-color is defined in a variables file or earlier in this file to avoid compilation errors.

font-size: 16px;
line-height: 18px;
font-weight: 700;
color: $main-text-color;

Choose a reason for hiding this comment

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

The variable $main-text-color is used here again, but it is not defined within this file. Ensure that $main-text-color is defined in a variables file or earlier in this file to avoid compilation errors.


&__button {
margin-top: 16px;
background-color: $main-button-color;

Choose a reason for hiding this comment

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

The variable $main-button-color is used here, but it is not defined within this file. Ensure that $main-button-color is defined in a variables file or earlier in this file to avoid compilation errors.

width: 166px;

text-transform: uppercase;
font-size: $font-size-base;

Choose a reason for hiding this comment

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

The variable $font-size-base is used here again, but it is not defined within this file. Ensure that $font-size-base is defined in a variables file or earlier in this file to avoid compilation errors.

}

&__button:active {
border: 1px solid $main-button-color;

Choose a reason for hiding this comment

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

The variable $main-button-color is used here again, but it is not defined within this file. Ensure that $main-button-color is defined in a variables file or earlier in this file to avoid compilation errors.

&__button:active {
border: 1px solid $main-button-color;
background-color: #fff;
color: $main-button-color;

Choose a reason for hiding this comment

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

The variable $main-button-color is used here again, but it is not defined within this file. Ensure that $main-button-color is defined in a variables file or earlier in this file to avoid compilation errors.

@BTakhaiev
Copy link
Author

❗️ Replace <your_account> with your GitHub username and copy the links to the Pull Request description:

❗️ Copy this Checklist to the Pull Request description after links, and put - [x] before each point after you checked it.

  • All components follow BEM and use SCSS
  • Repeated sizes and special colors are put to variables
  • Grid is used for the columns
  • Cards are shown in 1, 2, 3, or 4 columns based on screen resolution
  • All changes on :hover are smooth
  • 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.

Great progress! 🎉 Your code has significantly improved, addressing many of the previous issues. However, there are still some areas that need attention to ensure full compliance with the task requirements:

  1. BEM Methodology: Ensure all class names consistently follow BEM conventions, including correcting the spelling of container.

  2. Data Attributes: While the data-qa attribute is correctly added to the 'Buy' button, ensure all required elements have the appropriate data-qa attributes.

  3. Hover Effects: Apply smooth transitions (300ms) to all specified elements, including .card, .card__button, .card__header, and a elements.

  4. SCSS Variables: Define all used variables, such as $transition, $main-button-color, $font-size-base, $main-text-color, $second-text-color, and $card-padding, to avoid compilation errors.

Your efforts are commendable, and this approval is to help you move forward in your learning journey. Please review the comments to further refine your code. Keep up the great work and continue to learn from these experiences! 🚀

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

</nav>
</header>
</div>
<main class="container">

Choose a reason for hiding this comment

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

The class name container should be used instead of conteiner to adhere to proper spelling and BEM conventions. This was mentioned in the previous review and needs to be corrected.


<button
class="card__button"
data-qa="card-hover"

Choose a reason for hiding this comment

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

The data-qa attribute card-hover is correctly added to the 'Buy' button inside the first card. Ensure this is consistent with the task requirements.

background-color: #fff;
display: flex;
flex-direction: column;
padding: $card-padding;

Choose a reason for hiding this comment

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

The variable $card-padding is used here but is not defined anywhere in the SCSS files. This will lead to a compilation error. Please ensure that this variable is defined in a central variables file or earlier in the relevant SCSS files.

flex-direction: column;
padding: $card-padding;

transition: $transition;

Choose a reason for hiding this comment

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

The variable $transition is used here but is not defined. Ensure that it is defined to avoid compilation errors.

}

&__header {
font-size: $font-size-base;

Choose a reason for hiding this comment

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

The variable $font-size-base is used here but is not defined. Please define this variable to prevent compilation errors.

}
}

.card:hover {

Choose a reason for hiding this comment

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

The hover effect on the .card should include a smooth transition over 300ms as specified in the task requirements. Ensure that the transition is applied correctly.

transform: scale(120%);
}

.card:hover .card__header {

Choose a reason for hiding this comment

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

The hover effect on .card__header should include a smooth transition over 300ms. Ensure that the transition is applied correctly.

color: #34568b;
}

.card__button:hover {

Choose a reason for hiding this comment

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

The hover effect on .card__button should include a smooth transition over 300ms. Ensure that the transition is applied correctly.

a {
text-decoration: none;
color: #060b35;
transition: $transition;

Choose a reason for hiding this comment

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

The variable $transition is used here but is not defined. Ensure that it is defined to avoid compilation errors.

color: #00acdc;
}

a:hover {

Choose a reason for hiding this comment

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

The hover effect on the a elements should include a smooth transition over 300ms as specified in the task requirements. Ensure that the transition is applied correctly.

Copy link

@vadiimvooo vadiimvooo 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, but there are a few comments to fix. Please feel free to ask for help in fe_chat

align-items: center;
justify-content: center;
}
a {

Choose a reason for hiding this comment

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

use line-height for link to make height of header


.img {
display: block;
margin-left: 50px;

Choose a reason for hiding this comment

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

use padding: 0 50px on header instead of placing it in img or nav

Comment on lines +11 to +12
margin-top: 10px;
margin-bottom: 10px;

Choose a reason for hiding this comment

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

just use align-items center for header instead of hardcoding margins

align-items: center;
justify-content: center;
}
a {

Choose a reason for hiding this comment

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

use class selectors instead of tags

content: '';
position: absolute;
left: 0;
bottom: -22.5px;

Choose a reason for hiding this comment

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

you can set the value to 0 when you provide line-height for link

Comment on lines +8 to +13
.container {
display: grid;
grid-template-columns: repeat(1, 200px);
gap: 46px 48px;
padding: 40px 50px;
}

Choose a reason for hiding this comment

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

Suggested change
.container {
display: grid;
grid-template-columns: repeat(1, 200px);
gap: 46px 48px;
padding: 40px 50px;
}
.container {
display: grid;
grid-template-columns: repeat(1, 200px);
gap: 46px 48px;
padding: 40px 50px;
justify-content: center;
}

Choose a reason for hiding this comment

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

You have to center container

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