Add drag-and-drop song reordering in the GUI #19

Closed
opened 2026-03-17 14:08:53 +01:00 by shahondin1624 · 0 comments

Description

Currently, song order is determined either alphabetically or by file-system order (configured via songs.order in songbook.yaml). Users have no way to manually rearrange songs within the GUI before building.

Add the ability to reorder songs via drag-and-drop in the songs list. When using manual order, this lets users arrange the songbook exactly as they want. The reordered list should be used for the next build.

Acceptance Criteria

  • Songs in the songs list can be reordered via drag-and-drop
  • The reordered song list is used when building the songbook (overriding the config file order)
  • A visual indicator shows where a dragged song will be placed (drop target highlight)
  • The song order can be reset to the original order (from config) via a button
  • Reordering is only enabled when songs.order is "manual" (or a new mode like "custom")
  • When songs.order is "alphabetical", the list shows alphabetical order and drag-and-drop is disabled (with a hint explaining why)
  • The GUI remains responsive during drag operations

Implementation Hints

  • Compose Desktop supports drag-and-drop via Modifier.pointerInput and reorder detection
  • Consider using a library like org.burnoutcrew.composereorderable or implementing basic list reordering with detectDragGestures
  • The reordered list can be passed to SongbookPipeline by reordering the parsed List<Song> before the measurement step
  • Store the custom order in memory (no need to persist to disk — the build uses whatever order is in the list at build time)
## Description Currently, song order is determined either alphabetically or by file-system order (configured via `songs.order` in `songbook.yaml`). Users have no way to manually rearrange songs within the GUI before building. Add the ability to reorder songs via drag-and-drop in the songs list. When using manual order, this lets users arrange the songbook exactly as they want. The reordered list should be used for the next build. ## Acceptance Criteria - [ ] Songs in the songs list can be reordered via drag-and-drop - [ ] The reordered song list is used when building the songbook (overriding the config file order) - [ ] A visual indicator shows where a dragged song will be placed (drop target highlight) - [ ] The song order can be reset to the original order (from config) via a button - [ ] Reordering is only enabled when `songs.order` is `"manual"` (or a new mode like `"custom"`) - [ ] When `songs.order` is `"alphabetical"`, the list shows alphabetical order and drag-and-drop is disabled (with a hint explaining why) - [ ] The GUI remains responsive during drag operations ## Implementation Hints - Compose Desktop supports drag-and-drop via `Modifier.pointerInput` and reorder detection - Consider using a library like `org.burnoutcrew.composereorderable` or implementing basic list reordering with `detectDragGestures` - The reordered list can be passed to `SongbookPipeline` by reordering the parsed `List<Song>` before the measurement step - Store the custom order in memory (no need to persist to disk — the build uses whatever order is in the list at build time)
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: shahondin1624/songbook#19