ElkArte Community

Elk Development => Feature Discussion => Exterminated Features => Topic started by: emanuele on May 31, 2013, 08:58:32 am

Title: Drag and drop and general approach to jQuery plugins
Post by: emanuele on May 31, 2013, 08:58:32 am
It's a while I'm thinking about it and well...maybe... :P

There are few places that would take advantage from a form of javascript drag and dropping.
Of course the "easiest" way would be to use jQuery UI, though to me it looks like a monster and I don't know if it is worth.
Looking around there are several jQuery plugins around the net for that function, searching a bit I found this page (http://johnny.github.io/jquery-sortable/) that lists also some alternatives, like:
https://github.com/johnny/jquery-sortable
https://github.com/dbushell/Nestable
https://github.com/farhadi/html5sortable
All of them rely on a plain jQuery and are quite small.

The first one seems "active" (it has a commit 11 days old), the last one is the smallest, but seems abandoned (there are a lot of forks and PRs, but the original author doesn't seem to be much interested in maintaining it).

So, the questions are:
1) are we interested in some drag&drop? (I'd say yes.)
2) What would you prefer: jQuery UI or smaller plugins (with all the consequences of both options)? (I'd be tempted to say smaller plugins that do what we need. Of course there are several risks connected: the possibility that the development of the plugin stops, the possibility that at a certain point we will be using so many disconnected plugins that UI will become easier to handle (and maybe even smaller), the possibility that our users will want UI.)

Your opinion?

And just as a reminder:
/me doesn't like and doesn't understand much of javascript. :P
Title: Re: Drag and drop and general approach to jQuery plugins
Post by: Arantor on May 31, 2013, 09:29:26 am
Drag 'n' drop is cool.

What I'd say though is that we took the jQuery UI route - you get more than just the sortable component without too much fuss - and you get something that while larger, it is better battle-hardened/tested and likely won't require you to do too much of your own support for it. It's not like you need to include it every page or anything, just the pages you need it in.
Title: Re: Drag and drop and general approach to jQuery plugins
Post by: Joshua Dickerson on June 01, 2013, 01:56:29 am
Another benefit to jQuery UI is that you can use its CDN.
Title: Re: Drag and drop and general approach to jQuery plugins
Post by: TE on June 03, 2013, 02:37:04 am
html5sortable doesn't support nested lists, so it's not suitable ..
I'd go with jQuery UI, 'cause it's widely used, active developement, and we could probably use some of the other features, too.
Title: Re: Drag and drop and general approach to jQuery plugins
Post by: TestMonkey on June 06, 2013, 08:48:34 pm
Yes, droppy good.
I'd tend to jQuery UI. It's actively developed, known, and the many small tools would be fine were they the best for the job, which doesn't seem to be the case of any.
Title: Re: Drag and drop and general approach to jQuery plugins
Post by: emanuele on October 04, 2013, 04:36:13 am
Now we have jQuery UI, so this can go!