improvement(add-block): intuitive autoconnect + positioning#2714
Merged
icecrasher321 merged 2 commits intostagingfrom Jan 7, 2026
Merged
improvement(add-block): intuitive autoconnect + positioning#2714icecrasher321 merged 2 commits intostagingfrom
icecrasher321 merged 2 commits intostagingfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
Greptile SummaryThis PR improves the UX for adding blocks by distinguishing between click and drag interactions:
The changes align with the PR description's goals and make block addition more intuitive by only auto-connecting when the user explicitly drags a block to a specific location. Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant Toolbar
participant CmdK as Command Palette
participant Canvas
participant Handler as handleAddBlockFromToolbar
participant DragHandler as handleToolbarDrop
Note over User,DragHandler: Click Path (Toolbar/Cmd+K)
User->>Toolbar: Click block
Toolbar->>Handler: dispatch 'add-block-from-toolbar' event
Handler->>Handler: getViewportCenter()
Handler->>Canvas: addBlock(at viewport center, no autoconnect)
User->>CmdK: Click block in Cmd+K
CmdK->>Handler: dispatch 'add-block-from-toolbar' event
Handler->>Handler: getViewportCenter()
Handler->>Canvas: addBlock(at viewport center, no autoconnect)
Note over User,DragHandler: Drag Path
User->>Toolbar: Drag block
User->>Canvas: Drop on canvas
Canvas->>DragHandler: onDrop with cursor position
DragHandler->>DragHandler: tryCreateAutoConnectEdge()
DragHandler->>Canvas: addBlock(at drop position, WITH autoconnect)
|
waleedlatif1
pushed a commit
that referenced
this pull request
Jan 8, 2026
* improvement(add-block): intuitive autoconnect + positioning * cleanup code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Type of Change
Testing
Tested manually
Checklist