[xwiki-devs] Where to commit the new tree widget?

Marius Dumitru Florea mariusdumitru.florea at xwiki.com
Fri Oct 3 08:43:43 UTC 2014


Hi devs,

Following the vote on
http://lists.xwiki.org/pipermail/devs/2014-September/057560.html I
started working on a generic tree widget based on jsTree. I'm almost
done now and I'm wondering where's the best place to commit my work.
There are 3 parts:

(1) A generic JavaScript tree widget (used by all trees)

The common practice so far was to put the new JavaScript code in
xwiki-platform-web (resources/uicomponents). But since we started
using webjars I'm wondering if it's not better to create a webjar. The
advantage is that the applications will be able to explicitly declare
a dependency on the tree widget. The downside is that the JavaScript
code is a bit harder to modify. Another option is to put the tree
widget in a JSX object but we may need to use it in Velocity templates
also (e.g. the report step of the DW).

I prefer the webjar.

(2) A couple of wiki pages that define specific trees:

* One page for the All Docs Tree (space-page-child)
* One page for the XWiki Entity Tree
(wiki-space-page-[translations|attachments|objects|properties|sections])
* One page for the Hierarchy Tree (page-child)
* One page for the XAR import tree (space-page)
* others later maybe

I'm hesitating between creating a dedicated module
(xwiki-platform-tree-ui) and putting them in existing modules like the
xwiki-platform-index.

(3) A couple of jobs (Java code) to perform tree operations that can
take time, like deleting or renaming a space.

For these I could use the xwiki-platform-refactoring module since they
are generic operations, not limited to trees. We have a Delete space
entry in the top menu and we probably want a Rename space one.

WDYT?

Thanks,
Marius


More information about the devs mailing list