improved

v32.x migration guide

COYO's plug-in integration is still labeled Beta and thus a lot of changes are happening from one version to another. But of cause we are developers ourselves and we know that constant changes and adaptions can be cumbersome and annoying. With the move to v32.x we hope to stabilize out implementation and make your life easier in the future. To help you move from your current implementation to a new v32.x compatible implementation you can use the following upgrade guide.

Adjust your plug-in's manifest

With v32.x of COYO, we are moving to v2.x of the plug-in manifest schema. You can take a look at the new schema at https://download.coyoapp.com/release/plugins/manifest/manifest_2.0.0.schema.json. There are a few changes that you need to implement:

  1. Rename the top level data property (if existing) to context.
  2. Remove the following values from the context array (if existing): tenantId, tenantUrl, userId.

Adjust your plug-in's implementation

You should be using the new @coyoapp/plugin-adapter to connect your plug-in to the COYO front end. Here are the changes you need to implement:

  1. Install the adapter using npm or yarn:
    npm install @coyoapp/plugin-adapter --save
    
    yarn add @coyoapp/plugin-adapter
    
  2. Remove your implementation of the DataAdapter and ConfigAdapter and replace it with an initialization call to the new plugin adapter:
    const adapter = new PluginAdapter();
    adapter.init().then(data) => {
       // access your context and config values as before
    });
    
  3. Remove your implementation of the HeightAdapter and replace it with a simple method call on the plugin adapter:
    adapter.observeHeight();