-
Notifications
You must be signed in to change notification settings - Fork 38
Should user explicitly init the declarative widget system #75
Comments
Would this remove the need to preload polymer and the urth channel stuff on every notebook page, even when widgets aren't used? Would that happen after widgets.init()? |
@parente that is the point. Nothing gets preloaded until the cell with unit is ran. Maybe only the minimum js would be on all pages. |
I was after even removing this. For instance, the |
We would still need the extension to have the js available for download. But I agree that nothing needs to be preloaded on the browser, if possible. |
Was doing some experimentation on this. I thought that I could block the kernel from returning from the cell run and orchestrate init though the COM channel. This is not possible because COM channel browser -> kernel is done through the shell channel also. I also did not see a way to pausing running of cells from the browser side. I'm going to leave this one open, but will move to work on something else. |
Thought on how the kernel init code can interact with the browser to cause the init. Using Comm.
CommManager will then become another dependency that would have to be injected into our env. |
Currently this project adds an extension to Jupyter that initializes the Widget system on the Notebook page on load. This assumes that the kernel is ready to start accepting COM messages.
In the case of the Scala Kernel, the user must add the jar for the declarativewidget support and explicitly initialize the widget system (e.g. create a com open handler). To support this, we already have code in place on the JS side that runs after each code cell execution to check if the widget system is ready. There is a default of 10 tries (10 cells executed).
I propose that we reconsider how we are initializing and rather have the user explicitly initialize everything by running kernel code.
In python
In scala
The
init
function would do the following:The text was updated successfully, but these errors were encountered: