Skip to content

Conversation

@eliott-herbert-byrnes
Copy link
Contributor

Summary

Implemented drag-and-drop reordering functionality for checklist items within checklists, allowing users to reorder items by dragging them to their desired position.

Issue

Checklist items could only be manually ordered by creation time or through deletion and recreation. There was no intuitive way to reorder existing checklist items within a checklist.

Changes

apps/web/src/views/card/components/Checklists.tsx
apps/web/src/views/card/components/ChecklistItemRow.tsx
packages/api/src/routers/checklist.ts
packages/db/src/repository/checklist.repo.ts
  1. Added drag-and-drop functionality to Checklists component:
  2. Made ChecklistItem draggable:
  3. Created reorderItem API endpoint:
  4. Implemented database reordering logic:

Testing

[x] Drag checklist items within same checklist successfully reorders them
[x] Drag operations across different checklists are prevented
[x] Dropping item in same position has no effect
[x] Order persists after page refresh
[x] View-only mode prevents dragging
[x] Multiple rapid reorders handled correctly

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