-
-
Notifications
You must be signed in to change notification settings - Fork 30
GSoC 2024 Submission ‐ Make plugin system data based
Student: Ashok Kumar (@AshokChoudhary11)
Mentor: Frédéric Collonval (@fcollonval)
Organization: Numfocus
The goal of this project was to “Make plugin system data based”. Instead of importing all the js assets in the start we load them when required.
I worked on integrating some entry points(defined in package.json of each extension). A Plugin Registry was required to handle async loading of plugins. Interface of the activate function was changed to return a promise that would resolve once the assets for that plugin are loaded though dynamic imports.
Implemented handling for following entrypoints.
- Document Widget factory
- Command Widget Factory
- Extension Panel
Modified code for csvviewer-extension, extensionmanager-extension by adding entrypoint data in respective package.json.
Proper structure is required for the entrypoints in package.json. Plugin data and each plugin required data needs to be defined. Mime type extensions needed to be loaded dynamically for example json-extension. Fix ui issue when rendering side panel dynamically. Extension manager is not fixed rendered with proper height when activated using entrypoints.
All the work is done on a separated branch(poc/plugin-data-based).
- Enable entrypoints in juputerlab
https://github.com/jupyterlab/jupyterlab_server/pull/445 - Enable document widget entrypoint
https://github.com/jupyterlab/jupyterlab/pull/16590 - Enabled command entrypoint
https://github.com/jupyterlab/jupyterlab/pull/16650 - Enable extension entrypoint
https://github.com/jupyterlab/jupyterlab/pull/16605
It was challenging to find a module capable of handling the asynchronous loading of other modules, as it was written in Lumino code, which I found difficult to understand. My mentor provided invaluable assistance by helping me write the initial code, enabling me to proceed with the work at a faster pace.