Skip to content

Develop#5469

Open
yukie-kameoka wants to merge 5 commits into
mate-academy:masterfrom
yukie-kameoka:develop
Open

Develop#5469
yukie-kameoka wants to merge 5 commits into
mate-academy:masterfrom
yukie-kameoka:develop

Conversation

@yukie-kameoka

Copy link
Copy Markdown

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Review Summary

I am requesting changes because there are still a couple of critical mismatches with the task requirements that affect core functionality. First, the styles must be in src/styles/main.scss and linked from HTML as href="./styles/main.scss", but currently you’re using src/styles/index.scss and linking ./styles/index.scss, which directly contradicts the specification. Second, the hover behavior is incomplete: the cell does not move up by 20px via transform, and the transition is set to background-color 0.3s instead of animating all hover-related changes (color and transform) over 0.5s as required. To fix this, update .calendar__day so its transition covers both background-color and transform with 0.5s duration, and add transform: translateY(-20px); in the :hover rule along with the pink background and pointer cursor. Also, rename index.scss to main.scss and adjust the <link> in src/index.html accordingly. Once these are corrected, your solution should fully comply with the task and the checklist, as the rest of the calendar logic and layout are already implemented well.


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

Important

Fix the issues, commit the changes, and then re-request my review using the Re-request review button2 in the Reviewers tab.

Tip

If you have any comments about this review, please leave a message in the Add a comment section below and mention me with the @mateacademy-ai-mentor tag3.
I will read your message during my next review of your pull request. Please do not reply directly to my comments, as that feature is not supported yet.

Caution

Do not close the pull request until the review is complete. Closing it early can lead to unexpected behavior and disrupt the review process.

Footnotes

  1. Rate AI review example

  2. Re-request AI review example

  3. Add AI review comments example

Comment thread src/index.html Outdated
<link
rel="stylesheet"
href="styles/index.scss"
href="./styles/index.scss"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The description requires: "Write styles in src/styles/main.scss instead of src/style.css" and the SCSS can be linked directly. Here you're linking ./styles/index.scss and your styles file is index.scss, which violates that requirement. Consider renaming the file to main.scss and updating the href accordingly.

Comment thread src/styles/index.scss Outdated
mon: 0,
tue: 1,
wed: 2,
thu: 3,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The task requires writing styles in src/styles/main.scss and linking that file. Using href="./styles/index.scss" instead of main.scss does not match the description and needs to be updated.

Comment thread src/styles/index.scss Outdated

transition: background-color 0.3s;

&:hover {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hover behavior must also move the cell up by 20px using transform, and all hover changes must be animated with 0.5s duration. Currently you only change background color and do not use transform, so the hover effect is incomplete.

Comment thread src/styles/index.scss Outdated
font-family: Arial, sans-serif;
font-size: 30px;

transition: background-color 0.3s;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Transition is required to be 0.5s and to cover all hover-related changes (background color and transform). Here it’s only background-color 0.3s, which does not match the specified animation duration and doesn’t cover transform.

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Review Summary

I am requesting changes because the stylesheet wiring still violates a core, explicit requirement of the task and blocks proper completion. The instructions say that all styles must live in src/styles/main.scss and be linked from HTML as href="./styles/main.scss", but right now src/index.html still links ./styles/index.scss, and the full calendar implementation (variables, .calendar block, @for/@each logic, modifiers) is in index.scss instead of main.scss [CHECKLIST ITEM #1]. This means main.scss is only a partial fragment, and if the HTML were corrected to link it, the calendar layout would break, so the required main stylesheet is not actually usable.

Critical issues to fix:

  • In src/index.html, update the <link> tag to href="./styles/main.scss" (around the head section where the stylesheet is imported).
  • Move all calendar SCSS from src/styles/index.scss into src/styles/main.scss, including the variable definitions ($day-size, $gap, etc.), the .calendar block, the start-day and month-length modifiers, and the @for/@each loops, so main.scss becomes the single, complete stylesheet.
  • After moving the code, ensure index.scss is no longer used as the main stylesheet (you can delete it or leave it unused) and verify that changing calendar--start-day-* and calendar--month-length-* in HTML still correctly updates the layout via main.scss.

Functionally, your calendar behavior, hover effects, and SCSS/BEM usage are very good, so once you align the stylesheet file and link as required, your solution should be ready. Keep going—you’re close, and this restructuring will solidify your understanding of project setup and requirements compliance.


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

Important

Fix the issues, commit the changes, and then re-request my review using the Re-request review button2 in the Reviewers tab.

Tip

If you have any comments about this review, please leave a message in the Add a comment section below and mention me with the @mateacademy-ai-mentor tag3.
I will read your message during my next review of your pull request. Please do not reply directly to my comments, as that feature is not supported yet.

Caution

Do not close the pull request until the review is complete. Closing it early can lead to unexpected behavior and disrupt the review process.

Footnotes

  1. Rate AI review example

  2. Re-request AI review example

  3. Add AI review comments example

Comment thread src/index.html Outdated
<link
rel="stylesheet"
href="styles/index.scss"
href="./styles/index.scss"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This violates the description and previous high-priority requirement that styles must be written in src/styles/main.scss and linked from HTML using href="./styles/main.scss". Right now the page imports ./styles/index.scss, so main.scss is never used.

Comment thread src/styles/index.scss Outdated
mon: 0,
tue: 1,
wed: 2,
thu: 3,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The task requires linking the SCSS as href="./styles/main.scss" and using src/styles/main.scss as the main stylesheet, but this line still points to ./styles/index.scss. This violates the requirement to "Write styles in src/styles/main.scss instead of `src/style.css" and the previous High priority correction about the link href.

Comment thread src/styles/index.scss Outdated
Comment on lines 1 to 93
$day-size: 100px;
$gap: 1px;
$padding: 10px;
$border-size: 1px;
$columns: 7;
$day-color: #eee;
$border-color: #000;
$hover-color: #ffbfcb;
$week-days: (
mon: 0,
tue: 1,
wed: 2,
thu: 3,
fri: 4,
sat: 5,
sun: 6,
);

* {
box-sizing: border-box;
}

body {
margin: 0;

display: flex;
justify-content: center;
align-items: center;

height: 100vh;
}

.calendar {
display: flex;
flex-wrap: wrap;

gap: $gap;
padding: $padding;

width: calc(
#{$columns * $day-size} + #{($columns - 1) * $gap} + #{$padding * 2}
);

&__day {
position: relative;

display: flex;
justify-content: center;
align-items: center;

width: $day-size;
height: $day-size;

border: $border-size solid $border-color;

background-color: $day-color;

font-family: Arial, sans-serif;
font-size: 30px;

transition:
background-color 0.5s,
transform 0.5s;

&:hover {
cursor: pointer;
background-color: $hover-color;
transform: translateY(-20px);
}

@for $day from 1 through 31 {
&:nth-child(#{$day})::before {
content: '#{$day}';
}
}
}

@each $name, $offset in $week-days {
&--start-day-#{$name} {
.calendar__day:first-child {
margin-left: ($day-size + $gap) * $offset;
}
}
}

@for $days from 28 through 31 {
&--month-length-#{$days} {
.calendar__day:nth-child(n + #{$days + 1}) {
display: none;
}
}
}
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

All core calendar styles (variables, .calendar block, modifiers) are currently in index.scss, but the description requires using src/styles/main.scss as the stylesheet. You should move this entire stylesheet content into main.scss and then remove or stop using index.scss so that changing month-length and start-day via the modifiers works through the required file.

Comment thread src/styles/index.scss Outdated
Comment on lines +1 to +33
$day-size: 100px;
$gap: 1px;
$padding: 10px;
$border-size: 1px;
$columns: 7;
$day-color: #eee;
$border-color: #000;
$hover-color: #ffbfcb;
$week-days: (
mon: 0,
tue: 1,
wed: 2,
thu: 3,
fri: 4,
sat: 5,
sun: 6,
);

* {
box-sizing: border-box;
}

body {
margin: 0;

display: flex;
justify-content: center;
align-items: center;

height: 100vh;
}

.calendar {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This file only defines &__day without the surrounding .calendar block or any of the required variables, @each, and @for logic. Since main.scss is supposed to be the main stylesheet, it needs to contain the complete calendar styles currently in index.scss, not just this fragment.

Comment thread src/styles/main.scss Outdated

border: $border-size solid $border-color;

background-color: $day-color;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This violates the requirement: "Write styles in src/styles/main.scss instead of src/style.css" and the previous correction that the SCSS must be linked from HTML as href="./styles/main.scss". Right now the page still links ./styles/index.scss, so main.scss is not actually used.

Comment thread src/styles/main.scss Outdated
font-family: Arial, sans-serif;
font-size: 30px;

transition:

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Checklist item #1 says: "Changing 'month-lengh' and 'start-day' modifier in the code element reflects in changing calendar layout" via the required main stylesheet. At the moment this works only because index.scss contains the calendar logic, while main.scss is just a partial and not imported, which contradicts the requirement to use src/styles/main.scss as the main stylesheet.

Comment thread src/styles/main.scss Outdated
Comment on lines +1 to +33
&__day {
position: relative;

display: flex;
justify-content: center;
align-items: center;

width: $day-size;
height: $day-size;

border: $border-size solid $border-color;

background-color: $day-color;

font-family: Arial, sans-serif;
font-size: 30px;

transition:
background-color 0.5s,
transform 0.5s;

&:hover {
cursor: pointer;
background-color: $hover-color;
transform: translateY(-20px);
}

@for $day from 1 through 31 {
&:nth-child(#{$day})::before {
content: '#{$day}';
}
}
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This SCSS fragment is missing the surrounding .calendar block and all the variable definitions ($day-size, $gap, etc.), so if you switch the HTML to link main.scss as required, the code here will not work. Consider moving the full implementation from index.scss into main.scss so it becomes a complete, standalone stylesheet for the calendar.

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Review Summary

Your solution is approved — the calendar behaves correctly, looks as specified, and follows the SCSS/BEM requirements from the task. The calendar is centered, uses flex with a 1px gap, and has 31 .calendar__day elements with numbers added via ::before and an @for loop, which matches the functional requirements. You correctly implemented the calendar--start-day-* modifiers using @each and the calendar--month-length-* modifiers using @for, so changing these classes in the HTML cleanly adjusts the layout as required [CHECKLIST ITEM #1]. It’s also great that each day uses only the calendar__day class without extra modifiers, which follows the BEM constraints [CHECKLIST ITEM #2], and that you used variables instead of repeating pixel values.

There are no blocking issues in the provided files; the SCSS structure, hover effects (pointer, pink color, translateY(-20px), 0.5s transition), and width calculations all look solid. The remaining checks about overall BEM typical mistakes and global code style depend on the rest of the project, but nothing in these files suggests problems. Overall, this is a clean, requirement-compliant implementation—well done and keep building on this level of attention to detail.


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

Footnotes

  1. Rate AI review example

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