UX exploration: Add drag and drop to the Solution Explorer #1847
MangelMaxime
started this conversation in
Ideas
Replies: 1 comment
-
I would love to have Drag and Drop style file reordering! It's a really nice feature in Rider, that even Visual Studio doesn't support. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
it is now possible to add support for drag and drop to TreeData created by extensions.
I managed to set it up using F# in Ionide.
On the following demo you can see me doing a drag and drop, which log the mime type of the item:
drag_and_drop_demo.mov
Now that I know drag and drop works, I was trying to think about which feature could benefit from it. However, I am not sure if we can implement any of them with a good UX.
Ability to move a file / reorder
I don't think we can provide a good UX for this feature because VSCode does support a drag and drop for re-ordering the files.
This means that when you drop the file the UI allow you to do it only on another item and not between 2 items
drag_drop_between_items_impossible.mov
For reference, here is how it is done in Rider:
drag_and_drop_between_items_rider.mov
Workaround: Decide that we always want to drop below the target item.
Allow to add file from outside
In theory, with we can support adding file from outside (OS system and/or other treeview).
The problem in term of UX, would be the same as for "Ability to move a file / reorder", we can't drop between items to have precise control of the destination.
Workaround: Decide that we always want to drop below the target item.
Can't prevent user from dragging an invalid item
What I mean by that is that, it seems like we can provide a visual feedback to indicate to the user that he can't drag an item or can't drop it there.
For example, we don't want the user to drag a project item inside of another project. Dragging a project can only be allowed to target a solution or folder inside a solution.
Workaround: We can show a notification in case of invalid destination.
Do you think any of the listed feature could make sense to implement with the current possibility of VSCode ?
Does it makes sense to ask VSCode teams to:
Personally, I think that the chances for having such API implemented is really low.
Are there any features that I didn't think about that we could implement with the current VSCode API?
Beta Was this translation helpful? Give feedback.
All reactions