Skip to content

fix(ui): restore column drag-to-reorder functionality#19

Merged
eyelock merged 1 commit into
mainfrom
fix/column-reordering
Jan 13, 2026
Merged

fix(ui): restore column drag-to-reorder functionality#19
eyelock merged 1 commit into
mainfrom
fix/column-reordering

Conversation

@eyelock
Copy link
Copy Markdown
Owner

@eyelock eyelock commented Jan 13, 2026

Summary

  • Fixed column drag-to-reorder which was broken due to nested dropDestination handlers
  • Column and card drops now both use String.self but are differentiated by a column: prefix
  • Added onDropColumnId callback to ColumnView to handle column reordering within the same drop handler

Problem

When dragging a column over another column, the inner ColumnView's dropDestination (for cards) was consuming the drop event before the outer column reorder handler could process it. Even though the card handler returned false for invalid UUIDs, SwiftUI doesn't bubble drops up to parent views.

Solution

  • Prefix column drag data with column: to differentiate from card drags
  • Move column drop handling into ColumnView via a new onDropColumnId callback
  • ColumnView's single dropDestination now checks for the column: prefix and routes to the appropriate handler

Test plan

  • Verify column drag-to-reorder works (drag column header left/right)
  • Verify card drag-and-drop still works (within same column and between columns)
  • All 46 tests pass
  • Zero lint violations in changed files

🤖 Generated with Claude Code

Column reordering was broken because both columns and cards used plain
UUID strings as the drag transferable type. When dragging a column over
another column, the inner ColumnView's dropDestination for cards would
accept the drop (since it accepts any valid UUID) before the outer
column reorder handler could process it.

Fix:
- Prefix column drag data with "column:" to differentiate from card drags
- Move column drop handling into ColumnView via callback (onDropColumnId)
- ColumnView's dropDestination now checks for "column:" prefix and routes
  to the appropriate handler

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@eyelock eyelock merged commit bd4637e into main Jan 13, 2026
5 checks passed
@eyelock eyelock deleted the fix/column-reordering branch January 13, 2026 20:45
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