Skip to content

add task solution#1884

Open
illyaSmyk wants to merge 3 commits into
mate-academy:masterfrom
illyaSmyk:develop
Open

add task solution#1884
illyaSmyk wants to merge 3 commits into
mate-academy:masterfrom
illyaSmyk:develop

Conversation

@illyaSmyk
Copy link
Copy Markdown

No description provided.

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

This solution has two critical issues that directly violate explicit task requirements. First, the code uses document.querySelectorAll('input') instead of scoping the selection to the form element as the task explicitly requires getting inputs FROM the form tag - this would affect any inputs outside the form. Second, the label insertion uses input.before(label) which adds it as a sibling before the input, but the task explicitly requires appending the label to the parent container using input.parentElement.append(label). Both issues are violations of explicit requirements in the task description, not stylistic preferences. Please fix both the input selection scope and the label insertion method to match the task specifications.


✨ 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
'use strict';

// write code here
const inputs = [...document.querySelectorAll('input')];
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 getting inputs FROM the form tag, but this selects all inputs in the document. Use document.querySelector('form').querySelectorAll('input') or document.querySelectorAll('form input') to scope the selection to the form.

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 handles the Sign Up form, but the Sign In form is missing the required labels and placeholders. Four tests are failing:

  1. #sign-in-email input is missing a placeholder attribute
  2. #sign-in-password input is missing a placeholder attribute
  3. No <label> element exists for the email input
  4. No <label> element exists for the password input

You need to add to the Sign In form in src/index.html:

  • A <label for="sign-in-email">Email</label> with class field-label
  • A <label for="sign-in-password">Password</label> with class field-label
  • Placeholder text "Email" on the email input
  • Placeholder text "Password" on the password input

The label and placeholder text should be properly capitalized (first letter uppercase). Once you apply the same pattern you used for the Sign Up form inputs to these Sign In form inputs, all tests should pass.


✨ 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

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 solution is approved and ready to move forward! All checklist requirements are satisfied. Great work implementing this dynamic form enhancement!


✨ 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