Skip to content

add a solution - #4219

Open
Maksyttaaa wants to merge 3 commits into
mate-academy:masterfrom
Maksyttaaa:develop
Open

add a solution#4219
Maksyttaaa wants to merge 3 commits into
mate-academy:masterfrom
Maksyttaaa:develop

Conversation

@Maksyttaaa

Copy link
Copy Markdown
  • DEMO LINK

  • Keyframes implemented using from/to + transform with rotate property

  • Stopwatch is centered and has the correct arrows size

  • All Typical Mistakes from the BEM lesson theory are checked.

  • Code follows all the Code Style Rules ❗️

@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 critical blockers that prevent meeting the task requirements.

  • The BEM modifier is applied to element classes (stopwatch__arrow-of-sec--speed-up, stopwatch__arrow-of-min--speed-up in index.html lines 28 and 31) instead of the block (.stopwatch--speed-up). Tests expect stopwatch--speed-up on the main .stopwatch element so mentors can toggle it; please add class="stopwatch stopwatch--speed-up" on the block and update SCSS selectors to adjust animation durations via .stopwatch--speed-up .stopwatch__arrow-of-sec and .stopwatch--speed-up .stopwatch__arrow-of-min.
  • The hands start at 0deg (pointing right) per utills.scss, but the requirement is to start at the top (12 o'clock). Update your keyframes to start at rotate(-90deg) (or rotate(270deg)) so the initial position is at 12 o’clock.
  • The CSS/SCSS must implement the required animations: seconds hand rotates continuously with 60s duration and linear timing; minutes hand uses steps(60) over 60min. Ensure these durations are overridden appropriately when .stopwatch--speed-up is present.
  • Verify the linked stylesheet filename in index.html (line 16): you reference ./styles/utills.scss. If the actual file is utils.scss, correct the link or filename to prevent styles from failing to load.
    Minor: once the block modifier is in place, remove redundant element-level --speed-up modifiers for clarity.
    Please address these items so the stopwatch renders correctly, starts at 12 o’clock, and the block-level BEM modifier controls the speed as required. Keep up the good work—your HTML structure is a solid start.

✨ 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/styles/utils.scss Outdated
Comment on lines +1 to +7
@keyframes rotate-arrows {
from {
transform: rotate(0deg);
}

to {
transform: rotate(360deg);

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 hands start at 0 degrees rotation which positions them at 3 o'clock (pointing right). The requirement states hands should start at the TOP (12 o'clock position). The keyframes need to start at -90deg or 270deg to position hands at the top.

Comment thread src/index.html Outdated
<body>
<h1>Stop watch</h1>
<main class="main">
<div class="stopwatch">

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 an element with the class stopwatch (present on line 25) — good. However the tests expect the BEM modifier to be applied to the stopwatch block itself (the description says: “Add the modifier to the stopwatch for tests”). Your code applies --speed-up modifiers to individual arrow elements instead of adding a modifier class like stopwatch--speed-up to the .stopwatch block. Please add a modifier class to the stopwatch element, for example class="stopwatch stopwatch--speed-up", so mentors/tests can toggle it as described.

Comment thread src/index.html Outdated
<title>Stop watch</title>
<link
rel="stylesheet"
href="./styles/utills.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 HTML links two SCSS files which is allowed in this task, but check the filename spelling: you linked ./styles/utills.scss on line 16. The more common spelling is utils.scss. If your actual file is named utills.scss then keep it, otherwise rename or correct the href to match your stylesheet filename. A mismatched filename will prevent styles/animations from loading and fail the task.

Comment thread src/index.html Outdated
Comment on lines +27 to +31
<div
class="stopwatch__arrow-of-sec stopwatch__arrow-of-sec--speed-up"
></div>
<div
class="stopwatch__arrow-of-min stopwatch__arrow-of-min--speed-up"

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 markup currently places modifier classes on the arrow elements: stopwatch__arrow-of-sec--speed-up and stopwatch__arrow-of-min--speed-up (lines 28 and 31). The checklist and description require a BEM modifier called speed-up for the stopwatch block itself. Please ensure you implement the block modifier stopwatch--speed-up on the main .stopwatch element rather than (or in addition to) modifiers on the elements, and implement CSS rules that change animation durations when that modifier is present.

@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 hands currently start at 3 o’clock instead of 12 o’clock, which violates the requirement that the starting position must be at the top. In src/styles/utils.scss, your @keyframes for rotation appear to go from rotate(0deg) to rotate(360deg), causing the incorrect initial orientation. Update the keyframes so they start at rotate(-90deg) and end at rotate(270deg) to align the initial position at 12 o’clock. Also ensure the block modifier .stopwatch--speed-up controls animation durations and avoid any element-level --speed-up modifiers in HTML/SCSS. Finally, verify the linked stylesheet filename in index.html matches the actual SCSS file so styles load correctly. Once the keyframes start angle is corrected and the block modifier governs timing, the implementation should meet the core requirements. Keep up the good work—most other specifications (durations, timing functions, BEM placement) look on track.


✨ 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/styles/utils.scss Outdated
Comment on lines +1 to +7
@keyframes rotate-arrows {
from {
transform: rotate(0deg);
}

to {
transform: rotate(360deg);

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 hands start at 0deg (pointing right/3 o'clock) but the requirement states: 'The starting position of the hands should be at the top.' Update the keyframes to start at rotate(-90deg) so the initial position is at 12 o'clock.

Comment thread src/index.html
<body>
<h1>Stop watch</h1>
<main class="main">
<div class="stopwatch stopwatch--speed-up">

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 HTML correctly includes the required block element stopwatch and the BEM block modifier stopwatch--speed-up on the main element (this is required for tests). Ensure you do not also apply --speed-up modifiers to element classes in your HTML or SCSS (e.g. stopwatch__arrow-of-sec--speed-up), because tests expect the block modifier to control animation durations.

@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

This is an educational approval to help you progress while learning. You've done excellent work with the keyframe rotation values - using rotate(-90deg) to rotate(270deg) correctly positions the hands at 12 o'clock. All the dimensions, colors, animation durations, and BEM structure are implemented correctly. There's one issue to be aware of: the mixin in src/styles/utils.scss uses transform-origin: left, but since your arrow elements are positioned with left: 50%, they should use transform-origin: right center to rotate from their base at the stopwatch center rather than their left edge. This is a common CSS gotcha with rotating positioned elements - changing this will make the hands sweep properly from their pivot point. Keep up the good work on the overall implementation!


✨ 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