adobe/brackets — pull request #9298 by JeffryBooher (2014-09-25 23:31:55+00:00)
Title: Working Set Draggable (Take 2)

This PR implements Dragging between working sets from option "B"

This is a complete re-write of the dragging code. I've done a fair amount of testing -- The only thing I couldn't test was using a middle-mouse button to close a file.

Some areas to hit: (These will be migrated to the smoke test)
* Dragging the current view to another working set (make sure next view is opened correctly)
* Dragging into an empty working set
* Dragging the last item out of a a working set
* Dragging above
* Dragging below
* Scrolling: Make sure you can place before those scrolled out of view in both top and bottom
* Make sure the scroll wheel works before and after scrolling
* Dragging an item into an empty working set should open the item in the related pane
* Dragging all items out of a working set should show the interstitial page
* Scroll shadows and selected item "extenders" are draw correctly
* Current Selection affordance moves as the selected item moves
* Dragging an item by the close or modified indicator should still work
* Closing an item by clicking its close button should work
* dropping into "no-man's land" should drop the item at the first or last item in the list respectively
* Items cannot be dragged laterally
* item maintains its appearance while dragged.
* Make sure you can drag to the first and last item in the list
* Make sure you can drag to the first and last item of another list
* Make sure you can scroll a list upwards and drop in the appropriate spot
* Make sure you can scroll a list downwards and drop in the appropriate spot
* Make sure that an item stays in the first/last position when attempting to drag it into nomansland
* The currently viewed file should remain the currently viewed file so try to drag the currently viewed file and see what happens.
* Drag the current file of the non-active pane
* Drag the current file of the active pane

New to this implementation
* Pressing escape while dragging will cancel the drag. Item should move back to its original location.
* A ghost item will appear as the item is being dragged so that if the item is dropped in no-man's land. previous versions wouldn't let you drag out of the working set container until it's actually dragged out of the container a ghost element appears

New for split view
* FIles can be opened in another pane without activating the pane hence, deleting the current file of a non-active pane should not activate the pane when opening the next file in the line of succession; same goes for dragging the current file of a non-active pane

Known Issues:
- [x] occasionally dragging the currently selected file from the active pane to another working set will lose its selection. Haven't been able to nail this one down.
- [x] the active editor is sometimes not focused after reordering it
- [x] the currently viewed file selection extender in the file tree becomes dislodged when the height of the working set changes and the selection is in the file tree (this is fixed with Larz's padding removal)
- [x] the currently viewed file is not reselected when the current file when dropped on to another view. (timing issue still trying to nail down)
- [x] the selection affordance does not follow the selected item as it is dragged into the non-active working set ( needs css change)
- [x] scrollbars appear on lists that do not need them. This also happens on master (#9204)

I wanted to open this with the above issues being actively worked on so folks can get a chance to play with this and provide feedback. it is a change to what we had before and a complete re-write.

Please amend any issues to this pr.
The code is mostly done (aside from fixing the issues above) but unless there are glaring problems from a drive-by style review then you might want to hold off on making comments and come back once the remaining issues are solved. I welcome any feedback on the code I just don't want to get caught up on reviewing something which may be changing. This is primarily dependent on how much needs to be changed to solve the timing issue noted above.

Also if anyone would like to help out -- there are some starter issues :)