Implementation: How to fix broken drag-drop between palettes and canvas in u...
Documentation for Sessions
⚙️ Implementation: How to fix broken drag-drop between palettes and canvas in u...
📋 Decision Context
Question:
How to fix broken drag-drop between palettes and canvas in unified-builder?
Task: Fix drag-drop integration in unified-builder
🎯 Decision Made
Chosen:
Created UnifiedDragDropService as bridge between HTML5 native drag and Angular CDK
Options Considered:
- No alternatives documented
💭 Reasoning
Palettes used HTML5 native dragstart with dataTransfer.setData(), but canvas expected Angular CDK cdkDropList. Rather than rewrite all palettes to CDK (breaking change), created a bridge service that stores drag data in signals, allowing drop handlers to retrieve data regardless of drag source. Also added DroppableToolOperations interface for tools that want to handle drops.
📁 Files Involved
libs/libs-space/unified-builder/src/lib/services/unified-drag-drop.service.tslibs/libs-space/unified-builder/src/lib/components/unified-builder/unified-builder.component.tslibs/libs-space/unified-builder/src/lib/types/embeddable-tool.interface.ts
🔗 Related
- Decision ID:
dev_1768073217672_656alfl - Session: 35
- Workspace: editor2
Auto-generated by MCP Smart Consolidation