Closed jtpio closed 6 months ago
@echarles if you have more examples or use cases feel free to add them here, thanks!
Thx @jtpio for logging this. I can share for now https://github.com/datalayer-examples/jupyterlab-extensions-example/blob/main/test/lumino-inject.spec.ts which aims to showcase generic dependency injection based on Lumino. I will feed more there and document what could be done if we would abstract away from Widget.
We could provide an raw ABCApplication
than encapsulated only the plugin logic without command registry, context menu and shell.
Or simply template without restrictions the context menu and the shell.
Problem
The Lumino plugin system is simple and powerful. It could also be used for other purposes that don't necessarily provide UI elements to the interface.
However the Lumino
Application
currently requires aT extends Widget = Widget
as the generic type for a shell:https://github.com/jupyterlab/lumino/blob/613dc9df19652316a8e32c704d4937fcd43983cc/packages/application/src/index.ts#L138
Proposed Solution
Make it possible to use the plugin and dependency injection system without a shell.
Additional context
This was discussed with @echarles during JupyterCon 2023.
For reference JupyterLite uses a Lumino application without a
shell
by providingnever
as the generic type: https://github.com/jupyterlite/jupyterlite/blob/f98c5c0f90f25466aea6beeb4f2bd2ce8549aa68/packages/server/src/app.ts#L17