Skip to content

add task solution#1853

Open
Alternate001 wants to merge 3 commits intomate-academy:masterfrom
Alternate001:develop
Open

add task solution#1853
Alternate001 wants to merge 3 commits intomate-academy:masterfrom
Alternate001:develop

Conversation

@Alternate001
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

Great effort on this task! Your solution is very close, but it needs a couple of adjustments to meet all the requirements.

  • Selector Specificity: The script currently selects all <input> elements on the page using document.querySelectorAll('input'). The requirement is to only select inputs that are descendants of the <form> tag. Please update your selector to be more specific.
  • Label Text Formatting: The labels are being created with uppercase text (e.g., EMAIL), but the task's example shows capitalized text (e.g., Email). Please ensure the label's text case matches the example.

After you've made these changes, the solution should be ready. Keep up the good work!


✨ 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.

According to the task description, you should get all input elements from the form tag. This selector will get all input elements on the entire page, which might not be what is intended. Consider making the selector more specific.

Comment thread src/scripts/main.js Outdated
label.setAttribute('for', input.id);
input.placeholder = input.name[0].toLocaleUpperCase() + input.name.slice(1);
input.parentElement.append(label);
label.textContent = input.name.toLocaleUpperCase();
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's expected result image shows capitalized labels (e.g., "Email"), not fully uppercase ones (e.g., "EMAIL"). The textContent for the label should probably have the same capitalization as the placeholder.

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

Great job addressing the selector issue from the previous review! Your solution is very close to meeting all the requirements.

There's just one detail to fix before this can be approved. The textContent for the generated labels is lowercase (e.g., email), but the task requires it to be capitalized (e.g., Email) to match the example image.

You can resolve this by applying the same capitalization logic you've already used for the placeholder text to the label's text as well. Once that's done, this will be perfect!


✨ 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
label.setAttribute('for', input.id);
input.placeholder = input.name[0].toLocaleUpperCase() + input.name.slice(1);
input.parentElement.append(label);
label.textContent = input.name;
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 label's text should be capitalized, just like the placeholder. Currently, it's being set to the lowercase name attribute (e.g., 'email'). According to the requirements and the example image, it should be capitalized (e.g., 'Email').

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

Excellent work! You've successfully addressed the feedback from the previous review by capitalizing the label text. The code is now clean, correct, and perfectly meets all the requirements. I am happy to approve this submission. Keep up the great work!


✨ 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

@etojeDenys etojeDenys left a comment

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