GithubHelp home page GithubHelp logo

drag and drop about pgelectron HOT 4 OPEN

ofZach avatar ofZach commented on September 10, 2024
drag and drop

from pgelectron.

Comments (4)

Daandelange avatar Daandelange commented on September 10, 2024

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

from pgelectron.

Daandelange avatar Daandelange commented on September 10, 2024

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 :)

from pgelectron.

kylemcdonald avatar kylemcdonald commented on September 10, 2024

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.

from pgelectron.

Daandelange avatar Daandelange commented on September 10, 2024

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. :)

from pgelectron.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.