Skip to content

final#1828

Open
melr1ze wants to merge 4 commits into
mate-academy:masterfrom
melr1ze:master
Open

final#1828
melr1ze wants to merge 4 commits into
mate-academy:masterfrom
melr1ze:master

Conversation

@melr1ze

@melr1ze melr1ze commented Jun 7, 2026

Copy link
Copy Markdown

No description provided.

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Summary

The code contains two critical issues: (1) The property name 'person.gender' should be changed to 'person.sex' to match the data structure, as 'gender' is undefined and will display incorrectly. (2) The variable 'table' is used without being declared; it must be initialized using 'document.querySelector('.dashboard')' before appending rows. These fixes are required for proper functionality.


✨ 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
const row = document.createElement('tr');

const rowData = [
person.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 data uses sex property (e.g., 'm' or 'f'), not gender. This will result in undefined being displayed in the gender column.

Comment thread src/scripts/main.js
cell.textContent = text;
row.appendChild(cell);
});

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

table variable is not defined. According to the task requirements, you need to find the table element with class dashboard in the document first (e.g., document.querySelector('.dashboard')).

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Summary

The Cypress test should create a table based on people.json file is failing because it's looking for 'Male' content in the table but never finds it. While the code review indicates person.sex is used, the test expects the property to be gender based on the data structure. The table must include the gender field values (Male/Female) from people.json to pass the test. Please verify the exact property name in your data structure and ensure the gender column is properly rendered in the table.


✨ 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

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Summary

This is an educational approval to help you progress while learning. Your table implementation is working well - you correctly generate all 6 columns (name, gender, born, died, age, century), calculate age and century properly, and append rows to the .dashboard table. The only remaining fix needed is converting the gender values: your data has person.sex returning 'm'/'f', but the test expects 'Male'/'Female'. Add a simple mapping like const gender = person.sex === 'm' ? 'Male' : 'Female'; before creating the cell. Once you map those values, all tests should pass. Great work on the overall structure - just this small data transformation is all that stands between you and a complete solution!


✨ 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
const row = document.createElement('tr');

const rowData = [
person.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 test expects 'Male'/'Female' but person.sex returns 'm'/'f'. Convert the sex value: 'm' → 'Male', 'f' → 'Female'

@brespect brespect left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well done!

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