Allow tasks to be dragged-and-dropped between workboard columns (UI only)
Summary:
Ref T1344. Allows you to drag tasks within a column and between columns, and handles all the multi-column state / targeting / ghosting stuff.
This is a UI-only change; you can't actually do anything meaningful with these yet.
Roughly, I added the idea of a DraggableList existing within a "group" of draggable lists. Normally, that group only has one item, but on boards it has all of the columns. Then I made all of the relevant operations just apply to the whole group of lists.
Test Plan:
- Verified existing funtionality in Maniphest and ApplicationSearch is unaffected, by dragging around tasks to reprioritize them and dragging around search items.
- Dragged tasks between columns on a board view.
{F101196}
Reviewers: chad, btrahan
Reviewed By: btrahan
CC: chad, aran
Maniphest Tasks: T1344
Differential Revision: https://secure.phabricator.com/D7941
This commit is contained in:
@@ -61,9 +61,18 @@ final class PhabricatorProjectBoardController
|
||||
$task_map[$default_phid][] = $task->getPHID();
|
||||
}
|
||||
|
||||
$board_id = celerity_generate_unique_node_id();
|
||||
|
||||
$board = id(new PHUIWorkboardView())
|
||||
->setUser($viewer)
|
||||
->setFluidishLayout(true);
|
||||
->setFluidishLayout(true)
|
||||
->setID($board_id);
|
||||
|
||||
$this->initBehavior(
|
||||
'project-boards',
|
||||
array(
|
||||
'boardID' => $board_id,
|
||||
));
|
||||
|
||||
foreach ($columns as $column) {
|
||||
$panel = id(new PHUIWorkpanelView())
|
||||
@@ -74,7 +83,8 @@ final class PhabricatorProjectBoardController
|
||||
$cards = id(new PHUIObjectItemListView())
|
||||
->setUser($viewer)
|
||||
->setCards(true)
|
||||
->setFlush(true);
|
||||
->setFlush(true)
|
||||
->addSigil('project-column');
|
||||
$task_phids = idx($task_map, $column->getPHID(), array());
|
||||
foreach (array_select_keys($tasks, $task_phids) as $task) {
|
||||
$cards->addItem($this->renderTaskCard($task));
|
||||
@@ -148,6 +158,7 @@ final class PhabricatorProjectBoardController
|
||||
->setHeader($task->getTitle())
|
||||
->setGrippable($can_edit)
|
||||
->setHref('/T'.$task->getID())
|
||||
->addSigil('project-card')
|
||||
->addAction(
|
||||
id(new PHUIListItemView())
|
||||
->setName(pht('Edit'))
|
||||
|
||||
Reference in New Issue
Block a user