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

Make the Application fully composable #705

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

fcollonval
Copy link
Member

@fcollonval fcollonval commented May 27, 2024

This follows the extraction of the plugin logic #703 to make the Application fully composable.

It also reduces the constrain on the shell to be a raw html element. The reason to remove the Widget constrains is to allow other frameworks to be used with the Lumino Application without using the widgets framework (as the context menu can be switched to a custom one).

@fcollonval fcollonval added the enhancement New feature or request label May 27, 2024
@fcollonval fcollonval requested a review from jtpio May 29, 2024 15:41
@@ -39,7 +39,7 @@ export { type IPlugin };
* UI applications with the ability to be safely extended by third
* party code via plugins.
*/
export class Application<T extends Widget = Widget> {
export class Application<T extends Widget | HTMLElement = Widget> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to have the full picture here, and to provide more context for the future when looking back at that PR.

The main purpose for allowing an HTMLElement directly would be for apps reusing the Lumino plugin system to not have to depend on @lumino/widgets to instantiate a placeholder shell widget, for example like in the following example?

const shell = new Widget();
const app = new Application({
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 this pull request may close these issues.

2 participants