Skip to content

feat(editor): add internal object like drag and drop functionality#2878

Merged
caio-pizzol merged 12 commits intomainfrom
colep/sd-2192-feature-support-dragging-and-dropping-sdt-fields
May 7, 2026
Merged

feat(editor): add internal object like drag and drop functionality#2878
caio-pizzol merged 12 commits intomainfrom
colep/sd-2192-feature-support-dragging-and-dropping-sdt-fields

Conversation

@palmer-cl
Copy link
Copy Markdown
Collaborator

  • 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.
@linear
Copy link
Copy Markdown

linear Bot commented Apr 21, 2026

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

@harbournick harbournick requested a review from a team as a code owner April 30, 2026 18:08
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).
Copy link
Copy Markdown
Contributor

@caio-pizzol caio-pizzol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@palmer-cl palmer-cl force-pushed the colep/sd-2192-feature-support-dragging-and-dropping-sdt-fields branch from d209f39 to d654004 Compare May 6, 2026 17:56
@caio-pizzol
Copy link
Copy Markdown
Contributor

@palmer-cl re-request review once ready for a new round - thanks!

@palmer-cl
Copy link
Copy Markdown
Collaborator Author

@caio-pizzol this should be good now. Tests passing. Thanks for the review.

@palmer-cl palmer-cl requested a review from caio-pizzol May 7, 2026 03:45
Copy link
Copy Markdown
Contributor

@caio-pizzol caio-pizzol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hey @palmer-cl! thanks for addressing last round.

lgtm.

@caio-pizzol caio-pizzol merged commit 8786b70 into main May 7, 2026
64 checks passed
@caio-pizzol caio-pizzol deleted the colep/sd-2192-feature-support-dragging-and-dropping-sdt-fields branch May 7, 2026 14:28
@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented May 7, 2026

🎉 This PR is included in @superdoc-dev/mcp v0.3.0-next.65

The release is available on GitHub release

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented May 7, 2026

🎉 This PR is included in @superdoc-dev/react v1.2.0-next.107

The release is available on GitHub release

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented May 7, 2026

🎉 This PR is included in vscode-ext v2.3.0-next.109

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented May 7, 2026

🎉 This PR is included in superdoc-cli v0.8.0-next.81

The release is available on GitHub release

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented May 7, 2026

🎉 This PR is included in superdoc-sdk v1.8.0-next.63

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented May 7, 2026

🎉 This PR is included in superdoc v1.30.0-next.63

The release is available on GitHub release

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented May 7, 2026

🎉 This PR is included in superdoc-cli v0.9.0

The release is available on GitHub release

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented May 7, 2026

🎉 This PR is included in superdoc v1.32.0

The release is available on GitHub release

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented May 7, 2026

🎉 This PR is included in @superdoc-dev/mcp v0.4.0

The release is available on GitHub release

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented May 7, 2026

🎉 This PR is included in @superdoc-dev/react v1.3.0

The release is available on GitHub release

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented May 7, 2026

🎉 This PR is included in vscode-ext v2.4.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants