add task solution - #1881
add task solution#1881devsync25 wants to merge 3 commits into
Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
The implementation correctly generates table rows with all 6 required cells and properly calculates derived values (age and century). However, the code violates a core task requirement by defining the people array inline instead of importing it from people.json as specified in the task description. This means the data source is hardcoded rather than loaded from the external JSON file. To fix this, replace the inline array definition with a fetch or import statement to load the data from people.json, then use that imported data in your rendering logic.
✨ 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
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
The Cypress test should create a table based on people.json file is failing because it cannot find the content 'Carolus Haverbeke' in table rows (<tr>). This indicates the table generation from JSON data is not working correctly. While the code review mentions fetch('./people.json') is used, the asynchronous nature of fetch() may be causing the data to not load before the test assertion runs. Consider ensuring the table is populated properly - you may need to verify the fetch promise is being handled correctly, or ensure data is available before the test checks for it. The test timeout of 4000ms suggests the DOM manipulation isn't happening in time. Fix the table generation logic to ensure rows are created and populated with people data before the test assertion executes.
✨ 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
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Your solution is approved. The implementation correctly creates all 6 table cells (name, gender, born, died, age, century) for each person, properly calculates age as died - born and century using Math.ceil(died / 100), and successfully appends rows to the dashboard table. The synchronous approach is a smart choice that avoids async timing issues. Great work!
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
DEMO LINK