Skip to content

Implement stopwatch animation#4173

Open
SShapovalov1 wants to merge 2 commits into
mate-academy:masterfrom
SShapovalov1:developer
Open

Implement stopwatch animation#4173
SShapovalov1 wants to merge 2 commits into
mate-academy:masterfrom
SShapovalov1:developer

Conversation

@SShapovalov1

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 is one checklist-related issue that conflicts with the BEM rules required for this task. Functionally, your stopwatch is implemented very well: the sizing, centering, colors, animations for seconds and minutes, and the stopwatch--speed-up behavior all match the specifications and work correctly. However, in src/styles/index.scss, the block modifier is currently written as a nested selector like &--speed-up inside .stopwatch (likely around the block where you define the custom properties / animation durations), which violates [CHECKLIST ITEM #3] about avoiding typical BEM mistakes.

To fix this, you should define the block modifier as a separate, top-level selector instead of nesting it, for example:

.stopwatch { ... }

.stopwatch--speed-up { ... }

This keeps block modifiers clearly separated from elements and matches the BEM theory used in the course. Once you move the modifier styles into a standalone .stopwatch--speed-up selector while preserving the same behavior (changing the durations via CSS variables or properties), your solution will align with both the functional requirements and the checklist. Overall, the implementation is strong; this is a structural BEM correction that will be valuable for future projects.


✨ 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/index.scss Outdated
border: $stopwatch-border-width dotted $stopwatch-border-color;
border-radius: $stopwatch-radius;

&--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.

This violates checklist item #3: "All Typical Mistakes from the BEM lesson theory are checked.". Block modifiers are expected to be declared as standalone selectors like .stopwatch--speed-up { ... } rather than nested as &--speed-up inside .stopwatch, to avoid mixing up block/element modifiers and to match the BEM theory used in the course.

@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 because it now fully matches the task description and checklist requirements. The stopwatch block is correctly centered on the page, has the specified circular size and dotted border, and both hands have the exact lengths, widths, and colors required. The second and minute hands start from the top, use only CSS animations, run infinitely, and their durations and timing functions are configured so seconds complete a turn in 60s and minutes in 60 minutes by default, with the seconds hand using linear and the minutes hand using steps(60). The stopwatch--speed-up modifier is implemented as a proper BEM modifier at the top level, correctly changing the shared duration variable so that seconds take 10s and minutes 10 minutes, and the HTML applies both stopwatch and stopwatch--speed-up classes as expected. Keyframes are implemented with from/to and transform: rotate(...), which aligns with the explicit checklist requirements. Overall, there are no remaining functional or structural blockers, and your implementation cleanly satisfies all core and technical constraints for this task—well done.


✨ 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