Follow-up to #2682289-5: Token ESLint error
We use 2.3.0, the latest version on http://plugins.jquery.com/treetable is 3.2.0. We should ensure that is correctly formatted. and consider using that.
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | upgrade_to_latest-2737889-8.patch | 38.16 KB | hussainweb |
| #8 | interdiff-5-8.txt | 601 bytes | hussainweb |
| #2 | treetable-sshot.png | 41.88 KB | hussainweb |
Comments
Comment #2
hussainwebHere is a patch to upgrade to 3.2.0. It is not straight-forward upgrade as it requires some additional data properties on table rows and CSS changes. We don't need separate images since they are now in the CSS file itself. I have decided to use that itself but if you think we should stick to images, then we can do that as well.
Here is what it looks like:

Comment #5
hussainwebThe tests failed because the XPath to access the rows in tree changed. Fixing...
Comment #8
hussainwebThis should fix the tests.
Comment #9
berdirMission success, @hussainweb has been reactivated ;)
Nice. Wondering if all treetable files should be in their own folder instead of split between css/js? Might be easier to update in the future?
Also always suprised when I find JS libraries like this in contrib modules, not sure if token has a special permission or is just ignoring the rules ;)
Comment #10
berdirA javascript test for the token browser would be a nice project to work on, we could actually open the browser and make it insert tokens into a textfield.
Comment #11
hussainwebIt's good to be back. :)
I think they should be in a separate directory (like core) but I was hoping to discuss that elsewhere (see #2682289-7: Token ESLint error). We could do this here as well. In any case, I don't think it will be very easy to update as I had to change the default theme CSS that came with treetable (it was supposed to be a template anyway).
The treetable plugin is dual licensed MIT and GPL. I think that makes it possible to package?
+1 on the Javascript test. I am a little behind on efforts on PhantomJS in core. That could make this very easy.
Comment #12
dave reidFYI for posterity, the library version currently in use (2.3.0) had to be modified in order to work with Drupal and the usage of the Token browser. Given it was already licensed under GPL/MIT, it was auto-granted an exception to include in the repo.
Comment #14
berdirFine to look into that separately.
It's not (only) a license issue. https://www.drupal.org/node/422996, it's.. complicated ;) But this doesn't make it any worse.
https://www.chapterthree.com/blog/javascript-testing-comes-to-drupal-8 is a good place to start.
Committed, thanks.