Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No longer possible to drop a folder into Code to open folder #32537

Closed
bpasero opened this issue Aug 15, 2017 · 10 comments
Closed

No longer possible to drop a folder into Code to open folder #32537

bpasero opened this issue Aug 15, 2017 · 10 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug important Issue identified as high-priority verification-needed Verification of issue is requested verified Verification succeeded
Milestone

Comments

@bpasero
Copy link
Member

bpasero commented Aug 15, 2017

This is a regression from the Electron update and seems to be electron/electron#9840

I would argue that this blocks an Electron update unless we find a workaround. The problem is that during drag we no longer can find out if the dragged resource is a file or folder. Only when dropping it seems we can find out.

We need to know if a folder is dropped vs file to show different drop feedback:

  • dropping a folder shows a full drop feedback over the entire window to indicate that you open the folder
  • dropping a file is showing individual feedback depending on where you drop (over the explorer: copy file into the folder, over the editor: open the folder)

/cc @kieferrm @Tyriar @roblourens

@bpasero bpasero added electron-update important Issue identified as high-priority labels Aug 15, 2017
@bpasero bpasero added this to the August 2017 milestone Aug 15, 2017
@bpasero bpasero added bug Issue identified by VS Code Team member as probable bug workbench labels Aug 15, 2017
@roblourens roblourens removed their assignment Aug 17, 2017
@Tyriar
Copy link
Member

Tyriar commented Aug 17, 2017

Dropping a folder on Windows appears that it's handled as a file

The behavior is a little odd in the terminal as well, adding a / at the start:

image

@Tyriar
Copy link
Member

Tyriar commented Aug 17, 2017

Ah that's probably unrelated.

@Tyriar
Copy link
Member

Tyriar commented Aug 17, 2017

We could take this as an opportunity to improve the current behavior, especially since the new DataTransferItem behavior is to spec. Dragging a folder could just show the drop area of a file but handle the folder in multiple ways.

  • Dropping a folder in the editor:
    • Open all files in the folder in this editor group?
    • Open the folder?
    • Add folder as workspace?
  • Dropping a folder in the explorer:
    • Copy the folder into the location?
    • Open the folder?
    • Add folder as workspace?

@bpasero
Copy link
Member Author

bpasero commented Aug 18, 2017

@Tyriar yes, that is my thinking as well

@Tyriar
Copy link
Member

Tyriar commented Aug 18, 2017

@bpasero so is the plan to tweak the behavior to allow opening folders via DND with Electron 1.7.*? Do you need any help with that?

@darkguy2008
Copy link

@Tyriar I'd expect a similar behavior to Sublime Text: Folder dragged into Explorer: Add to workspace. Folder dragged into Editor: Open the folder instead. Opening all files is a very bad idea, what if you drag a folder with node_modules ? it'll be hell. Btw, thanks @bpasero for referencing my issue here :)

@Tyriar
Copy link
Member

Tyriar commented Aug 18, 2017

@darkguy2008 yeah good point, the main thing is squeezing in the "open folder" concept in there somehow as right now that's the only thing that's done (and it will require a full window reload for some time).

@bpasero
Copy link
Member Author

bpasero commented Aug 19, 2017

@Tyriar I am waiting for Electron to revert the change of Chrome and if that does not happen I need to look into a fix.

@bpasero
Copy link
Member Author

bpasero commented Aug 22, 2017

Pushed a fix that handles this, differently from before though (we cannot support our old model anymore given the Electron update).

What we gain is the ability to add folders to a workspace by dropping to the explorer, which is cool. What we loose is the visual feedback when you drag that a folder is being dragged. You are now under the impression that you can always drop a folder onto the explorer and the editor will show unhelpful feedback when you drop a folder near the edge of an existing editor by indicating a split operation (which does not make much sense for folders).

@bpasero
Copy link
Member Author

bpasero commented Aug 28, 2017

Verification: ensure that you can open a single folder by dropping it into the editor area (either with editors opened or not).

@isidorn isidorn added the verified Verification succeeded label Aug 29, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug important Issue identified as high-priority verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

5 participants