Bug 1: when dragging a task, users can drag the task between DragTargets. The visual consequence is that no DragTarget is highlighted. The behavior consequence is that dropping the draggable while on the border of DragTargets does not schedule that task (refer to MP4: drag target border bug).
Bug 2: when dragging a task in the cancel area, there is a flicker where the text of the cancel area changes (refer to MP4: cancel area jitter).
I've implemented a possible solution that may improve performance (and UI) as well: replace DragTargets with logic!
For dragging calendar events:
  1. calculate the distance dragged
  2. calculate how much time that drag distance represents
  3. add / subtract that time from the original start time
For dragging tasks, there are a few more initial steps to calculate the time of the draggable task, but once you do, the logic is the same as dragging something from the calendar.
This solves bug 1 because you are no longer dealing with borders of DragTargets. This solves bug 2 because you are no longer checking if the cursor is within the bottom app bar. Just check if the offset.dy of the cursor is >= offset.dy value of the bottom app bar.
Improvements:
  • This should be more performant because you no longer have a number of DragTargets all checking if the draggable is within its bounds. If you decide to go with 5-minute DragTargets and assuming only 12 hours is displayed, that's 12 hours x 12 5-minute DragTargets per hour = 144 drag targets shown per day. If you displayed 3 days, that’s 144 x 3 =
    432 DragTargets that are no longer needed!
  • I think having the draggables snap between 5-minute intervals is more intuitive and aesthetic.