add task solution 1#1808
Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Your implementation has critical violations of the task requirements that are causing test failures. The task explicitly states not to remove elements from the DOM — instead of notification.remove(), you must use notification.style.display = 'none' to hide messages visually. Additionally, the title element must be an h2 with class title, but your code currently uses an h3 without the required class. The tests are failing because the notification elements aren't being created with the expected structure (.notification.{type} with an h2.title inside). Please fix these core issues: replace the DOM removal with style-based hiding and correct the title element to be an h2 with class title.
✨ 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
| setTimeout(() => { | ||
| notification.remove(); |
There was a problem hiding this comment.
The task explicitly states: 'Important: Do not remove elements from the DOM in this task; instead, use style attributes just to hide messages visually'. Use notification.style.display = 'none' instead of notification.remove()
| notification.style.top = `${posTop}px`; | ||
| notification.style.right = `${posRight}px`; | ||
|
|
||
| const titleElement = document.createElement('h3'); |
There was a problem hiding this comment.
The task requires the title element to be an h2 with class title (prefer h2 element). Currently using h3 without the title class
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Your implementation meets all task requirements correctly. The pushNotification function properly creates notification elements with the required structure (.notification.{type} with h2.title and p), positions them using coordinates, and hides them after 2 seconds using style-based hiding (display: 'none'). All three notification types (success, error, warning) are generated at different positions as specified. The CI build failure you encountered was a transient network issue (ECONNRESET) during npm install - this is not related to your code. You can re-run the workflow to verify the build passes.
✨ 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
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Sorry, the pull request review was unsuccessful for the following reasons:
Warning
No changes were made in the pull request since the last review. Please make sure that you have added files to the pull request and committed the changes.
[CODE: NCM]
If the issue is within your control, please address it.
The next review attempt will automatically launch in about 1 hour.
If you believe this is an error or need assistance, please contact the support team.
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Sorry, the pull request review was unsuccessful for the following reasons:
Warning
No changes were made in the pull request since the last review. Please make sure that you have added files to the pull request and committed the changes.
[CODE: NCM]
If the issue is within your control, please address it.
The next review attempt will automatically launch in about 1 hour.
If you believe this is an error or need assistance, please contact the support team.
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Sorry, the pull request review was unsuccessful for the following reasons:
Warning
No changes were made in the pull request since the last review. Please make sure that you have added files to the pull request and committed the changes.
[CODE: NCM]
If the issue is within your control, please address it.
The next review attempt will automatically launch in about 1 hour.
If you believe this is an error or need assistance, please contact the support team.
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Sorry, the pull request review was unsuccessful for the following reasons:
Warning
No changes were made in the pull request since the last review. Please make sure that you have added files to the pull request and committed the changes.
[CODE: NCM]
If the issue is within your control, please address it.
The next review attempt will automatically launch in about 1 hour.
If you believe this is an error or need assistance, please contact the support team.
brespect
left a comment
There was a problem hiding this comment.
Good job, but don't forget to add your DEMO LINK to the PR description next time ;)
No description provided.