feat(editor): add internal object like drag and drop functionality#2878
Conversation
palmer-cl
commented
Apr 21, 2026
- Added internal drag-and-drop support for structured content and existing rendered images
- Added post-paint interaction layers and editor styling so rendered SDTs and images become draggable in the DOM.
- Creates a shared SDT identifier module
- Expanded automated coverage for the new behavior.
…nt resolution - Added internal node move logic to handle drag-and-drop operations for nodes within the editor. - Introduced structured content resolution helpers to find structured content blocks and inlines by position and ID. - Enhanced EditorInputManager to utilize new structured content resolution methods for better drag-and-drop handling. - Created comprehensive tests for drag-and-drop behavior involving existing images and structured content. - Implemented helper functions for simulating drag-and-drop events in tests.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 852fbe08bd
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
…ropping-sdt-fields
…ropping-sdt-fields
Five tests pinned to behavior the review flagged. Four fail today and serve as acceptance criteria; one passes and proves production wiring works. - StructuredContentInteractionLayer: locked SDTs (sdtLocked / contentLocked) should not be marked draggable (currently are). - StructuredContentInteractionLayer: block SDT labels for table-wrapped containers should be marked draggable. The painter only sets data-pm-start/data-pm-end on paragraph fragments, so the layer's guard refuses to mark table-wrapped SDTs. - DragDropManager: internal-object drop should reject foreign payloads (no local dragstart) to prevent cross-editor / external-page drops from driving moves. - DragDropManager: internal-object drop should reject payloads whose lockMode is not 'unlocked'. - behavior: production layer marks the SDT block/inline label as a drag source after paint without the test priming the container manually. - behavior: same coverage for table-wrapped block SDTs (fails today).
caio-pizzol
left a comment
There was a problem hiding this comment.
hey @palmer-cl! the layered design reads cleanly :)
i pushed 6b0358574 with seven tests. five fail as acceptance criteria, two pass and show the prime helper in the SDT behavior tests is redundant - production already marks the label draggable. worth dragging the label directly instead of priming the container.
three things inline. needs work.
d209f39 to
d654004
Compare
|
@palmer-cl re-request review once ready for a new round - thanks! |
|
@caio-pizzol this should be good now. Tests passing. Thanks for the review. |
caio-pizzol
left a comment
There was a problem hiding this comment.
hey @palmer-cl! thanks for addressing last round.
lgtm.
|
🎉 This PR is included in @superdoc-dev/mcp v0.3.0-next.65 The release is available on GitHub release |
|
🎉 This PR is included in @superdoc-dev/react v1.2.0-next.107 The release is available on GitHub release |
|
🎉 This PR is included in vscode-ext v2.3.0-next.109 |
|
🎉 This PR is included in superdoc-cli v0.8.0-next.81 The release is available on GitHub release |
|
🎉 This PR is included in superdoc-sdk v1.8.0-next.63 |
|
🎉 This PR is included in superdoc v1.30.0-next.63 The release is available on GitHub release |
|
🎉 This PR is included in superdoc-cli v0.9.0 The release is available on GitHub release |
|
🎉 This PR is included in superdoc v1.32.0 The release is available on GitHub release |
|
🎉 This PR is included in @superdoc-dev/mcp v0.4.0 The release is available on GitHub release |
|
🎉 This PR is included in @superdoc-dev/react v1.3.0 The release is available on GitHub release |
|
🎉 This PR is included in vscode-ext v2.4.0 |