Skip to content

Conversation

thetarnav
Copy link
Owner

Fixes #342
Fixes #339

Changes the algorithm for mapping elements in dom tree mode.

Before it mapped elements (the whole elements tree) before mapping children, and then children were checking if their elements already exit in parents tree, and appending themselves to that tree in place of found element and returning null from mapOwner function to not be added to the owner tree again.

The new algorithm maps the children normally before the elements, so now the elements are handled depth-first. Each owner traverses over the two trees—element and children—to find where in the element tree the children should be moved or if the elements can be safely pushed to the owner.children directly.

Copy link

changeset-bot bot commented Jun 17, 2025

🦋 Changeset detected

Latest commit: ea6c1c2

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 6 packages
Name Type
@solid-devtools/debugger Minor
@solid-devtools/extension Patch
@solid-devtools/frontend Patch
@solid-devtools/logger Patch
solid-devtools Patch
@solid-devtools/overlay Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@thetarnav thetarnav merged commit b61d074 into main Jun 17, 2025
5 checks passed
@github-actions github-actions bot mentioned this pull request Jun 17, 2025
@thetarnav thetarnav deleted the improve-dom-walker branch June 17, 2025 18:29
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.

Component elements are not updated when they are signals [bug] DOM children's descendants not mapped to correct owner
1 participant