Vscode: Cannot rearrange root folders

Created on 28 Jun 2017  路  12Comments  路  Source: microsoft/vscode

Testing #29176

To have a certain root folder order, today, special care must be taken to open root folders in a specific order. It would make sense to be able to sort them in the Explorer and have them presented in a different order than they were opened.

feature-request file-explorer release-notes verification-needed verified workbench-multiroot

Most helpful comment

I think it would be cool to be able to use drag and drop to reorder root folders.

All 12 comments

I think it would be cool to be able to use drag and drop to reorder root folders.

@bpasero do we have new API support for this? Since now all folders are treated equal this should be possible

@isidorn there is no explicit API to change the sorting order of root folders, it would probably make sense @sandy081 to add this to WorkspaceEditingService so that we can use it in the explorer.

Btw I do think that we need to revisit how the drop feedback for the tree is working in the case of rearranging root folders: Currently we just select the drop target, which implies that you drop a folder or file into that target folder. That imho does not make much sense when rearranging root folders.

Instead I would expect a new visual drop indicator to show up as e.g. Windows does it:
flicker_chrome58

I will work from an API side to change the order

Yes the line drop indicator would be more fitting.
@sandy081 let me know once we have api for this and I can look into it from the UX side. Thanks

Moving to october, @sandy081 ping me when there is api to change the order :)

Moving to november :)

Reordering should preserve the expansion state of folders. Since we know have api for this I will tackle this in february

Sorting alphabetically by default is sane option even without this being implemented

@isidorn @sandy081 fyi I pushed a change to have WorkspaceService.updateFolders() that allows to add and remove at the same time with only single write happening to the workspace file (and proper events). I guess that method could be used to support rearranging of roots.

@bpasero thanks, I was aware of that thus I assigned this to the february milestone.

We now support drag and drop of root folders in the explorer.

Note that I have disabled this behavior when multiple roots are selected - because of the API and this being done sequantally it is basically mental masturabation to get this working and I do not see a use case atm.

Try it out in insiders from monday and let me know how it goes.

@bpasero thanks for the API, however not the nicest to program against, I had to write a clunky for loop in order to make this work.

Was this page helpful?
0 / 5 - 0 ratings