Skip to content

[ENG-1546] Relation creation via drag handles (Roam)#923

Open
trangdoan982 wants to merge 1 commit intomainfrom
eng-1546-implement-relation-creation-via-drag-handles-in-tldraw-roam
Open

[ENG-1546] Relation creation via drag handles (Roam)#923
trangdoan982 wants to merge 1 commit intomainfrom
eng-1546-implement-relation-creation-via-drag-handles-in-tldraw-roam

Conversation

@trangdoan982
Copy link
Copy Markdown
Member

@trangdoan982 trangdoan982 commented Mar 28, 2026

Summary

  • Adds drag handle dots on selected discourse nodes (4 edge midpoints) for creating relations by dragging to another node
  • Shows a relation type dropdown at the midpoint between source/target nodes after a successful drag
  • On type selection, creates the relation shape with correct type and bindings, and persists via handleCreateRelationsInRoam (supports both stored/reified relations and legacy triple-based approach)
  • Adapted from the Obsidian implementation ([ENG-1547] Relation creation via drag handle (Obsidian) #909) to fit Roam's per-relation-type shape architecture — uses SVG overlay line during drag instead of temporary tldraw shapes

Test plan

  • Select a single discourse node — 4 drag handle dots appear at edge midpoints
  • Drag from a handle to another discourse node — SVG line follows cursor, turns blue on hover over valid target
  • Release on a valid target — relation type dropdown appears at midpoint
  • Select a relation type — arrow shape created with correct color/label, relation persisted (check stored relations page or triple blocks)
  • Release on empty space — toast warning, no arrow created
  • Release on a node with no valid relation types — toast warning, no arrow created
  • Escape or click outside dropdown — dropdown dismissed, no arrow created
  • Handles reappear when selecting a different discourse node after any flow

🤖 Generated with Claude Code


Open with Devin

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@linear
Copy link
Copy Markdown

linear bot commented Mar 28, 2026

@supabase
Copy link
Copy Markdown

supabase bot commented Mar 28, 2026

This pull request has been ignored for the connected project zytfjzqyijgagqxrzbmz because there are no changes detected in packages/database/supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant