LearnNewsExamplesServices
Frontmatter
id8612
titleUpdate DeltaUpdates.insertNode to support Fragments
stateClosed
labels
enhancementaicore
assigneestobiu
createdAtJan 13, 2026, 7:54 PM
updatedAtJan 13, 2026, 8:13 PM
githubUrlhttps://github.com/neomjs/neo/issues/8612
authortobiu
commentsCount1
parentIssue8601
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtJan 13, 2026, 8:13 PM

Update DeltaUpdates.insertNode to support Fragments

Closed v11.21.0 enhancementaicore
tobiu
tobiu commented on Jan 13, 2026, 7:54 PM

Update Neo.main.DeltaUpdates.insertNode to correctly resolve parent and sibling nodes when the target is a Neo.container.Fragment.

Changes:

  1. Check if parentNode is null (logical parent).
  2. If null, use getFragmentStart(parentId) to find the anchor.
  3. Resolve parentNode from the anchor.
  4. Resolve siblingRef using getFragmentSibling(startNode, index).
  5. Ensure postMountUpdates are handled correctly for the new node.
tobiu added the enhancement label on Jan 13, 2026, 7:54 PM
tobiu added the ai label on Jan 13, 2026, 7:54 PM
tobiu added the core label on Jan 13, 2026, 7:54 PM
tobiu assigned to @tobiu on Jan 13, 2026, 8:05 PM
tobiu added parent issue #8601 on Jan 13, 2026, 8:05 PM
tobiu referenced in commit 9ede200 - "feat: Update DeltaUpdates.insertNode to support Fragments (#8612)" on Jan 13, 2026, 8:12 PM
tobiu
tobiu Jan 13, 2026, 8:12 PM

Input from Gemini 3 Pro:

✦ Updated insertNode to support Fragments.

  • Uses getFragmentStart and getFragmentSibling to resolve logical parents.
  • Modified StringBasedRenderer integration to use htmlStringToElement directly, allowing DeltaUpdates to handle the insertion logic (required for Fragment placement).
  • Verified with FragmentDomInsert.spec.mjs.
tobiu closed this issue on Jan 13, 2026, 8:13 PM