Make the Application fully composable#705
Open
fcollonval wants to merge 3 commits intojupyterlab:mainfrom
Open
Make the Application fully composable#705fcollonval wants to merge 3 commits intojupyterlab:mainfrom
Application fully composable#705fcollonval wants to merge 3 commits intojupyterlab:mainfrom
Conversation
jtpio
reviewed
May 28, 2024
5c89d1f to
d722a13
Compare
18 tasks
jtpio
reviewed
Aug 16, 2024
| * party code via plugins. | ||
| */ | ||
| export class Application<T extends Widget = Widget> { | ||
| export class Application<T extends Widget | HTMLElement = Widget> { |
Member
There was a problem hiding this comment.
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?
lumino/packages/application/tests/src/index.spec.ts
Lines 21 to 24 in 0fb17ae
Member
Author
There was a problem hiding this comment.
Yes, although that the ContextMenu API is preventing to make @lumino/widgets an optional dependency;
lumino/packages/application/src/index.ts
Line 70 in 0fb17ae
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This follows the extraction of the plugin logic #703 to make the
Applicationfully composable.It also reduces the constrain on the shell to be a raw html element. The reason to remove the
Widgetconstrains 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).