Skip to content

add task solution#1811

Closed
zubchenko-maksym wants to merge 2 commits into
mate-academy:masterfrom
zubchenko-maksym:develop
Closed

add task solution#1811
zubchenko-maksym wants to merge 2 commits into
mate-academy:masterfrom
zubchenko-maksym:develop

Conversation

@zubchenko-maksym
Copy link
Copy Markdown

Copy link
Copy Markdown

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

Choose a reason for hiding this comment

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

Review Summary

Your implementation correctly creates the notification structure with proper elements and timing logic, but there's a critical requirement violation: you're using opacity: '0' to hide notifications instead of the required display or visibility properties. The task explicitly requires using style attributes to hide messages, not opacity transitions. With opacity: '0', the element remains in the DOM flow and still occupies space, which doesn't properly hide it. Please change the hiding logic to use div.style.display = 'none' or div.style.visibility = 'hidden' instead. This is the only blocker in an otherwise correct implementation.


✨ 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/scripts/main.js Outdated
Comment on lines +21 to +22
setTimeout(() => {
div.style.opacity = '0';
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 code sets opacity: '0' which only makes the element invisible but doesn't hide it from the document flow. Per the requirements, you must use display: 'none' or visibility: 'hidden' to properly hide the notification element.

Copy link
Copy Markdown

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

Choose a reason for hiding this comment

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

Review Summary

Your implementation meets all requirements. The pushNotification function correctly creates notification elements with the proper structure (div with 'notification' class and type class, h2 with 'title' class, and p for description), positions them using style attributes, and hides them after 2 seconds using setTimeout with display: 'none'. All three notification types (success, error, warning) are properly implemented and called. The previous issue with opacity has been correctly resolved to use display: 'none' as specified. Great work!


✨ 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