fix(ilha): fix listed item morphing#68
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (12)
📝 WalkthroughWalkthroughThis PR reworks keyed DOM reconciliation and input property syncing in the ilha morph engine, adds ChangesKeyed Morph and JSX Data-Key Stamping
Estimated code review effort: 3 (Moderate) | ~30 minutes Dependency Version Bumps
Estimated code review effort: 1 (Trivial) | ~5 minutes Sequence Diagram(s)sequenceDiagram
participant jsx
participant renderJsxElement
participant injectDataKey
participant morphChildren
participant fromKeyed
jsx->>jsx: extract slotKey from props
jsx->>renderJsxElement: render element with slotKey
renderJsxElement->>injectDataKey: stamp data-key into root tag
injectDataKey-->>renderJsxElement: RawHtml with data-key
Note over morphChildren,fromKeyed: On next render/morph
morphChildren->>morphChildren: compute toKey for each toNode
morphChildren->>fromKeyed: lookup survivor by toKey
fromKeyed-->>morphChildren: matched element (or none)
alt current fromNode belongs to a different surviving key
morphChildren->>morphChildren: clone and insert toNode
else
morphChildren->>morphChildren: move matched element into position
end
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning Review ran into problems🔥 ProblemsGit: Failed to clone repository. Please run the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary by CodeRabbit
New Features
data-keyattributes, improving list stability and component identity during reordering.Bug Fixes
Chores