Migrating Your Custom Code

The goal of this document is to explain how developers can migrate existing custom code to work with the new sidekick (v7). This information is complementary to what is detailed in Developing for the Sidekick.

Detecting the Sidekick Element

The new sidekick uses a different custom element: look for references to helix-sidekick in your code and change them to aem-sidekick, or, to continue to support both versions until all of your users have switched to the new one, execute the same commands for both.

For a code example how to detect the presence of the sidekick element, see Listening for Events.

Existing Event Listeners

Some event names have changed in the new sidekick for consistency and legibility. Look for references to event names in your code and adjust them where applicable.

Here’s a complete list of event names that have changed:

Event Name in v6 Event Name in v7
helix-sidekick-ready sidekick-ready
envswitched env-switched
pluginused plugin-used
loggedin logged-in
loggedout logged-out
statusfetched status-fetched

For a detailed description of all events, their payloads, and how to listen to them, see Events.

Event Payloads

An event’s payload is now found directly in its event.detail property. Before it was stored in event.detail.data.

Existing Customizations

The config schema remains the same for both versions, so your existing plugins and special views will be compatible with the new sidekick.

See Customizing the Sidekick for a detailed description of all possible customization options.