Skip to content

Develop#1876

Open
PAVLO111 wants to merge 4 commits into
mate-academy:masterfrom
PAVLO111:develop
Open

Develop#1876
PAVLO111 wants to merge 4 commits into
mate-academy:masterfrom
PAVLO111:develop

Conversation

@PAVLO111
Copy link
Copy Markdown

@PAVLO111 PAVLO111 commented May 6, 2026

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 has a critical issue that must be fixed. The task requires appending label elements to the parent container of the input, but on line 19 you're using el.before(label), which inserts the label as a sibling element before the input rather than as a child of its parent container. This will cause test failures because the DOM structure doesn't match the requirement. To fix this, change el.before(label) to el.parentElement.append(label) or el.parentNode.appendChild(label). The rest of your implementation looks good—you've correctly created labels with proper attributes and capitalized placeholders.


✨ 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

el.placeholder = formattedName;

el.before(label);
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 description requires 'Append label elements to the parent container of the input'. Using el.before(label) inserts the label as a sibling before the input, not as a child of the parent container. Consider using el.parentElement.appendChild(label) to properly append the label to the parent container.

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 is approved. The critical issue has been resolved - labels are now correctly appended as children of the parent container using el.parentElement.append(label) instead of being inserted as sibling elements. All functional requirements are met: inputs are queried from the page, labels have the correct field-label class and for attribute matching the input id, textContent uses the input name, placeholders are properly capitalized, and labels are appended to the correct parent elements. Great work fixing that positioning issue!


✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨

Footnotes

  1. Rate AI review example

@PAVLO111
Copy link
Copy Markdown
Author

PAVLO111 commented May 6, 2026

Why does almost every project in the DOM module trigger a merge conflict when creating a Pull Request? In previous modules, everything merged automatically. Is this a deliberate part of the curriculum designed to teach us how to handle such situations in real-world scenarios?

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