Skip to content

Conversation

@cfarvidson
Copy link

@cfarvidson cfarvidson commented Dec 22, 2025

Why

To provide teams with the flexibility to manually order cards within their kanban boards using drag-and-drop, rather than being constrained by automatic ordering based on activity timestamps. This allows for more intuitive workflow management where teams can prioritize cards based on their current needs rather than recency.

To me the ability to sorting the cards are a total deal-breaker for using the app or not.

I added the feature but defaulted to not sorting on each board. You have to enable it.

Screenshot 2025-12-21 at 15 04 16

What's included

  • A new position column on the cards table to store manual ordering
  • A new manual_sorting_enabled boolean column on the boards table to control the feature per board
  • A Card::Positioner class that handles manual repositioning with gap-based positioning to minimize database updates
  • A new Boards::ManualSortingsController for toggling manual sorting on/off
  • Enhanced drag-and-drop JavaScript controller with manual sorting support
  • Board settings UI with an ON/OFF toggle for manual sorting
  • Turbo Stream responses for seamless toggle updates
  • Comprehensive database migration with backfill logic preserving existing card ordering
  • Tests for the new controller, positioner logic, and updated drag-and-drop behavior
  • Updates to all card movement controllers to respect manual positioning when enabled

Usage

  1. Board administrators can toggle manual sorting in the board settings
  2. When enabled, cards can be dragged and dropped to reorder them within columns
  3. Manual sorting is disabled by default, preserving existing behavior
  4. Cards maintain their manual order until moved by users or the feature is disabled

Configuration

  • Manual sorting is per-board, allowing teams to choose where they want this flexibility
  • The feature integrates with existing card movement workflows (triaging, closing, etc.)
  • Database migrations include backfill logic to position existing cards according to current ordering rules

Notes

  • Development was stacked on PR Setup Docker development environment with Solid Queue #2222 (Docker dev + Solid Queue) to make local development easier
  • The position-based ordering uses a gap-based approach (step size 1024) to minimize database updates during reordering
  • All existing card ordering logic (golden cards, activity timestamps) is preserved as fallback when manual sorting is disabled

- Updated .dockerignore and Dockerfile.dev for better containerization
- Added docker-compose.yml for local development
- Configured Solid Queue in development environment
- Added dedicated databases for queue and cache in MySQL config
- Included necessary migration directories for multi-database setup
- Add position column to cards table with migration and backfill
- Implement Card::Positioner for calculating new positions and renumbering
- Update drag_and_drop_controller.js to support intra-list reordering and send before/after IDs
- Wire up drop controllers to handle reordering without side effects
- Update board and column controllers to render cards in position order
- Add manual_sorting_enabled boolean to boards table
- Add a toggle for manual sorting in Board Settings (mirrors Public link style)
- Update list controllers to only use position-based ordering when enabled
- Update drag_and_drop_controller.js to block intra-list reordering when disabled
- Update drop endpoints to ignore reorder hints unless enabled
- Add unit and integration tests for the new setting and gating logic
Replace the lock/move icons in Board Settings with larger, vertically centered ON/OFF labels.
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