node-red / node-red-ui-nodes

Additional nodes for Node-RED Dashboard
Apache License 2.0
117 stars 81 forks source link

Upgrade tabulator to latest version #72

Open Christian-Me opened 2 years ago

Christian-Me commented 2 years ago

As "promised" before I'm testing an upgrade of the tabulator lib to the latest version (4.9.3).

Looks fine so far, but ...

I use the datetime formatter (only available via ui_control). It utilize moment.js AND "moment timezone".

Moment.js is installed and working but moment-timezone not so newDatetime.zt() fails:

tabulator.js line 19039 ...

            var newDatetime = moment(value, inputFormat);

            if (newDatetime.isValid()) {
                return formatterParams.timezone ? newDatetime.tz(formatterParams.timezone).format(outputFormat) : newDatetime.format(outputFormat);
            }

Before digging into unknown territory: @dceejay "Any idea how to get timezone installed / working?"

dceejay commented 2 years ago

On vacation, so no idea off the top of my head. ( moment is also deprecated so we dont really want to add more)

Christian-Me commented 2 years ago

Have a nice vacation .... no worries!

bpfel commented 2 years ago

Hi @Christian-Me, have you looked further into updating tabulator? I've been spending some time on realizing that the nice contextMenu option is only available past 4.8 and ui-table is on 4.4.

Best,

Gianni

Christian-Me commented 2 years ago

A little bit (linked moment.js) but I ran into new problems: https://github.com/olifolkerd/tabulator/issues/3355

Think they are busy working on 5.0 (or better "hope" they are as the last commit was January!). Decided to wait for 5.1 ;) to restart this project. I don't have enough time to start hand fixing the code.

One motivation for upgrading was the context menu too. But you can use the context menu node like I do for example here: https://discourse.nodered.org/t/announce-remote-device-table-and-collaboration-wanted/22505

bpfel commented 2 years ago

Alright thanks alot for the input! I've been following your work with tabulator and node red and enjoyed seeing what one can achieve with those. At the moment I am not really able to contribute but maybe at a later time 👍

Christian-Me commented 2 years ago

The 5.0 branch looks not so depressing ;) So I think heading to 5.x is the best way not spending too much time in fixing things which will change soon. Tabulator aka ui-table is one of my favorite widgets ... Only sorry that it only unveils the hole potential if you dive deep and many low code users are left out. But to design a UI able to config tabulator with more features would be at least challenging and you will never find a way to please all and at the same time keep it simple und usable.

mattaylor commented 2 years ago

Tabulator is currently on 5.1 and has added a ton of new features (refreshFilter!) We are still stuck here on 4.4. Please can we get this updated.

Thanks mat