Feat/project board drag and drop
Drag and drop on the project Board
What's new
Move tasks by dragging them on the Board
On a project's Board tab, you can now drag a task card from one column to another to change its status. The card moves right away and the change is saved.
- Only people allowed to edit tasks can drag cards. Everyone else sees the board as before, and clicking a card still opens the task.
- If the save fails, the card goes back to where it was and an error message explains why.
- On touch screens, a short press picks up a card, so swiping still scrolls the board.
A clear message when a card can't go somewhere
Some columns don't match one of the project's statuses, so a task can't be moved into them. While a card is dragged over one of these columns, the column is outlined in red. If the card is dropped there, it stays where it was and a message says why. The message is translated into all supported languages.
The Overview tab stays up to date
After a card is moved on the Board, the Overview tab shows the change straight away, with no page reload:
- the task's status in the Tasks list
- the progress figures
- the list of tasks that need attention
Status colours match the Board
The dot next to each task in the Overview now uses the same colour as that status's column on the Board. A status with no colour set keeps the default colour.
Not included
- Reordering cards within the same column, since the order isn't saved yet.
- Moving cards with the keyboard.
- Showing changes made by other people without a reload.
How to test
- Open a project, go to the Board tab, and drag a card to another column. It should stay there after a page reload.
- Drag a card onto a column that doesn't match one of the project's statuses. It should be outlined in red, and dropping the card there should show an error.
- Go back to the Overview tab. The moved task should show its new status and colour, and the progress figures should be updated.
- Sign in as a user who can't edit tasks. Cards on the Board shouldn't be draggable.