Skip to content
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

Reuse the plugin system without depending on the Lumino Widgets #586

Closed
jtpio opened this issue May 14, 2023 · 3 comments · Fixed by #703
Closed

Reuse the plugin system without depending on the Lumino Widgets #586

jtpio opened this issue May 14, 2023 · 3 comments · Fixed by #703
Labels
enhancement New feature or request

Comments

@jtpio
Copy link
Member

jtpio commented May 14, 2023

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:

export class Application<T extends Widget = Widget> {

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>
@jtpio jtpio added enhancement New feature or request status:Needs Triage labels May 14, 2023
@jtpio
Copy link
Member Author

jtpio commented May 14, 2023

@echarles if you have more examples or use cases feel free to add them here, thanks!

@echarles
Copy link
Member

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.

@fcollonval
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants