Skip to content

added a solution#1752

Open
Inna-code10 wants to merge 2 commits into
mate-academy:masterfrom
Inna-code10:develop
Open

added a solution#1752
Inna-code10 wants to merge 2 commits into
mate-academy:masterfrom
Inna-code10:develop

Conversation

@Inna-code10
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

Your createTree function is correctly implemented for building nested structures, but the Cypress tests are failing with TypeError: Cannot read properties of null (reading 'appendChild') at line 21. This indicates the DOM element being passed to createTree is null. The root cause is missing infrastructure: there's no index.html file with the element ID that your tests (or demo code) expects to find via getElementById. You need to add an HTML file containing a container element (e.g., <div id="tree"></div>) that your code targets. Additionally, the project is missing package.json, SCSS files, and Parcel configuration needed for GitHub Pages deployment. These are critical blockers since the functionality works correctly in isolation but fails in the testing/deployment environment. Please add the missing project infrastructure files and ensure the target DOM element exists in your HTML.


✨ 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 implementation of the createTree(element, data) function correctly fulfills all task requirements. The function properly accepts a DOM container element and nested object, builds the nested ul/li structure using recursion via the buildTree() helper, and correctly uses object keys as list items with li.textContent = key. The HTML infrastructure with the #tree container is in place and working. The missing package.json and SCSS files mentioned in the review are infrastructure configuration files rather than functional code issues—they don't block the core task functionality you've implemented. The demo link formatting issue with the extra leading slash is minor and doesn't affect the actual code submission. Checklist items confirmed: - createTree(element, data) function created - Nested ul/li structure built from nested object - Object keys used as list items - Recursion implemented for arbitrary nesting depth


✨ 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