-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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 #5023
base: master
Are you sure you want to change the base?
add task solution #5023
Conversation
fwrwxx
commented
Nov 28, 2024
- DEMO LINK
- TEST REPORT LINK
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.
Thank you for your hard work on this project! There are a few critical issues that need to be addressed before we can approve the pull request. The use of an anchor tag inside a button element is not semantically correct and could lead to accessibility issues. Additionally, the SCSS file linking and BEM block requirements are not fully met, which are core requirements for the task. Please make these changes, and feel free to reach out if you need any help! 😊 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.
src/index.html
Outdated
<button | ||
class="buy-button" | ||
data-qa="hover" | ||
> | ||
<a | ||
href="#" | ||
data-qa="hover" | ||
> | ||
Buy | ||
</a> | ||
</button> |
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.
Using an anchor tag inside a button element is not semantically correct and can lead to accessibility issues. Consider using either a button element with a click event or an anchor tag styled as a button.
> | ||
<img | ||
class="img" | ||
src="./images/imac.jpeg" |
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.
Ensure that the image path './images/imac.jpeg' is correct and that the image file exists at the specified location.
src/styles/index.scss
Outdated
& .price { | ||
color: $secondary-color; | ||
font-size: 12px; | ||
margin: 0; | ||
} |
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.
Using the same class name 'price' for both the div and the paragraph can cause confusion and styling conflicts. Consider renaming one of these classes to avoid potential issues.
@@ -1,3 +1,127 @@ | |||
@import './variables'; |
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.
Ensure that the './variables' file exists and is correctly referenced. This is important for the SCSS to compile successfully.
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.
Thank you for your submission! 🎉 While your code is generally well-structured and demonstrates a good understanding of SCSS and HTML, there are a few areas that need attention:
-
Class Name Confusion: The use of the class name
price
for both a div and a paragraph could lead to confusion and styling issues. Consider using more specific class names to differentiate between the two elements. -
Typo in Class Name: The class name
discribe
appears to be a typo. Please correct it todescribe
to maintain consistency and avoid confusion. -
SCSS File Linking: Although the SCSS file is correctly linked due to the use of the Parcel library, remember that browsers do not understand SCSS directly. Ensure that the SCSS is compiled to a CSS file for broader compatibility.
-
BEM Block Requirements: The task requires separating BEM blocks
card
andstars
into individual files. This separation is crucial for maintaining a clean and organized codebase. -
Redundant Files: The presence of both
index.css
andindex.scss
files is unnecessary. Since SCSS is being used, consider removing the CSS file to avoid redundancy.
These points are crucial for the functionality and maintainability of your code. Please address them in future submissions to enhance your coding skills. Keep up the good work, and continue learning and improving! 🚀
✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨
src/index.html
Outdated
@@ -11,8 +11,59 @@ | |||
rel="stylesheet" | |||
href="./styles/index.scss" |
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 stylesheet is linked as an SCSS file. Browsers do not understand SCSS directly; it needs to be compiled to CSS first. Ensure that the SCSS is compiled to a CSS file and link that CSS file here.
src/index.html
Outdated
<div class="price"> | ||
<p class="price">Price:</p> |
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 class name 'price' is used for both the div and the paragraph. This can lead to confusion and potential styling issues. Consider using a more specific class name for the paragraph to differentiate it from the div.
src/styles/index.css
Outdated
height: 134px; | ||
} | ||
|
||
.discribe { |
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 class name 'discribe' appears to be a typo. Consider changing it to 'describe' to avoid confusion and maintain consistency.
src/styles/index.css
Outdated
.price { | ||
display: flex; | ||
align-items: center; | ||
justify-content: space-between; | ||
line-height: 18px; | ||
height: 18px; | ||
width: 100%; | ||
margin-bottom: 16px; | ||
margin-top: 24px; | ||
} | ||
|
||
.price .price { | ||
color: #616070; | ||
font-size: 12px; | ||
margin: 0; | ||
} |
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 class name 'price' is used for both a div and a paragraph, which can lead to confusion and potential styling issues. Consider using a more specific class name for the paragraph to differentiate it from the div.
src/styles/index.scss
Outdated
height: 134px; | ||
} | ||
|
||
.discribe { |
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 class name 'discribe' appears to be a typo. Consider changing it to 'describe' to avoid confusion and maintain consistency.
src/styles/index.scss
Outdated
.price { | ||
display: flex; | ||
align-items: center; | ||
justify-content: space-between; | ||
line-height: 18px; | ||
height: 18px; | ||
width: 100%; | ||
margin-bottom: 16px; | ||
margin-top: 24px; | ||
|
||
.price { | ||
color: $secondary-color; | ||
font-size: 12px; | ||
margin: 0; | ||
} |
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 class name 'price' is used for both a div and a paragraph, which can lead to confusion and potential styling issues. Consider using a more specific class name for the paragraph to differentiate it from the div.
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.
Good job.
Please check comments.
align-items: center; | ||
border: 1px solid $button-color; | ||
border-radius: 5px; | ||
width: 164px; |
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.
do not hardcode width in this case
width: 164px; | |
width: 100%; |
border: 1px solid $button-color; | ||
border-radius: 5px; | ||
width: 164px; | ||
height: 38px; |
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.
use paddings instead hardcoded height. vertical paddings + line-height + borders should make height 40px
<h3 class="describe"> | ||
APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A) | ||
</h3> | ||
<p class="code">Product code: 195434</p> |
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.
follow bem convention in class naming.
card__describe, card__code, card__img...
|
||
.card { | ||
width: 200px; | ||
height: 406px; |
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.
do not hardcode height. content card should make height for card.
check design. card should have border. total card width in design 200px, total height - 408px
height: 406px; |