Skip to content

add task solution - #4228

Open
znaumova wants to merge 2 commits into
mate-academy:masterfrom
znaumova:develop
Open

add task solution#4228
znaumova wants to merge 2 commits into
mate-academy:masterfrom
znaumova:develop

Conversation

@znaumova

Copy link
Copy Markdown
  • DEMO LINK

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

  • [ x] Stopwatch is centered and has the correct arrows size

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

  • [ x] 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

The stopwatch hands start at the 3 o'clock position instead of the required 12 o'clock position. This is a core visual requirement that isn't met. The hands use rotate(0deg) which points to the right, but they should start pointing upward. To fix this, add transform: rotate(-90deg) to the stopwatch__hand element (or apply it to individual hand elements). Also, there's a typo in variables.scss where $secondsHAndColor should be $secondsHandColor (capital H).


✨ 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

@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’m requesting changes because several core requirements are missing in the provided CSS, which blocks the stopwatch from functioning as specified. While the HTML includes .stopwatch and the .stopwatch--speed-up modifier, there are no styles applying size, centering, border, hand dimensions/colors, or animations to .stopwatch, .stopwatch__hand--seconds, .stopwatch__hand--minutes, and .stopwatch__center-circle (see src/index.html comments). The hands also currently start at 3 o’clock since there is no base transform; per requirement, they must start at 12 o’clock (apply transform: rotate(-90deg) to the hands or offset the keyframes).

Critical issues to fix:

  • Implement .stopwatch layout: width/height 80vmin, center it on the page, and add a 1vmin dotted #000 circular border (stopwatch.scss).
  • Style hands: minutes hand 20vmin x 3vmin in #0700ff; seconds hand 38vmin x 1.5vmin in #2c8000; center circle 5vmin in #f6a603. Ensure proper transform-origin and initial top position.
  • Assign animations: seconds hand animation: rotate 60s linear infinite; minutes hand animation: rotate 60min steps(60) infinite. Use from/to keyframes with rotate as already defined.
  • Add modifier overrides for .stopwatch--speed-up to change durations to 10s and 10min.

Once these are added, your solution should fully meet the task specs. Good progress on having the keyframes and correct HTML classes—finish the CSS details to complete it.


✨ 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
@@ -1,5 +1,8 @@
<!doctype html>

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 keyframes implemented using from/to + transform with rotate property (checklist item). You do have a @keyframes rotate using from/to and rotate, but alone it's not enough — the stylesheet must apply separate animations to seconds and minutes hands with the required timing functions and durations. Currently there is no CSS targeting .stopwatch, .stopwatch__hand--seconds, .stopwatch__hand--minutes, or .stopwatch__center-circle, so the animations and styles are missing.

Comment thread src/index.html
<body>
<h1>Stop watch</h1>
<body class="page__body">
<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 includes .stopwatch stopwatch--speed-up which is required, but the implementation must also support the base case (60s / 60min) and the modifier must change durations to 10s / 10min. There is no CSS present to change animation durations based on .stopwatch--speed-up modifier — those rules are missing from the stylesheets.

Comment thread src/index.html
<body>
<h1>Stop watch</h1>
<body class="page__body">
<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.

Requirement: "Stopwatch must have a size of 80vmin x 80vmin, centered vertically and horizontally, and have a 1vmin dotted round border with #000 color." There is no CSS defining the .stopwatch block layout, size, centering, or border — these are missing and must be implemented in stopwatch.scss or similar.

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Requirement: "Minutes hand should have length 20vmin, width 3vmin, color #0700ff; Seconds hand length 38vmin, width 1.5vmin, color #2c8000; center circle diameter 5vmin color #f6a603." There is no CSS implementing these measurements or colors for .stopwatch__hand--minutes, .stopwatch__hand--seconds, or .stopwatch__center-circle.

Comment thread src/index.html
<!doctype html>
<html lang="en">
<html
lang="en"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Requirement: "The starting position of the hands should be at the top." In your keyframes you animate rotate(0deg) to rotate(360deg), but you must ensure the initial transform of the hand elements points to top (12 o'clock). Currently there is no base transform: rotate(-90deg) (or equivalent) applied to the hands, so by default rotate(0deg) will point to 3 o'clock — this violates the starting position requirement.

Comment thread src/styles/animation.scss
@@ -0,0 +1,9 @@
@keyframes rotate {

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 animation keyframes file is present but there is only a single generic @Keyframes rotate. You need two animation usages: one for seconds using linear timing and 60s (and 10s in speed-up), and one for minutes using steps(60) and 60min (and 10min in speed-up). Ensure you apply the same keyframes (rotate from 0 to 360) but different animation properties on .stopwatch__hand--seconds and .stopwatch__hand--minutes. Right now only the keyframes are declared; the elements don't have animation declarations anywhere.

Comment thread src/styles/animation.scss
@@ -0,0 +1,9 @@
@keyframes rotate {

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 project is missing the variables file import content (variables.scss) in the listed files — index.scss imports './variables' but that file's content wasn't provided. Ensure variables are defined and verify there's no typo like $secondsHAndColor vs $secondsHandColor (previous review noted such typo). If that typo exists in variables.scss it will break color usage. Double-check variable names and correct any capitalization mistakes.

Comment thread src/styles/index.scss
Comment on lines +1 to +3
@import './variables';
@import './animation';
@import './page';

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 keyframes currently animate from rotate(0deg) to rotate(360deg). Because rotate(0deg) points the hands to the right (3 o'clock), this violates the requirement: "The starting position of the hands should be at the top." Adjust the initial transform (for example by offsetting hand elements with transform: rotate(-90deg) or change keyframes to start from rotate(-90deg)).

Comment thread src/styles/index.scss
Comment on lines +1 to +4
@import './variables';
@import './animation';
@import './page';
@import './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 project is missing the SCSS that defines the stopwatch block and its elements (size 80vmin, centered on the page, 1vmin dotted border #000, hands lengths/widths/colors, center circle 5vmin orange, infinite animations with appropriate durations and step() for minutes). Implement these rules in src/styles/stopwatch.scss (or whichever file is imported) so all Core Functional Requirements are met.

Comment thread src/styles/index.scss
Comment on lines +1 to +4
@import './variables';
@import './animation';
@import './page';
@import './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 animation for the seconds hand must run with an even (linear) speed and take 60s per full circle; the minutes hand must use steps(60) and take 60min per full circle. Also create the BEM modifier .stopwatch--speed-up to change durations to 10s and 10min respectively. These animation rules are not present in the provided styles; please add them.

@brespect brespect 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.

Lgtm 🚀

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.

3 participants