Skip to content

feat(plugins): Plugin loading management (MIN-233)

A plugin manager has been created that allows you to load plugins, register them, unload and load them. Allows plugins to receive a DOM element from minerva app and add content to the minerva application. Plugin has access to object window.minerva which contains constantly updated values ​​from the redux store (created temporary example in window.minverva.configuration) and in the future new implemented methods. Loading plugins is related to query params. If there is a plugin hash in the url, it will be loaded at the start.

If you want to read more about implementing own pluign then created documentation in file docs/plugins.md which explains that process.

If you would like to test plugin loading, you can use simple plugins created by me:

  1. https://raw.githubusercontent.com/mateusz-winiarczyk/xx/main/m-plugin-w.js
  2. https://raw.githubusercontent.com/mateusz-winiarczyk/xx/main/w-plugin-minerva.js

plugins

I believe that when we have time, it is worth adding e2e tests to check the functionality of plugins in a real environment

TODO: Remove mocked drawer from MapNavigation.component.tsx when the real one is implemented. It was added to show loading of plugin content.

Edited by mateusz-winiarczyk

Merge request reports