[xwiki-devs] [VOTE] Use jsTree as the standard library for creating trees in XWiki
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+Applicatio... ) 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
+1 for defining something and lets say I trust you for the choice On Thu, Sep 25, 2014 at 12:11 PM, Marius Dumitru Florea <[email protected]> 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+Applicatio... ) 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 [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne
+1 too. I assume you’ve checked the license, the community and its activity and found them compatible? Thanks -Vincent On 25 Sep 2014 at 12:13:41, Marius Dumitru Florea ([email protected](mailto:[email protected])) 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+Applicatio... ) 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
Hi Marius. I would like to know if you have considered using an AngularJS based tree. Does it exists? Why would not it be a better idea instead of using an 'old-fashion' jQuery tree? Thanks, 2014-09-25 12:24 GMT+02:00 [email protected] <[email protected]>:
+1 too.
I assume you’ve checked the license, the community and its activity and found them compatible?
Thanks -Vincent
On 25 Sep 2014 at 12:13:41, Marius Dumitru Florea ( [email protected](mailto:[email protected])) 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+Applicatio...
) 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 [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Guillaume Delhumeau ([email protected]) Research & Development Engineer at XWiki SAS Committer on the XWiki.org project
On Thu, Sep 25, 2014 at 1:47 PM, Guillaume "Louis-Marie" Delhumeau <[email protected]> wrote:
Hi Marius.
I would like to know if you have considered using an AngularJS based tree.
Yes. Event though the File Manager is based on AngularJS, for the folder tree I've used jsTree.
Does it exists? Why would not it be a better idea instead of using an 'old-fashion' jQuery tree?
See http://ngmodules.org/modules?query=tree . There are a few, but nothing mature and far from being as powerful as jsTree. I've checked the top results and most have only a few commits so they are not actively maintained. Moreover, their authors don't bother to answer the user questions on ngmodules.org AngularJS integrates very well with jQuery so I don't see any problem in using a (very powerful and mature) jQuery tree.
Thanks,
2014-09-25 12:24 GMT+02:00 [email protected] <[email protected]>:
+1 too.
I assume you’ve checked the license, the community and its activity and found them compatible?
Thanks -Vincent
On 25 Sep 2014 at 12:13:41, Marius Dumitru Florea ( [email protected](mailto:[email protected])) 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+Applicatio...
) 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 [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Guillaume Delhumeau ([email protected]) Research & Development Engineer at XWiki SAS Committer on the XWiki.org project _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
Then +1 for me :) 2014-09-25 13:36 GMT+02:00 Marius Dumitru Florea < [email protected]>:
On Thu, Sep 25, 2014 at 1:47 PM, Guillaume "Louis-Marie" Delhumeau <[email protected]> wrote:
Hi Marius.
I would like to know if you have considered using an AngularJS based tree.
Yes. Event though the File Manager is based on AngularJS, for the folder tree I've used jsTree.
Does it exists? Why would not it be a better idea instead of using an 'old-fashion' jQuery tree?
See http://ngmodules.org/modules?query=tree . There are a few, but nothing mature and far from being as powerful as jsTree. I've checked the top results and most have only a few commits so they are not actively maintained. Moreover, their authors don't bother to answer the user questions on ngmodules.org
AngularJS integrates very well with jQuery so I don't see any problem in using a (very powerful and mature) jQuery tree.
Thanks,
2014-09-25 12:24 GMT+02:00 [email protected] <[email protected]>:
+1 too.
I assume you’ve checked the license, the community and its activity and found them compatible?
Thanks -Vincent
On 25 Sep 2014 at 12:13:41, Marius Dumitru Florea ( [email protected](mailto:[email protected])) 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+Applicatio...
) 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 [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Guillaume Delhumeau ([email protected]) Research & Development Engineer at XWiki SAS Committer on the XWiki.org project _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Guillaume Delhumeau ([email protected]) Research & Development Engineer at XWiki SAS Committer on the XWiki.org project
+1 We really need to change the Index's Tree. Thanks, Caty On Thu, Sep 25, 2014 at 3:14 PM, Guillaume "Louis-Marie" Delhumeau < [email protected]> wrote:
Then +1 for me :)
2014-09-25 13:36 GMT+02:00 Marius Dumitru Florea < [email protected]>:
On Thu, Sep 25, 2014 at 1:47 PM, Guillaume "Louis-Marie" Delhumeau <[email protected]> wrote:
Hi Marius.
I would like to know if you have considered using an AngularJS based tree.
Yes. Event though the File Manager is based on AngularJS, for the folder tree I've used jsTree.
Does it exists? Why would not it be a better idea instead of using an 'old-fashion' jQuery tree?
See http://ngmodules.org/modules?query=tree . There are a few, but nothing mature and far from being as powerful as jsTree. I've checked the top results and most have only a few commits so they are not actively maintained. Moreover, their authors don't bother to answer the user questions on ngmodules.org
AngularJS integrates very well with jQuery so I don't see any problem in using a (very powerful and mature) jQuery tree.
Thanks,
2014-09-25 12:24 GMT+02:00 [email protected] <[email protected]>:
+1 too.
I assume you’ve checked the license, the community and its activity
and
found them compatible?
Thanks -Vincent
On 25 Sep 2014 at 12:13:41, Marius Dumitru Florea ( [email protected](mailto:[email protected] )) 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+Applicatio...
) 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 [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Guillaume Delhumeau ([email protected]) Research & Development Engineer at XWiki SAS Committer on the XWiki.org project _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Guillaume Delhumeau ([email protected]) Research & Development Engineer at XWiki SAS Committer on the XWiki.org project _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
On Thu, Sep 25, 2014 at 1:24 PM, [email protected] <[email protected]> wrote:
+1 too.
I assume you’ve checked the license, the community and its activity and found them compatible?
MIT license, same as jQuery. See https://www.openhub.net/p/jstree . The activity is pretty good IMO. As for the community, there's only one maintainer, https://github.com/vakata , that occasionally gets pull requests. This is not perfect, but I doubt you can get much better for a JavaScript widget (it's not a tool-kit or a platform).
Thanks -Vincent
On 25 Sep 2014 at 12:13:41, Marius Dumitru Florea ([email protected](mailto:[email protected])) 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+Applicatio... ) 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 [email protected] http://lists.xwiki.org/mailman/listinfo/devs
On 09/25/2014 06:11 AM, Marius Dumitru Florea 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+Applicatio... ) 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.
Looks flexible enough, although the default style looks too colorful. +1. -- Sergiu Dumitriu http://purl.org/net/sergiu
Hi Marius, Have you also tried other solution ?, and from the popular I know, FancyTree (successor of DynaTree) https://github.com/mar10/fancytree/ look like a good candidate ? Its community looks comparable but it is a bit less popular. Demonstrated features are equivalent and potentially better (my feeling with the demo of jsTree was bad, could be the demo settings however). 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, 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). Since, we have not finished our discussion regarding IE support, I am not confortable with JsTree if we continue support for IE < 9. At least, it would be good to compare these two and have other arguments then popularity to choose JsTree IMO. Regards, On Thu, Sep 25, 2014 at 12:11 PM, Marius Dumitru Florea < [email protected]> 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+Applicatio... ) 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 [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Denis Gervalle SOFTEC sa - CEO
Hi Denis, On Fri, Sep 26, 2014 at 10:23 AM, Denis Gervalle <[email protected]> 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 < [email protected]> 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+Applicatio... ) 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 [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Denis Gervalle SOFTEC sa - CEO _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
Hi, Just a note, did you also check how those trees behave on a mobile browser ? I just quickly opened the jsTree demo on my mobile (in a Chrome browser), and I quickly stopped trying to unfold items before throwing my mobile away as it was very frustrating. At least during my quick test, it was very difficult to correctly tap the tiny arrow icons, and most of the time it would select the line instead of unfolding content. Also I don't know if this demo tree was lazily loaded, but it took few seconds sometimes to unfold after you tap, without any visual clue of something happening. With fancytree unfolding was far easier, but lazy loading just didn't work in my case (or maybe was too slow). This is in no way an exhaustive test and I don't want (and I can't) say that jsTree doesn't behave correctly on mobiles browsers, maybe there are better configurations to apply than the demo, more appropriate for mobiles, maybe should try with another browser, etc... But my feeling is that if you intend to have a responsive UI for xwiki, and usable on browsers, IMHO it should be taken into account when choosing JS libraries and plugins. <off topic> Personally for my apps my favorite tree is the MKTree application [1], even if it doesn't even compete of course in terms of features with the others. It has the advantage of not requiring any javascript writing, you just put a structure of <ul><li> and it's done. In case the tree doesn't require to be dynamic, it's easier for any user to edit the page as the tree structure is very readable in the source. It also degrades nicely in case of javascript not activated, thanks to that. And contrarily to what is said on the extension page, I could use it with a page in syntax 2.1 - I just couldn't make work the expand all / collapse all links for now, but I didn't investigate much on it. It's a very K.I.S.S. alternative ;-) [1] - http://extensions.xwiki.org/xwiki/bin/view/Extension/Mktree+Application </off topic> BR, Jeremie 2014-09-26 11:01 GMT+02:00 Marius Dumitru Florea < [email protected]>:
Hi Denis,
On Fri, Sep 26, 2014 at 10:23 AM, Denis Gervalle <[email protected]> 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 < [email protected]> 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+Applicatio...
) 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 [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Denis Gervalle SOFTEC sa - CEO _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
Note: to be honest, I'm not really sure a mobile browser is the best place to display a very big, rich and deep tree as the all docs index ... I suppose ideally it would be more ergonomic to display something like vertically stacked list boxes, one list for each "level" of the tree, and update the childs dynamically when a level item is selected... To be really really honest, I'm not sure I like ANY tree based UI when the tree is very big and deep (dealing with windows explorer is enough trees for the rest of my day) ;-) IMO as long as you start needing to scroll to see an element and its root parent, it starts becoming slightly painful. Saying that from a "basic user" POV, obviously as a dev I'd love a very big tree from wiki/space/page down to class and objects properties ;-) 2014-09-26 11:44 GMT+02:00 Jeremie BOUSQUET <[email protected]>:
Hi,
Just a note, did you also check how those trees behave on a mobile browser ? I just quickly opened the jsTree demo on my mobile (in a Chrome browser), and I quickly stopped trying to unfold items before throwing my mobile away as it was very frustrating. At least during my quick test, it was very difficult to correctly tap the tiny arrow icons, and most of the time it would select the line instead of unfolding content. Also I don't know if this demo tree was lazily loaded, but it took few seconds sometimes to unfold after you tap, without any visual clue of something happening. With fancytree unfolding was far easier, but lazy loading just didn't work in my case (or maybe was too slow).
This is in no way an exhaustive test and I don't want (and I can't) say that jsTree doesn't behave correctly on mobiles browsers, maybe there are better configurations to apply than the demo, more appropriate for mobiles, maybe should try with another browser, etc... But my feeling is that if you intend to have a responsive UI for xwiki, and usable on browsers, IMHO it should be taken into account when choosing JS libraries and plugins.
<off topic> Personally for my apps my favorite tree is the MKTree application [1], even if it doesn't even compete of course in terms of features with the others. It has the advantage of not requiring any javascript writing, you just put a structure of <ul><li> and it's done. In case the tree doesn't require to be dynamic, it's easier for any user to edit the page as the tree structure is very readable in the source. It also degrades nicely in case of javascript not activated, thanks to that. And contrarily to what is said on the extension page, I could use it with a page in syntax 2.1 - I just couldn't make work the expand all / collapse all links for now, but I didn't investigate much on it. It's a very K.I.S.S. alternative ;-)
[1] - http://extensions.xwiki.org/xwiki/bin/view/Extension/Mktree+Application </off topic>
BR, Jeremie
2014-09-26 11:01 GMT+02:00 Marius Dumitru Florea < [email protected]>:
Hi Denis,
On Fri, Sep 26, 2014 at 10:23 AM, Denis Gervalle <[email protected]> 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 < [email protected]> 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+Applicatio...
) 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 [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Denis Gervalle SOFTEC sa - CEO _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
On Fri, Sep 26, 2014 at 12:44 PM, Jeremie BOUSQUET <[email protected]> wrote:
Hi,
Just a note, did you also check how those trees behave on a mobile browser ?
For jsTree yes.
I just quickly opened the jsTree demo on my mobile (in a Chrome browser), and I quickly stopped trying to unfold items before throwing my mobile away as it was very frustrating. At least during my quick test, it was very difficult to correctly tap the tiny arrow icons, and most of the time it would select the line instead of unfolding content.
The default *theme* of jsTree is not responsive, it just wasn't designed for mobile. This doesn't mean you cannot write a responsive theme. The HTML structure is plain UL and LI elements after all. See http://orangehilldev.com/photonui-jstree-theme/demo/ for an example.
Also I don't know if this demo tree was lazily loaded, but it took few seconds sometimes to unfold after you tap, without any visual clue of something happening. With fancytree unfolding was far easier, but lazy loading just didn't work in my case (or maybe was too slow).
This is in no way an exhaustive test and I don't want (and I can't) say that jsTree doesn't behave correctly on mobiles browsers, maybe there are better configurations to apply than the demo, more appropriate for mobiles, maybe should try with another browser, etc... But my feeling is that if you intend to have a responsive UI for xwiki, and usable on browsers, IMHO it should be taken into account when choosing JS libraries and plugins.
<off topic> Personally for my apps my favorite tree is the MKTree application [1], even if it doesn't even compete of course in terms of features with the others. It has the advantage of not requiring any javascript writing, you just put a structure of <ul><li> and it's done. In case the tree doesn't require to be dynamic, it's easier for any user to edit the page as the tree structure is very readable in the source. It also degrades nicely in case of javascript not activated, thanks to that.
See http://www.jstree.com/docs/html/ and https://github.com/mar10/fancytree/wiki#define-the-tree-data . Both jsTree and FancyTree support static trees build from HTML structure. Thanks, Marius
And contrarily to what is said on the extension page, I could use it with a page in syntax 2.1 - I just couldn't make work the expand all / collapse all links for now, but I didn't investigate much on it. It's a very K.I.S.S. alternative ;-)
[1] - http://extensions.xwiki.org/xwiki/bin/view/Extension/Mktree+Application </off topic>
BR, Jeremie
2014-09-26 11:01 GMT+02:00 Marius Dumitru Florea < [email protected]>:
Hi Denis,
On Fri, Sep 26, 2014 at 10:23 AM, Denis Gervalle <[email protected]> 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 < [email protected]> 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+Applicatio...
) 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 [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Denis Gervalle SOFTEC sa - CEO _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
On Fri, Sep 26, 2014 at 11:01 AM, Marius Dumitru Florea < [email protected]> wrote:
Hi Denis,
On Fri, Sep 26, 2014 at 10:23 AM, Denis Gervalle <[email protected]> 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.
Would be curious to know more about your experience and why you finally choose to use jsTree ? Actually, it seems really because it is the most popular, and it has work on existing project. These could be good argument, I agree, it could be reinforced by more technical ones.
, 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" });
According to the documentation, other properties are copied to node.data, isn't it what happen for icon ? I agree, this looks strange.
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).
http://wwwendt.de/tech/fancytree/doc/jsdoc/FancytreeNode.html#addChildren It is actually an array, they probably support the non-array case for simplicity.
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?
I just said that from their site, they seems to have more extended features, maybe they have the same.
(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?
This was just my feeling, using both demo, not really valuable, I just mention it to minimize the previous argument.
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?
I have simply done some googling on "jsTree IE issues" and similar, with some date limit, to be surprise to see recent report about basic feature completely broken. These have surely been fixed, but it was surprising they get out. Added their wording, I have the feeling that the maintainer is like me, not really a microsoft fan. I am afraid that he fix more than he test, seeing the issues reported. It does not support IE 7 also. Doesn't we still support it ?
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?
From the documentation, this should be tested, I agree. But when you write explicitely your support for IE6, you seems really more concerned than when you write "as well as IE8" !
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.
This is a good argument in favor of jsTree.
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.
My worries are only based on previous feedback read on the net. If with the experience you have, you are confident this is not an issue, let's go for it.
At least, it would be good to compare these two and have other arguments then popularity to choose JsTree IMO.
Popularity is very important.
It is, but I dislike monopoly based on popularity. There tons of popular crap, and much more good unknown stuffs. If you base your choice on popularity, you never choose XWiki :)
Thanks, Marius
Regards,
On Thu, Sep 25, 2014 at 12:11 PM, Marius Dumitru Florea < [email protected]> 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+Applicatio...
) 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 [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Denis Gervalle SOFTEC sa - CEO _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Denis Gervalle SOFTEC sa - CEO
On Fri, Sep 26, 2014 at 1:09 PM, Denis Gervalle <[email protected]> wrote:
On Fri, Sep 26, 2014 at 11:01 AM, Marius Dumitru Florea < [email protected]> wrote:
Hi Denis,
On Fri, Sep 26, 2014 at 10:23 AM, Denis Gervalle <[email protected]> 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.
Would be curious to know more about your experience and why you finally choose to use jsTree ?
Initially I searched for a tree based on AngularJS. I couldn't fine one good enough so I searched for a jQuery tree.
Actually, it seems really because it is the most popular, and it has work on existing project.
Yes, the two main reasons were: popularity and the fact that some people I know have used it already in production (Dynamic Hierarchy Tree).
These could be good argument, I agree, it could be reinforced by more technical ones.
Another reason I chose jsTree is because it has a plugin that offers a context menu and I needed this for the File Manager. As I said, I had a good experience with jsTree while working on the File Manager. The documentation is good. The API is quite easy to use. I prefer camelcase instead of the "_" (underscore) notation they use (as in "select_node") but otherwise I have nothing to complain.
, 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" });
According to the documentation, other properties are copied to node.data, isn't it what happen for icon ? I agree, this looks strange.
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).
http://wwwendt.de/tech/fancytree/doc/jsdoc/FancytreeNode.html#addChildren It is actually an array, they probably support the non-array case for simplicity.
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?
I just said that from their site, they seems to have more extended features, maybe they have the same.
(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?
This was just my feeling, using both demo, not really valuable, I just mention it to minimize the previous argument.
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?
I have simply done some googling on "jsTree IE issues" and similar, with some date limit, to be surprise to see recent report about basic feature completely broken. These have surely been fixed, but it was surprising they get out. Added their wording, I have the feeling that the maintainer is like me, not really a microsoft fan. I am afraid that he fix more than he test, seeing the issues reported. It does not support IE 7 also. Doesn't we still support it ?
We currently support only IE8+ (see http://dev.xwiki.org/xwiki/bin/view/Community/BrowserSupportStrategy ) and (I hope) we're going to drop IE8 and IE9 soon. So I don't think there's a problem here.
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?
From the documentation, this should be tested, I agree. But when you write explicitely your support for IE6, you seems really more concerned than when you write "as well as IE8" !
As I said, we don't support IE6/7, and we're close enough to drop support for IE8.
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.
This is a good argument in favor of jsTree.
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.
My worries are only based on previous feedback read on the net. If with the experience you have, you are confident this is not an issue, let's go for it.
I've used it on the File Manager only. I'll ask some people that have used the Dynamic Hierarchy Macro to see if they had any issues. Maybe they had other use cases than what I had on the File Manager.
At least, it would be good to compare these two and have other arguments then popularity to choose JsTree IMO.
Popularity is very important.
It is, but I dislike monopoly based on popularity. There tons of popular crap, and much more good unknown stuffs. If you base your choice on popularity, you never choose XWiki :)
Thanks, Marius
Regards,
On Thu, Sep 25, 2014 at 12:11 PM, Marius Dumitru Florea < [email protected]> 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+Applicatio...
) 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 [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Denis Gervalle SOFTEC sa - CEO _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Denis Gervalle SOFTEC sa - CEO _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
participants (8)
-
Denis Gervalle -
Ecaterina Moraru (Valica) -
Guillaume "Louis-Marie" Delhumeau -
Jeremie BOUSQUET -
Marius Dumitru Florea -
Sergiu Dumitriu -
Thomas Mortagne -
vincent@massol.net