Skip to content

GSoC 2024 Submission ‐ Make plugin system data based

Frédéric Collonval edited this page Aug 17, 2024 · 3 revisions

Student: Ashok Kumar (@AshokChoudhary11)
Mentor: Frédéric Collonval (@fcollonval)
Organization: Numfocus

Project goals

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.

What is done

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.

  1. Document Widget factory
  2. Command Widget Factory
  3. Extension Panel

Modified code for csvviewer-extension, extensionmanager-extension by adding entrypoint data in respective package.json.

What’s left

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.

Merge or upstream work

All the work is done on a separated branch(poc/plugin-data-based).

Problem faced

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.