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

drag and drop #9

Open
ofZach opened this issue Aug 19, 2015 · 4 comments
Open

drag and drop #9

ofZach opened this issue Aug 19, 2015 · 4 comments

Comments

@ofZach
Copy link
Owner

ofZach commented Aug 19, 2015

useful ?
https://github.com/atom/electron/blob/master/docs/api/file-object.md

@Daandelange
Copy link
Collaborator

I think it's gadget but I know people who'd love to use it that way.
Maybe keep this for later ?

Daandelange added a commit that referenced this issue Sep 4, 2015
(single project only)
Still needs styling & ui improvements
@Daandelange
Copy link
Collaborator

I just added some basic drag & drop functionality to import a project by dropping it's folder.

  • User drags a folder into the window
  • 1 deposit zone appears (or 2 zones if in advanced mode) (needs better styling)
  • On drag-over of the zone, it indicates if you can drop it there depending on what you drag
  • If dropped on update zone, the settings are updated like if you used the import button.
  • If it's a wrong file or user doesn't drop it; the drop zone goes away.

It's pretty basic for the moment and only checks if it's a folder, not even if it's an OF sketch folder; but everything behind the scenes is there.
The 2nd zone could be used for simply setting a batch mode folder.

HTML5 drag-and-drop event handling appears to be pretty disastrous but I believe this points us in the right direction. I didn't expect this! xD
dragleave and dragenter events get called quite randomly; and I'm not event talking about all the event bubbling stuff...
There's still a little ui bug when you drag it too fast into the window onto the modal but it's a minor matter IMO.

Is it clear enough to have a green box + the settings imported or should there be some other feedback ?
Should there be some user feedback if they drop a "denied" file ?

Please tell me what you think of it :)

@kylemcdonald
Copy link
Contributor

i think the best solution for "denied" is a modal error/warning box that reminds people what they can drop. anything else should cause a change in the interface, so it will be clear it worked.

@Daandelange
Copy link
Collaborator

I forgot about the reminder purpose of the modal, that might make it a good reason; and if they don't want the modal, the box indicates it before dropping. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants