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.

Comments

hussainweb created an issue. See original summary.

hussainweb’s picture

Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new37.56 KB
new41.88 KB

Here 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:

Status: Needs review » Needs work

The last submitted patch, 2: upgrade_to_latest-2737889-2.patch, failed testing.

The last submitted patch, 2: upgrade_to_latest-2737889-2.patch, failed testing.

hussainweb’s picture

Status: Needs work » Needs review
StatusFileSize
new610 bytes
new38.15 KB

The tests failed because the XPath to access the rows in tree changed. Fixing...

Status: Needs review » Needs work

The last submitted patch, 5: upgrade_to_latest-2737889-5.patch, failed testing.

The last submitted patch, 5: upgrade_to_latest-2737889-5.patch, failed testing.

hussainweb’s picture

Status: Needs work » Needs review
StatusFileSize
new601 bytes
new38.16 KB

This should fix the tests.

berdir’s picture

Mission 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 ;)

berdir’s picture

A 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.

hussainweb’s picture

It'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.

dave reid’s picture

FYI 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.

  • Berdir committed 1c9ee10 on 8.x-1.x authored by hussainweb
    Issue #2737889 by hussainweb: Upgrade to latest jquery treetable
    
berdir’s picture

Status: Needs review » Fixed

Fine to look into that separately.

The treetable plugin is dual licensed MIT and GPL. I think that makes it possible to package?

It's not (only) a license issue. https://www.drupal.org/node/422996, it's.. complicated ;) But this doesn't make it any worse.

+1 on the Javascript test. I am a little behind on efforts on PhantomJS in core. That could make this very easy.

https://www.chapterthree.com/blog/javascript-testing-comes-to-drupal-8 is a good place to start.

Committed, thanks.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.