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 again #4980

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

RHerheman
Copy link

  • DEMO LINK

  • TEST REPORT LINK

  • [x ] All components follow BEM and use SCSS

  • [x ] Repeated sizes and special colors are put to variables

  • Grid is used for the columns

  • [x ] Cards are shown in 1, 2, 3, or 4 columns based on screen resolution

  • [x ] All changes on :hover are smooth

  • [x ] 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.


Your submission has been reviewed and approved! 🎉 While there are a few areas for improvement, you've done a great job overall. Here are some key points to consider for future enhancements:

  1. Data Attributes: Ensure the data-qa attribute for the "Buy" button is corrected to data-qa="card-hover".

  2. SCSS Variables: Make sure all repeated sizes and special colors are defined in variables for better maintainability.

  3. Hover Effects: Verify that all specified hover effects are applied correctly, such as changing the card title text color and button background.

  4. Responsive Design: Consider using relative units or media queries for elements like line-height, logo positioning, and container dimensions to improve responsiveness.

  5. Dynamic Content: For repeated elements like product names, prices, and star ratings, consider using a dynamic approach to avoid hardcoding and make updates easier.

  6. Background and Transform Properties: Use relative units or media queries for background properties and consider a smaller scale value for transforms to maintain layout integrity.

These improvements will help you create more flexible and maintainable code. Keep up the great work and continue learning from these experiences! 🚀

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

Comment on lines +113 to +114
<h2 class="card__apple">
APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A)

Choose a reason for hiding this comment

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

The product name is hardcoded in multiple places. Consider using a templating engine or JavaScript to dynamically generate these elements to avoid repetition and make updates easier.

APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A)
</h2>

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

Choose a reason for hiding this comment

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

The product code is repeated across multiple cards. If these are meant to be different products, ensure each card has unique content.

Comment on lines +119 to +125
<div class="stars stars--4">
<div class="stars__image"></div>
<div class="stars__image"></div>
<div class="stars__image"></div>
<div class="stars__image"></div>
<div class="stars__image"></div>
<div class="stars__text">Reviews: 5</div>

Choose a reason for hiding this comment

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

The star rating is hardcoded as 'stars--4' and 'Reviews: 5' across all cards. If these are meant to represent different products, consider making these values dynamic.

Comment on lines +128 to +130
<div class="card__price">
<p class="card__price_text">Price:</p>
<p class="card__price_amount">$2,199</p>

Choose a reason for hiding this comment

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

The price is hardcoded as '$2,199' across all cards. If these are meant to represent different products, ensure each card has a unique price.

Comment on lines +134 to +138
<button
class="card__button card__button--text"
data-qa="card-hover"
>
BUY

Choose a reason for hiding this comment

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

The 'BUY' button is repeated across all cards. Consider using a loop or a component-based approach to generate these cards dynamically if the content is similar.

@@ -0,0 +1,65 @@
.header {
$blue: #00acdc;

Choose a reason for hiding this comment

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

The $blue variable is defined within the .header scope. If this color is used across multiple components, consider moving it to a global variables file for better maintainability.

Comment on lines +13 to +16
position: absolute;
margin: 0 auto;
top: 10px;
left: 50px;

Choose a reason for hiding this comment

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

The logo is positioned absolutely with fixed values for top and left. This might cause issues on smaller screens or when the layout changes. Consider using relative positioning or media queries to ensure the logo is positioned correctly across different screen sizes.


&__link {
display: block;
line-height: 60px;

Choose a reason for hiding this comment

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

The line-height is set to 60px, which might be too large for smaller screens. Consider using relative units or media queries to adjust the line-height for better responsiveness.

line-height: 16px;
padding: 16px 16px 0;

&--4 :nth-child(-n + 4) {

Choose a reason for hiding this comment

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

The selector '&--4 :nth-child(-n + 4)' is used to apply styles to the first four children. Ensure that this selector matches the intended HTML structure, as it might not work as expected if the number of children changes.

padding: 16px 16px 0;

&--4 :nth-child(-n + 4) {
background-image: url(../images/star-active.svg);

Choose a reason for hiding this comment

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

The background image URL is hardcoded. If the image is meant to be dynamic or changeable, consider using a variable or a mixin to handle different images.

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