-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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 calendar #4010
base: master
Are you sure you want to change the base?
add calendar #4010
Conversation
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:
-
SCSS Variables: It seems that several SCSS variables (
$day-color-hover
,$day-color
,$day-size
,$calendar-width
,$day-gap
) are used but not defined within the file or imported from a shared variables file. This can lead to compilation errors. Please ensure these variables are properly defined or imported. -
Stylesheet Link: The HTML file links directly to a
.scss
file. Browsers cannot interpret SCSS directly, so you need to compile it to a.css
file and update the link accordingly.
Once these issues are resolved, your code will be in great shape! Keep up the great 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.
src/index.html
Outdated
@@ -9,10 +9,42 @@ | |||
<title>Calendar</title> | |||
<link | |||
rel="stylesheet" | |||
href="styles/index.scss" | |||
href="styles/main.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 link is pointing to a .scss
file. Browsers do not directly support SCSS files; they need to be compiled to CSS first. Ensure that styles/main.scss
is compiled to a CSS file and update the link to point to the compiled CSS file, such as styles/main.css
.
.calendar { | ||
display: flex; | ||
flex-wrap: wrap; | ||
gap: $day-gap; |
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 variable $day-gap
is used here, but it's not defined within this file. Ensure that this variable is defined in a shared variables file or within this file to avoid compilation errors.
flex-wrap: wrap; | ||
gap: $day-gap; | ||
padding: 10px; | ||
width: $calendar-width; |
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 variable $calendar-width
is used here, but it's not defined within this file. Make sure this variable is defined elsewhere in your SCSS files to prevent compilation issues.
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
height: $day-size; |
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 variable $day-size
is used here, but it's not defined within this file. Ensure that this variable is defined in a shared variables file or within this file to avoid compilation errors.
height: $day-size; | ||
width: $day-size; | ||
border: 1px solid #000; | ||
background-color: $day-color; |
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 variable $day-color
is used here, but it's not defined within this file. Make sure this variable is defined elsewhere in your SCSS files to prevent compilation issues.
|
||
&:hover { | ||
cursor: pointer; | ||
background-color: $day-color-hover; |
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 variable $day-color-hover
is used here, but it's not defined within this file. Ensure that this variable is defined in a shared variables file or within this file to avoid compilation errors.
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.
Review Summary
Great job on addressing the issues from the previous review! 🎉 Your solution now meets the task requirements and constraints. Here are some key points to note:
-
SCSS Variables: You've successfully defined the necessary SCSS variables (
$day-color-hover
,$day-color
,$day-size
,$calendar-width
,$day-gap
) in thevariables.scss
file. This resolves the previous compilation errors related to undefined variables. -
Stylesheet Link: The HTML file correctly links to the
index.scss
file, which is acceptable since the Parcel library handles SCSS compilation. However, remember that browsers cannot interpret SCSS directly, so ensure that the compilation process is correctly set up.
Your code is well-structured and meets the specified requirements. While there were initial issues with undefined variables and the stylesheet link, you've addressed them effectively. Moving forward, always ensure that all variables are defined or imported correctly to avoid compilation errors. 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! ✨
@@ -12,7 +12,39 @@ | |||
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 link is pointing to an SCSS file (styles/index.scss
). Browsers cannot interpret SCSS directly. You need to compile this SCSS file to a CSS file and update the href
attribute to point to the compiled CSS file instead.
.calendar { | ||
display: flex; | ||
flex-wrap: wrap; | ||
gap: $day-gap; |
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 variable $day-gap
is used here but is not defined within this file. Ensure that it is defined or imported from another file to avoid compilation errors.
flex-wrap: wrap; | ||
gap: $day-gap; | ||
padding: 10px; | ||
width: $calendar-width; |
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 variable $calendar-width
is used here but is not defined within this file. Ensure that it is defined or imported from another file to avoid compilation errors.
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
height: $day-size; |
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 variable $day-size
is used here but is not defined within this file. Ensure that it is defined or imported from another file to avoid compilation errors.
height: $day-size; | ||
width: $day-size; | ||
border: 1px solid #000; | ||
background-color: $day-color; |
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 variable $day-color
is used here but is not defined within this file. Ensure that it is defined or imported from another file to avoid compilation errors.
|
||
&:hover { | ||
cursor: pointer; | ||
background-color: $day-color-hover; |
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 variable $day-color-hover
is used here but is not defined within this file. Ensure that it is defined or imported from another file to avoid compilation errors.
|
||
@each $week-day, $index in $week-days { | ||
.calendar--start-day-#{$week-day} :first-child { | ||
margin-left: $index * ($day-size + $day-gap); |
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 variable $day-size
is used here in a calculation but is not defined within this file. Ensure that it is defined or imported from another file to avoid compilation errors.
|
||
@each $week-day, $index in $week-days { | ||
.calendar--start-day-#{$week-day} :first-child { | ||
margin-left: $index * ($day-size + $day-gap); |
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 variable $day-gap
is used here in a calculation but is not defined within this file. Ensure that it is defined or imported from another file to avoid compilation errors.
DEMO LINK
TEST REPORT LINK
Changing 'month-lengh' and 'start-day' modifier in the code element
reflects in changing calendar layout
Each day has no modifiers, only class (eg. calendar__day)
All
Typical Mistakes
fromBEM
lesson theory are checked.Code follows all the Code Style Rules ❗️