jupyter / dashboards

[RETIRED] See Voilà as a supported replacement
https://github.com/voila-dashboards
Other
984 stars 211 forks source link

Fix drag drop with Gridstack 0.4.0 #320

Open fx-kirin opened 5 years ago

fx-kirin commented 5 years ago

Hi. Thank you for great plugin. I'm really in to it.

The development here is inactive and not following current Jupyter project. That's sad to me. So I'm trying to make it work with the latest version of Jupyter notebook for several days. As I don't know much about Javascript, nodejs and requirejs, I want a help to fix something odd if they exist.

I started from here. https://github.com/jupyter/dashboards/pull/317

Added gridstack.jQuery.js

First, I tried to load gridstack.jQueryUI.js in dashboard-view.js with requirejs. I followed the instruction of the gridstack.js's README. It said I should follow the stackoverflow answer.

https://stackoverflow.com/questions/35582945/redundant-dependencies-with-requirejs

After that, to load the file, I modified gridstack-custom.js to insert gridstack.jqueryui to define method. But I don't know this is the right way to do it.

Use not compiled js file.

There is a bug not only in jupyter-dashboard plugin but also in gridstack.js because I was having registerPlugin of undefined' error when I loaded gridstack.jQueryUI.js with gridstack.min.js. But it works with gridstack.js.

It seems GridStackUI variable is not currently being well handled.

https://github.com/gridstack/gridstack.js/issues/975

Currently, it seems like working well. Please let me know something to be done.

jstewart37 commented 5 years ago

Hi, I was wondering if you have any idea if this may be merged soon?