Skip to content

add task solution#1797

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

add task solution#1797
timurradkevic wants to merge 3 commits intomate-academy:masterfrom
timurradkevic:develop

Conversation

@timurradkevic
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 work on the core logic! Your calculations for age and century are spot on. I'm requesting a couple of small changes to fully align with the task requirements. First, the gender column should display 'm' and 'f' to match the reference image; you can achieve this by using the person.sex value directly. Second, please use the more specific selector document.querySelector('.dashboard') to find the table, as required by the task description. Once you make these adjustments, your solution will be ready for approval!


✨ 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
console.log(people); // you can remove it

// write your code here
const table = document.querySelector('table');
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 find the table by its class, which is dashboard. While document.querySelector('table') might work in this case, it's not as specific as required. It's good practice to use the most specific selector available, like document.querySelector('.dashboard').

Comment thread src/scripts/main.js
Comment on lines +373 to +377
if (person.sex === 'm') {
tdGender.textContent = 'Male';
} else {
tdGender.textContent = 'Female';
}
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 logic for displaying the gender is almost there. However, one of the core requirements is to match the final visual output with the reference image. The reference image shows 'm' and 'f' for the gender column, not 'Male' and 'Female'. You can simplify this block by directly assigning person.sex to the textContent.

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

Hello! While your code is very well-structured and correctly implements most of the logic, a change is needed to pass the automated tests. The build is failing because an integration test expects the gender to be displayed as a full word, like Male, but it seems your code is currently displaying it as a single character (m or f). The specific error is: AssertionError: Expected to find content: 'Male' within the element: <tr> ... but never did. Please update your logic to map the 'm' and 'f' values to their full string representations in the table cells. You're almost there!


✨ 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

Excellent work on this task! I'm happy to approve your solution. You've done a great job addressing the feedback from the previous review. The gender values are now correctly mapped to 'Male' and 'Female', and all the required columns, including the calculated 'age' and 'century', are displayed perfectly. Your code is clean, well-structured, and meets all the requirements. Keep up the fantastic 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