Hi Denis,
On Fri, Sep 26, 2014 at 10:23 AM, Denis Gervalle <dgl(a)softec.lu> wrote:
Hi Marius,
Have you also tried other solution ?
It depends what you understand by "tried". I have *investigated* other
solutions of course, not all of them obviously. I've chosen jsTree for
the File Manager and I didn't have any issues.
, and from the popular I know,
FancyTree (successor of DynaTree)
https://github.com/mar10/fancytree/ look
like a good candidate ?
Yes, it does look like a good tree, but I haven't used it so I can't
tell how it works in a real project, beyond a simple demo.
The first "issue" I've seen is that the documentation is not very
clean on how you can control the node icon from the data source. This
http://wwwendt.de/tech/fancytree/doc/jsdoc/global.html#NodeData
doesn't include an "icon" property, but I've seen:
// Append a new child node
activeNode.addChildren({
title: "Document using a custom icon",
icon: "customdoc1.gif"
});
on
https://github.com/mar10/fancytree/wiki#api-access (putting aside
the fact that "children" is plural so I would expect to receive an
array not a map).
Its community looks comparable but it is a bit less
popular.
Demonstrated features are equivalent and potentially
better
Can you tell me what features of FancyTree that are missing from
jsTree are important for us in XWiki or for applications written on
top of XWiki?
(my feeling with the demo of
jsTree was bad, could be the demo settings however).
Can you give us more details?.. What was bad? What didn't work?
But, more importantly, its browser support seems to be
taken more
seriously.
I have seen couple of issue, event recently with IE
support in
JsTree,
Can you give us some examples? At least to understand if those issues
are important for us in XWiki. Also, have you tried to report those
issues to jsTree? Are you sure the jsTree community is not willing to
fix those issues?
like if IE was just tested at the end, and their
support moto "All
modern browsers are supported, as well as IE8" is not really engaging. The
compatibility of FancyTree see far better for IE (IE from 6 to 11).
Are you saying this from your experience with FancyTree or just by
reading the documentation? On
extensions.xwiki.org there are currently
3 extensions that use jsTree and none that use FancyTree. Among those
that use jsTree there is Dynamic Hierarchy Tree which is used, AFAIK,
on production on some XWiki installations. I'm not aware of IE issues
there with jsTree, but I'll double check.
Since,
we have not finished our discussion regarding IE support, I am not
confortable with JsTree if we continue support for IE < 9.
Again, if you don't mention exactly what IE issues you have
encountered with jsTree, then I feel that your worries are not really
justified.
At least, it
would be good to compare these two and have other arguments then popularity
to choose JsTree IMO.
Popularity is very important.
Thanks,
Marius
Regards,
On Thu, Sep 25, 2014 at 12:11 PM, Marius Dumitru Florea <
mariusdumitru.florea(a)xwiki.com> wrote:
Hi devs,
There are a couple of places in XWiki were a tree widget is used or
needed: document index, WYSIWYG editor wiki page linking, XAR import,
navigation panel, database tree list, report step of Distribution
Wizard, extension upgrade when asking confirmation to clean unused
pages, etc. But we don't have a standard / recommended tree widget /
library. We use either SmartClient which is very heavy or a custom
tree based on Prototype.js.
Since we want to ditch the heavy SmartClient tree and we decided to
move away from the dead Prototype.js to jQuery I propose to use jsTree
(
http://www.jstree.com/ ) as the standard / recommended library for
creating trees in XWiki.
It is one of the best and most used tree widgets written using jQuery.
I have used jsTree on the File Manager (
http://extensions.xwiki.org/xwiki/bin/view/Extension/File+Manager+Applicatiā¦
) and it was a positive experience. Moreover, there are other
extensions based on, like the Dynamic Hierarchy Macro (
http://extensions.xwiki.org/xwiki/bin/view/Extension/Dynamic+Hierarchy+Macro
).
My plan is:
* include jsTree in the default distribution (through a webjar
dependency); it won't be loaded by default, obviously; you'll have to
use Require.js to load it.
* start rewriting the current trees using jsTree
Here's my +1.
Thanks,
Marius
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs
--
Denis Gervalle
SOFTEC sa - CEO
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs