-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Develop extensions inside JupyterLab itself #7469
Comments
This kind of dogfooding is a common IDE feature, and I agree it would be nice. I think for the live reload you need some kind of Hot Module Replacement. From the little I've gleaned, there is some way to get webpack to do this. I do not have a solid grasp of how hard this is to set up, but my sense is that it's pretty different from our current build set up, so 🤷♂. It would be pretty cool. Does anyone know anyone from Webpack, or one of the up and coming alternative bundlers? We could really use some domain specific expertise as we try and work out the next version of the build and extension systems. Instead of a It would be dang cool to be able to import random tokens into a cell and be able to mess around with their corresponding instances. Feasible? |
Did somebody say "kernels" in the browser with access to lab itself? I haven't updated jyve for 1.x since a lot of things changed in the kernel/session stuff, but would be more than willing to warm it back up, fight for the extension points it would need, contribute it to core, whatever. I think combined with the jupyterlab-lsp features it could be viable indeed. Who even wants to write typescript? How about writing labextensions in python in lab with pyodide? I jest, but... really, anything we can do to help people get on-board is worth it. webpack-dev-server: while it's a mere additional 54 dev dependencies, you then start adding more stuff... and i'm loathe to make every end user install them. as you mention, webpack is not the endgame. I wish there was more time to invest in making the existing build work better (runtime chunks, service workers, etc) in ways that would benefit every user, but the whole js tooling thing is exhausting, and on most of my projects, I build a lab in ci and ship without nodejs in the lab env because 200 mb of node_modules, half as much in Notebooks as extensions is a whacking good idea. |
@saulshanabrook is hot replacement/autoreload on the server-side (see @telamonian's jupyter/notebook#4795) a part of this vision as well or is it limited to frontend side? |
@krassowski That is a good question. I think that the focus for this issue should be on labextensions, not for conceptual reasons but for practical ones. Autoreload for server extensions involves a completely different part of the Jupyter stack, and a different set of problems. Basically, the autoreload in jupyter/notebook#4795 is an improvement over manually restarting the Notebook server, but only a minimal one. Currently (given the default browser setup), when Notebook autoreload is enabled, the browser/jupyterlab client will restart along with the server. That can probably be worked around (either via (tornado.autoreload.add_reload_hook)[https://www.tornadoweb.org/en/stable/autoreload.html#tornado.autoreload.add_reload_hook] or by just moving the browser handling outside of any tornado app), but it remains to be done. |
Also, since the server takes a good minute to start up in (typescript) watch mode, these two forms of autoreload will clash with each other, somewhat. A possible fix would be to better separate the part of the server that handles build and the part of the server that does the api route handling (the latter of which is probably what you'd want to autoreload when developing server extensions). Maybe this can all be wrapped up with a bow as part of the migration away from Notebook (ie #7416)? |
For some time now https://github.com/jupyterlab/jupyterlab-plugin-playground enables developing extensions inside JupyterLab itself and https://github.com/jupyterlab/ui-profiler enables profiling performance of the UI inside JupyterLab itself (in future will also enable profiling of extensions, jupyterlab/ui-profiler#18). Not closing this issue as this still needs to be documented. |
any updates on hot/live reloading? |
It would be awesome if we could develop extensions inside of JupyterLab itself. A robust extension development community is essential for JupyterLab to flourish and making it easier to get started might help with this.
The user story would be like:
extension.tsx
that has a tempalte for an extension.This would help a lot when getting people up and running to develop extensions, say in a tutorial setting.
There would then need to be some additional steps to set them up to distribute their extension on NPM with a proper build system.
Required technical steps
import
statements client side or create server service to compile JS files.The text was updated successfully, but these errors were encountered: