Hello,
I'm beginning to look into porting the nbextensions I've developed to JupyterLab as labextensions, and after combing through the JupyterLab documentation, I have a couple questions.
1) Does JupyterLab have client-side event hooks for creating and editing notebook cells? For example, in Jupyter Notebook I can fire off events in response to creating a cell or changing the cell's mode (such as with the code shown below). But so far I haven't been able to find the equivalent functionality in JupyterLab.
$([Jupyter.events]).on('create.Cell', function(event, target) {
// Do something
});
$([Jupyter.events]).on('edit_mode.Cell', function(event, target) {
// Do something
});
$([Jupyter.events]).on('command_mode.Cell', function(event, target) {
// Do something
});
2) So far I've found labextension development to be somewhat slow. Part of that is definitely just me getting over the learning curve, but part of it may also be that my development process needs to be altered to better fit the JupyterLab environment.
a) By default, JupyterLab bundles the client-side assets in labextensions, but doesn't seem to provide a source map. So when I have an error in my labextension's Javascript, it's difficult to trace the error back to the offending line of code. Is there a place I'm supposed to enable source maps in the JupyterLab config or a command line option? (I've noticed the --dev-mode command line option, but so far that hasn't worked for me.)
b) In Jupyter Notebook, when developing nbextensions, I did most of my exploration of the available method calls and framework through the browser's Javascript console. I could call the top-level Jupyter variable and then use that to explore all of the available properties and methods of that object. So far I haven't seen an easy way to do something similar in JupyterLab. Is there a recommended way to explore the available methods, models and hooks?
Thanks for any help anyone can offer!
Thorin Tabor