Skip to content

Conversation

@emir-karabeg
Copy link
Collaborator

Summary

Enables dragging of the note block by its entire body, mirroring the drag behavior of workflow blocks. This was achieved by moving the note-drag-handle class from the header to the main block container and applying appropriate cursor styling. The redundant onMouseDown handler on the header was removed.

Fixes #(issue) - If an issue exists, add it here.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation
  • Other: ___________

Testing

The change was verified by running lint and type checks, which passed without errors or warnings.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

Screenshots/Videos


Open in Cursor Open in Web

@cursor
Copy link

cursor bot commented Jan 30, 2026

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@vercel
Copy link

vercel bot commented Jan 30, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Jan 30, 2026 2:45am

Request Review

@emir-karabeg emir-karabeg changed the title Note block dragging improvement(note): drag Jan 30, 2026
@waleedlatif1 waleedlatif1 marked this pull request as ready for review January 30, 2026 20:46
@waleedlatif1
Copy link
Collaborator

@cursor review

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Jan 30, 2026

Greptile Overview

Greptile Summary

Enabled dragging of note blocks by their entire body to match workflow block behavior. The note-drag-handle class was moved from the header to the main container, and cursor styling (cursor-grab and [&:active]:cursor-grabbing) was applied to provide visual feedback. The redundant onMouseDown event handler was removed from the header.

Key changes:

  • Moved note-drag-handle class from header div to main container div
  • Added cursor-grab and [&:active]:cursor-grabbing cursor styles to main container
  • Removed unused onMouseDown handler that was stopping propagation on header
  • Maintained existing onClick handler for block selection

Confidence Score: 5/5

  • This PR is safe to merge with no identified risks
  • The change is straightforward and aligns perfectly with existing patterns. The implementation mirrors workflow blocks (line 1046 in workflow-block.tsx), uses the same class name pattern registered in workflow.tsx (line 2157), and maintains all existing functionality including the ActionBar and onClick handler
  • No files require special attention

Important Files Changed

Filename Overview
apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/note-block/note-block.tsx Moved drag handle class from header to main container, enabling body dragging to match workflow blocks

Sequence Diagram

sequenceDiagram
    participant User
    participant NoteBlock
    participant ReactFlow
    participant WorkflowCanvas

    User->>NoteBlock: Mouse down on note body
    Note over NoteBlock: .note-drag-handle class triggers drag
    NoteBlock->>ReactFlow: Initiate drag operation
    ReactFlow->>WorkflowCanvas: Update block position
    User->>NoteBlock: Mouse up
    ReactFlow->>WorkflowCanvas: Finalize position
    
    Note over NoteBlock: onClick handler still active for selection
Loading

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

1 file reviewed, no comments

Edit Code Review Agent Settings | Greptile

@waleedlatif1 waleedlatif1 merged commit aec0de0 into staging Jan 30, 2026
11 checks passed
@waleedlatif1 waleedlatif1 deleted the cursor/note-block-dragging-c8b5 branch January 30, 2026 20:51
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.

4 participants