-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Reorder Working Set with Drag and Drop #1846
Conversation
I think you'll need to change the order in the underlying model too (DocumentManager). Otherwise when you restart Brackets it will restore the old order (and you'll get other funny behavior, like closing a file won't switch to the item next to it). |
Yes, I'll figure I would need to do that, but I didn't research on it, and for some reason my Brackets doesn't restore the previous session now, not sure why because I think it worked before. |
Try clearing your cache: https://github.com/adobe/brackets/wiki/Cache-Folder |
Thank you redmus, that worked. Now the code changes the workingSet, but it doesn't change the cache. Will look how to add that too. |
…now passing and the issue must have been fixed at some point without adding this test back in.
@@ -175,7 +272,12 @@ define(function (require, exports, module) { | |||
_updateListItemSelection($newItem, curDoc); | |||
|
|||
$newItem.mousedown(function (e) { | |||
FileViewController.openAndSelectDocument(file.fullPath, FileViewController.WORKING_SET_VIEW); | |||
// Try to reorder only with the right click and just open the file in other cases |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mean left click, not right click, correct?
When dragging, I think it's a bit confusing, and possibly dangerous, to keep the mouse capture when mouse goes outside Brackets app. I think you should perform drop in MouseLeave event. Even within Brackets app, it's probably not necessary to track mouse outside of working set container. |
It scrolls into view only if you are dragging the selected item out of view. Could also be added if the selected elements scrolls out of view, but can feel weird if you are not dragging that item, specially if the selected item wasn't in the view before dragging. I've been trying to rebase, but I end up with errors from several commits. Should I combine only my commits or every commit that appears from the merging with the master branch? |
I am not seeing any auto-scrolling on Win7. Here's what I'm trying:
Results Expected |
For rebasing, you only want to use your commits. |
Ok, I see what is expected. I'll try to see how to work it out. I was just scrolling once the item was dropped, not allowing to use drag and drop outside of the visible area. I'll try again to rebase after the next commit. |
Update dirty flag in lightning bolt icon for all dirty flag changes
This time i added the scrolling while dragging. I also had to disable the mousewheel just when dragging to avoid weird behaviors. I moved the close to the reorder function, but is only called if the item isn't really moved, same as open. So now is possible to leave the close icons while dragging. |
I did the rebase, what should I do next? |
This looks great. You'll need to submit a new pull request with your new (should be single) commit. Then we can close this pull request. If possible, add a reference to this pull request in the new one so this history is not lost. |
add settings icon
Load extensions from the application support directory
Make mode string in statusbar more presentable
I made a mess with this branch and didn't new sure how to fix it, so I just started from 0, made a new branch and a new commit with all the changes. I'll close this pull request and make a new one. |
* Remove key binding * Commit changes * indent fixes * Changes - that add new for next/prev page [OSX] * Remove key-binding next/prev * Indent changes * mend
* Remove key binding * Commit changes * indent fixes * Changes - that add new for next/prev page [OSX] * Remove key-binding next/prev * Indent changes * mend
This add the ability to reorder the files in the working set by dragging then up or down.