Skip to content

Display version of custom plugins #11256

@FNI18300

Description

@FNI18300

Description

The aim of this proposal is to display the version of custom plugins into MapStore2.
It seems that the best place to display this information is the step 3 when we create MapStore Context, when we display 2 lists (one with available plugins, one with activated plugins).

The major impact will be on the Plugin Defintion : currently, createPlugin method (PluginUtils.js) received name and options and we must be able to provide version.
The second major impact will be on the Create Context Component to display provided version.

Obviously the development must be backward compatible

  • Minor changes to existing features
  • Build related changes

Other useful information

for exemple, on Plugin Signalement (https://github.com/sigrennesmetropole/geor_signalement/tree/master/georchestra-signalement-mapstore-addon), we have the following code :

georchestra-signalement-mapstore-addon/config.js

module.exports = {
    name: "SignalementExtension",
    version: "1.13.0"
    env: "prod"
};

georchestra-signalement-mapstore-addon/js/extensions.js

import Extension from './extension/plugins/SignalementExtension';
import { name } from '../config';

export default {
    [name]: Extension
};

georchestra-signalement-mapstore-addon/js/extension/plugins/SignalementExtension.jsx

import {toModulePlugin} from "@mapstore/utils/ModulePluginsUtils";
import {name} from "../../../config";

export default toModulePlugin(name, () => import(/* webpackChunkName: 'extension' */ './Signalement'));

=> This last file could modify to handle version such as :

import {toModulePlugin} from "@mapstore/utils/ModulePluginsUtils";
import {name} from "../../../config";
**import {version} from "../../../config";**

export default toModulePlugin(name, **version**, () => import(/* webpackChunkName: 'extension' */ './Signalement'));

So there must be modification onto ModulePluginsUtils, PluginUtils and so on.
But we need modification onto ConfigurePluginsStep.jsx to display the version if provided.

This issue is proposal and I propose to carry out the developments described but I would like to discuss the implementation with you before !!

Metadata

Metadata

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions