feat: add drag-and-drop song reordering in the GUI (Closes #19) #22

Merged
shahondin1624 merged 1 commits from feature/issue-19-drag-and-drop-song-reordering into main 2026-03-17 14:30:08 +01:00

Summary

  • Create ReorderableSongList composable with long-press drag-and-drop reordering via detectDragGesturesAfterLongPress, including visual drop target highlighting (light blue) and drag handle icons
  • Add customSongOrder: List<String>? parameter to SongbookPipeline.build() to allow the GUI to override config-based song sorting with a user-defined order
  • Integrate reordering into App.kt: track original vs custom order, enable drag only when songs.order != "alphabetical", show alphabetical hint when drag is disabled, and pass custom file-name order to the pipeline on build
  • Add "Reihenfolge zuruecksetzen" (Reset order) button that restores the original config-based order

Test plan

  • GUI module compiles successfully
  • All existing tests pass (including app integration tests with the new build() parameter default)
  • SongbookPipeline.build() backward-compatible (default null parameter)
  • Drag-and-drop enabled only in manual mode (verified by code review)
  • Reset button restores original order (verified by code review)
  • Visual indicators present for drag and drop target (verified by code review)
## Summary - Create `ReorderableSongList` composable with long-press drag-and-drop reordering via `detectDragGesturesAfterLongPress`, including visual drop target highlighting (light blue) and drag handle icons - Add `customSongOrder: List<String>?` parameter to `SongbookPipeline.build()` to allow the GUI to override config-based song sorting with a user-defined order - Integrate reordering into `App.kt`: track original vs custom order, enable drag only when `songs.order != "alphabetical"`, show alphabetical hint when drag is disabled, and pass custom file-name order to the pipeline on build - Add "Reihenfolge zuruecksetzen" (Reset order) button that restores the original config-based order ## Test plan - [x] GUI module compiles successfully - [x] All existing tests pass (including app integration tests with the new `build()` parameter default) - [x] `SongbookPipeline.build()` backward-compatible (default `null` parameter) - [x] Drag-and-drop enabled only in manual mode (verified by code review) - [x] Reset button restores original order (verified by code review) - [x] Visual indicators present for drag and drop target (verified by code review)
shahondin1624 added 1 commit 2026-03-17 14:30:00 +01:00
Add a ReorderableSongList composable that supports long-press drag-and-drop
reordering with visual drop target highlighting. Drag-and-drop is only
enabled when songs.order is "manual"; alphabetical mode shows a hint.
The custom order is passed to SongbookPipeline via a new customSongOrder
parameter and a reset button restores the original order.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
shahondin1624 merged commit d733e83cb1 into main 2026-03-17 14:30:08 +01:00
shahondin1624 deleted branch feature/issue-19-drag-and-drop-song-reordering 2026-03-17 14:30:08 +01:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: shahondin1624/songbook#22