Make drag-and-drop on workboards interact with priority column headers

Summary:
Ref T10333. Ref T8135. Depends on D20247. Allow users to drag-and-drop cards on a priority-sorted workboard under headers, even if the header has no other cards.

As of D20247, headers show up but they aren't really interactive. Now, you can drag cards directly underneath a header (instead of only between other cards). For example, if a column has only one "Wishlist" task, you may drag it under the "High", "Normal", or "Low" priority headers to select a specific priority.

(Some of this code still feels a little rough, but I think it will generalize once other types of sorting are available.)

Test Plan: Dragged cards within and between priority groups, saw appropriate priority edits applied in every case I could come up with.

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T10333, T8135

Differential Revision: https://secure.phabricator.com/D20248
This commit is contained in:
epriestley
2019-03-05 07:38:35 -08:00
parent 14a433c773
commit 40af472ff5
11 changed files with 208 additions and 79 deletions

View File

@@ -55,6 +55,10 @@ JX.install('WorkboardCard', {
return this._root;
},
isWorkboardHeader: function() {
return false;
},
redraw: function() {
var old_node = this._root;
this._root = null;