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

drag-and-dropping a file will overwrite without asking to confirm #1887

Open
Pomax opened this Issue Mar 15, 2017 · 11 comments

Comments

Projects
None yet
5 participants
@Pomax
Contributor

Pomax commented Mar 15, 2017

if I drag-and-drop and index.html from my desktop into the thimble file browser, it immediately overwrites whatever index.html there is already, without asking me whether that is what I meant to do, and without the ability to undo that drop action.

@Shank09

This comment has been minimized.

Show comment
Hide comment
@Shank09

Shank09 Mar 15, 2017

This issue seems interesting, I'd like to work on it 👍

Shank09 commented Mar 15, 2017

This issue seems interesting, I'd like to work on it 👍

@humphd

This comment has been minimized.

Show comment
Hide comment
Member

humphd commented Mar 15, 2017

@humphd

This comment has been minimized.

Show comment
Hide comment
@humphd

humphd Mar 23, 2017

Member

NOTE: I'm significantly refactoring the dnd code in mozilla/brackets#659. If you want to add the "don't overwrite existing files" logic to what I'm doing, I can walk you through it. It wouldn't be a lot of work. Let me know.

Member

humphd commented Mar 23, 2017

NOTE: I'm significantly refactoring the dnd code in mozilla/brackets#659. If you want to add the "don't overwrite existing files" logic to what I'm doing, I can walk you through it. It wouldn't be a lot of work. Let me know.

@humphd

This comment has been minimized.

Show comment
Hide comment
@humphd

humphd Apr 7, 2017

Member

@Shank09 are you actually doing this? If not, @Simon66 says he'd like to do it. Let me know ASAP

Member

humphd commented Apr 7, 2017

@Shank09 are you actually doing this? If not, @Simon66 says he'd like to do it. Let me know ASAP

@Shank09

This comment has been minimized.

Show comment
Hide comment
@Shank09

Shank09 Apr 7, 2017

@humphd Sure let him take it. I have another bug for Release 0.4, which im currently working on

Shank09 commented Apr 7, 2017

@humphd Sure let him take it. I have another bug for Release 0.4, which im currently working on

@sdalmeida

This comment has been minimized.

Show comment
Hide comment
@sdalmeida

sdalmeida Apr 7, 2017

Contributor

Thanks for the quick reply @Shank09. I'll start working on this asap 👍

Contributor

sdalmeida commented Apr 7, 2017

Thanks for the quick reply @Shank09. I'll start working on this asap 👍

@sdalmeida

This comment has been minimized.

Show comment
Hide comment
@sdalmeida

sdalmeida Apr 10, 2017

Contributor

Just to recap,
Should a "warning" popup only when a file is being overridden? Or should it be shown every time something is dragged & dropped?

Here's the message we can show the user:

"Are you sure you want to import {0} into your project?
This process is irreversible. If unsure, hit Cancel

< Cancel > < Ok >"

Where {0} is the file/zip name.

Contributor

sdalmeida commented Apr 10, 2017

Just to recap,
Should a "warning" popup only when a file is being overridden? Or should it be shown every time something is dragged & dropped?

Here's the message we can show the user:

"Are you sure you want to import {0} into your project?
This process is irreversible. If unsure, hit Cancel

< Cancel > < Ok >"

Where {0} is the file/zip name.

@humphd

This comment has been minimized.

Show comment
Hide comment
@humphd

humphd Apr 10, 2017

Member

I think we should do something like:

"A file named {0} already exists in this location. Do you want to use the imported file or keep the existing?"
<Use Imported> <Keep Existing> <Cancel>

Member

humphd commented Apr 10, 2017

I think we should do something like:

"A file named {0} already exists in this location. Do you want to use the imported file or keep the existing?"
<Use Imported> <Keep Existing> <Cancel>

@sdalmeida

This comment has been minimized.

Show comment
Hide comment
@sdalmeida

sdalmeida Apr 10, 2017

Contributor

Perfect! I like the idea.
The current message works fine for single file imports but when an user imports a .zip file, there might be multiple files that could be overridden. So I had this in mind.

If only a single file is being overridden, I'll use this message:

"A file named {0} already exists in this location. Do you want to use the imported file or keep the existing?"

Where {0} is the file name.

And for multiple overrides, I'll use this message:

"Certain files within {0} already exists in this location. Do you want to use the imported files or keep the existing?"

Where {0} is the archive name.

Contributor

sdalmeida commented Apr 10, 2017

Perfect! I like the idea.
The current message works fine for single file imports but when an user imports a .zip file, there might be multiple files that could be overridden. So I had this in mind.

If only a single file is being overridden, I'll use this message:

"A file named {0} already exists in this location. Do you want to use the imported file or keep the existing?"

Where {0} is the file name.

And for multiple overrides, I'll use this message:

"Certain files within {0} already exists in this location. Do you want to use the imported files or keep the existing?"

Where {0} is the archive name.

@humphd

This comment has been minimized.

Show comment
Hide comment
@humphd

humphd Apr 10, 2017

Member

I don't think you can separate it out like this, since you'll get EEXISTS errors as you try to write the files one-by-one. Just deal with it at the individual file level, and people can choose. I might want some, but not all of the files in a zip to overwrite. This gives the user a choice.

Member

humphd commented Apr 10, 2017

I don't think you can separate it out like this, since you'll get EEXISTS errors as you try to write the files one-by-one. Just deal with it at the individual file level, and people can choose. I might want some, but not all of the files in a zip to overwrite. This gives the user a choice.

@humphd

This comment has been minimized.

Show comment
Hide comment
@humphd

humphd May 8, 2017

Member

I've landed #659 so, feel free to rebase and finish this.

Member

humphd commented May 8, 2017

I've landed #659 so, feel free to rebase and finish this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment