Reuse the plugin system without depending on the Lumino Widgets
jtpio opened this issue · 3 comments
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 a T extends Widget = Widget
as the generic type for a shell:
lumino/packages/application/src/index.ts
Line 138 in 613dc9d
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 providing never
as the generic type: https://github.com/jupyterlite/jupyterlite/blob/f98c5c0f90f25466aea6beeb4f2bd2ce8549aa68/packages/server/src/app.ts#L17
export class JupyterLiteServer extends Application<never>
@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.