jupyterlab / lumino

Lumino is a library for building interactive web applications
https://lumino.readthedocs.io/
Other
598 stars 127 forks source link

Add a 'defer' option to the autoStart argument #588

Closed brichet closed 1 year ago

brichet commented 1 year ago

This PR adds an optional deferred flag to the plugin options. EDIT This PR allows to set the value 'defer' to the autoStart argument of a plugin.

This is related to https://github.com/jupyterlab/jupyterlab/issues/14576.

It also adds a function for activating all deferred plugins, preferably after application startup.

It does not modify the behavior of autoStart, which means that if autoStart: false, the plugin will not be activated using the dedicated function.

brichet commented 1 year ago

Thanks @fcollonval, I updated the PR to include your suggestions.

brichet commented 1 year ago

This is backward-compatible, so an extension with autoStart: 'defer' will still work with a previous version of lumino. This is seen as autoStart: true, the extension will not be deferred but will still be loaded.

brichet commented 1 year ago

removing a Map that is used for a Set.

Thanks @fcollonval, I can't remember why I first used a Map for this use case.

fcollonval commented 1 year ago

removing a Map that is used for a Set.

Thanks @fcollonval, I can't remember why I first used a Map for this use case.

It is not on you it was there from the start of the project :wink: . I think this was used to ensure id uniqueness back in the day where Set did not exist.