Implement dragula.js drag-and-drop for task cards on board page#72
Merged
Conversation
- Add dragula CSS <link> in app.rs ShellPage <head> - Add dragula JS <script> tag and init in board.rs with drop handler - Add data-status attribute to board column divs - Add data-task-id attribute to task card root <a> element - Add dragula CSS overrides in app.css (mirror, transit, drop-zone) - Implement live DOM update on drop (badge, counts, No tasks placeholder) - Implement rollback to source column on API failure - Update Rust unit tests to verify data-status and data-task-id attributes - Document webapp JS dependency pattern in AGENTS.md
- Replace 5-line filter loop with Array.from + CSS attribute selector
- Extract revertDrag() function to eliminate duplicated error handling
- Replace regex in column label extraction with simpler split(' (')[0]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Integrates dragula.js (vendored in
assets/) into the board page to enable drag-and-drop of task cards between the four status columns (pending, in-progress, in-review, completed).Changes
src/webapp/app.rs— Added dragula CSS<link>in the shell<head>src/webapp/pages/board.rs— Added dragula JS<script>,data-statusattributes on column divs, inline dragula initialization with drop handler, live DOM badge/count updates, and rollback on API failuresrc/webapp/components/task_card.rs— Addeddata-task-idto card<a>elementassets/dragula.min.js,assets/dragula.min.css— dragula v3.7.3 vendored assetssrc/webapp/app.css— dragula CSS overrides (mirror styling, drop-zone hover, Bulma compat)AGENTS.md— Documented webapp JS dependency pattern (page-local imports)data-statusanddata-task-idattributesTesting
cargo test --lib -- boardandcargo test --lib -- project_cardpassCloses #12