Upgrading
Overview
Upgrading your io.Connect Browser project may include all or some of the following processes, depending on your specific platform implementation:
- Upgrading the libraries used by the Main app.
- Upgrading any customized io.Connect system apps you may be using, such as the Home App, Workspaces App, Intent Resolver, or widget.
- Upgrading the io.Connect libraries used in your interop-enabled client apps.
- Updating app code, configuration, customizations, or stored data affected by breaking changes.
The latest versions of the io.Connect libraries offer new features, improvements, bug fixes, and security updates. Some new features require changes both in the Main app and in Browser Clients, so you may need to upgrade both to use them.
The io.Connect Browser libraries are published in the public NPM registry under the @interopio scope. The changelog for each platform release lists the corresponding versions of the main and additional libraries. These libraries don't necessarily share the same version number.
Upgrading can be done by skipping versions. It isn't required to upgrade in steps from version to version. For instance, if your current version is 4.1, you can upgrade directly to 5.0. The same is valid for all io.Connect libraries. When skipping versions, apply the relevant upgrade instructions for all releases between your current version and the target version.
General Upgrade Guide
To upgrade an existing io.Connect Browser project to a newer version:
- Review the changelog for new features, improvements, and breaking changes in the target release and any releases between your current version and the target version.
- Update the libraries used by the Main app, customized system apps, and Browser Clients to the applicable versions listed in the changelog for the target release.
- Apply the migration instructions for the breaking changes that affect your project, including changes to app code, configuration, and customizations.
- Rebuild and test the updated apps before deploying the upgraded project.
Version to Version Upgrade
The following sections outline the process of upgrading your platform in steps from version to version. Each section describes any specific actions outside the scope of the general upgrade guide you may need to take due to breaking changes in the platform or in any of the io.Connect libraries. If there are no breaking changes, follow the general upgrade guide.
Upgrading from 4.6 to 5.0
Browser Requirements
The browsers used by your clients must provide native support for ES modules, WeakRef, and FinalizationRegistry. Check the additional browser requirements for the features used by your project.
Library Imports
The @interopio/browser and @interopio/browser-platform libraries are published only as ES modules. The browser.umd.js, browser.umd.min.js, and browser.platform.umd.js bundles have been removed.
When using NPM packages, install or update the libraries as project dependencies and import their factory functions from the package roots. Remove UMD script references from your HTML files.
The following example demonstrates importing and initializing the library for the Main app:
import IOBrowserPlatform from "@interopio/browser-platform";
const config = { licenseKey: "my-license-key" };
const { io } = await IOBrowserPlatform(config);The following example demonstrates importing and initializing the library for a Browser Client:
import IOBrowser from "@interopio/browser";
const io = await IOBrowser();Both packages declare "type": "module". When importing an installed package by name, its exports map exposes only the package root and package.json. Replace deep package imports such as @interopio/browser/browser and @interopio/browser-platform/browser.platform with imports from the package roots. This also applies to TypeScript types.
The following example demonstrates importing TypeScript types from the package roots:
import { IOConnectBrowser } from "@interopio/browser";
import { IOConnectBrowserPlatform } from "@interopio/browser-platform";If you load a library from a CDN or your own server, use browser.platform.es.js for the Main app or browser.es.js for a Browser Client. You can import the file URL from a module script or reference it directly in a <script type="module" src="..."> tag. The IOBrowserPlatform() and IOBrowser() factory functions are still attached to the global window object by default. Existing initialization code can use these globals after the library module has executed.
io.Insights
The otel configuration object is deprecated, and its settings are no longer applied. In the IOBrowserPlatform() configuration, move shared settings from the otel top-level key to the insights top-level key. Move the metric settings from the metrics object under otel to the metrics object under insights. Enable both io.Insights and the required signals.
Replace getAdditionalAttributes with additionalAttributes both in the insights object and in its metrics object. The new configuration doesn't support the old property name. You can assign the existing callbacks to the corresponding additionalAttributes properties.
The following example demonstrates migrating callbacks for shared and metric attributes and enabling metrics:
import IOBrowserPlatform from "@interopio/browser-platform";
const getSharedAttributes = () => ({ environment: "production" });
const getMetricAttributes = () => ({ source: "main-app" });
const config = {
licenseKey: "my-license-key",
insights: {
enabled: true,
additionalAttributes: getSharedAttributes,
metrics: {
enabled: true,
additionalAttributes: getMetricAttributes,
url: "https://my-collector.example.com/v1/metrics"
}
}
};
const { io } = await IOBrowserPlatform(config);The io.Insights signal implementations are optional peer dependencies. Install the base package and the packages for the signals used by your app. The following example demonstrates installing the dependencies for metrics:
npm install @interopio/insights-base @interopio/insights-metricsFor traces, also install @interopio/insights-traces. The io.Connect library initializes the Insights API internally when you use it via io.insights. The Main app uses the top-level insights configuration, and the browser object doesn't accept separate insights settings.
The IOConnectBrowserPlatform.Otel namespace has been removed from the TypeScript declarations. Replace references to it with IOConnectBrowserPlatform.Insights.
The type identifier for the metric counting started Workspaces has been renamed from workspace_startup to workspace_started. Update metric filters and overrides that target this counter. The new workspace_startup metric measures startup duration, so retaining the old type would target a different measurement.
ℹ️ For more details on supported settings, signal enablement, and settings inherited by Browser Clients, see the Configuration > io.Connect Browser section in the official io.Insights documentation.
App Definitions & Stored Data
Replace the removed workspacesSandbox property of the details object in app definitions with iframeSandbox, preserving the configured sandbox restrictions.
When upgrading to io.Connect Browser 5.0, clear the local storage, session storage, and IndexedDB data for the platform site before starting the upgraded platform. This prevents reuse of cached app definitions containing the old property, which can cause iframe apps to start without the configured sandbox restrictions.
⚠️ Note that clearing this data will also delete locally stored Layouts and app preferences.
Window Management
The close() method of a WebWindow instance now returns a Promise<boolean> instead of a Promise<WebWindow>. Update code that uses the resolved value to check whether the window was closed. Keep the original window reference if you need to access it after the operation.
The following example demonstrates checking whether a window was closed:
const closed = await myWindow.close();
if (closed) {
console.log("The window has been closed.");
}Layouts
The restore() method of the Layouts API now honors closing prevention by windows and Frame instances when called from an app using @interopio/browser 5.0 or later. Use the RestoreOptions object to control closing prevention and user confirmation.
If a window or a Frame closing handler prevents closing and the Layout restore operation allows prevention, the operation will be rejected unless a confirmation dialog is requested and the user confirms closing. The dialog will appear in the app initiating the Layout restore or, if that app is a Workspace window, in its Workspaces App instance. If the user cancels the operation or the dialog can't be displayed, the Layout restore will be rejected.
⚠️ Note that displaying a confirmation dialog requires modal resources to be configured in the Main app and dialogs to be enabled in the app displaying it.
To force the restore despite closing prevention, configure the RestoreOptions object to ignore prevention.
The following example demonstrates restoring a Global Layout regardless of closing prevention:
const options = {
name: "My Layout",
type: "Global",
allowPrevent: false
};
await io.layouts.restore(options);Closing handlers will still be invoked, but won't be able to prevent the operation.
⚠️ Note that restore requests from apps using
@interopio/browserearlier than 5.0 retain the previous behavior - closing handlers won't be able to prevent the Layout restore operation and confirmation dialogs won't be displayed.
When closing prevention and confirmation are enabled and the restore operation closes existing instances, the custom restore timeout is ignored and an extended timeout is used.
Channels
The add() method of the Channels API now accepts a ChannelContext object instead of a ChannelDefinition object. The data property is required. Add an empty data object to definitions passed to add() if the Channel has no initial context.
The following example demonstrates adding a Channel with an empty context:
const channel = {
name: "My Channel",
meta: { color: "red" },
data: {}
};
await io.channels.add(channel);The onChanged() and onChannelsChanged() methods now invoke registered handlers immediately with the currently joined Channel or Channels. Review handlers that assume they will run only after a later Channel change. They won't be invoked on registration if the window hasn't joined a Channel.
The return types of my() and current() and the Channel argument of the onChanged() handler now include undefined. This reflects the existing behavior when the window hasn't joined a Channel. Handle that case explicitly in code that uses these values.
Notifications
The click() method of the Notifications API now closes the notification by default, even when the clearNotificationOnClick platform setting is false. Previously, calls without click options honored that setting.
To keep a notification open, pass { close: false } as the third argument.
The following example demonstrates clicking a notification action without closing the notification:
const id = notification.id;
const action = "openClientPortfolio";
const options = { close: false };
await io.notifications.click(id, action, options);The method now rejects the request if the specified notification action doesn't exist.
Intents
Replace the removed addIntentListener() method of the Intents API with register(). Replace the renamed AddIntentListenerRequest interface with RegisterIntentRequest. The removed method returned the subscription object synchronously, while register() returns a promise. Await registration before accessing the unsubscribe function or performing work that depends on the handler being registered.
The following example demonstrates awaiting registration and retrieving the unsubscribe function:
const intent = "ViewChart";
const handler = (context) => {
console.log(context);
};
const { unsubscribe } = await io.intents.register(intent, handler);Follow the examples for registering Intent handlers.
Interop
The declared return type of the unregister() method of the Interop API has been corrected from void to Promise<void>. The runtime behavior hasn't changed. Update TypeScript code that relies on the old declaration and await the operation where subsequent work depends on its completion.
App Preferences
The lastUpdate property of the AppPreferences object for app preferences is now a Date instead of a string. Update code that expects a string representation, using the appropriate Date method when a string is needed.
Workspaces
The return types of the getFrame(), getWorkspace(), getWindow(), and getBox() methods of the Workspaces API and of the getBox(), getRow(), getColumn(), getGroup(), and getWindow() methods of a Workspace instance now include undefined. This reflects the existing runtime behavior when no element matches the predicate.
TypeScript projects with strictNullChecks enabled must handle the undefined case explicitly.
The following example demonstrates checking whether a matching Frame instance exists before focusing it:
const predicate = frame => frame.id === "frame-id";
const frame = await io.workspaces.getFrame(predicate);
if (frame) {
await frame.focus();
}Platform Styles
Review custom styles for the "Add Apps" and "Add Workspace" popups. The following CSS variables have been removed:
--workspace-popup-app-title-margin.--workspace-popup-app-title-lh.--workspace-popup-app-placement-section-font-size.--workspace-popup-app-placement-section-lh.--workspace-popup-add-workspace-title-lh.--workspace-popup-app-max-height, which was unused.
Use the new title padding and color variables for customizing the popup headings. The available Workspaces CSS variables include these replacements and other customization options.
FDC3
The @interopio/fdc3 3.0 library conforms to the FDC3 3.0 standard. Update existing calls and types as follows:
| Previous API | Required Change |
|---|---|
getSystemChannels() and joinChannel(). |
Use getUserChannels() and joinUserChannel(). |
String app targets in open(), raiseIntent(), and raiseIntentForContext(). |
Use an AppIdentifier object, e.g., { appId: "my-app" }. |
addContextListener(handler). |
Use addContextListener(null, handler) to listen for all context types. |
onAddContextListener(), onUnsubscribe(), and onDisconnect() on Private Channels. |
Use addEventListener() with the respective event type. |
The OriginatingAppMetadata property of the optionalFeatures object in the result of getInfo(). |
Remove checks for this removed property. |
The timeout for app initialization and startup context delivery via open() has been reduced from 120 to 30 seconds. The request will be rejected with AppTimeout if the timeout expires. Account for this shorter interval in apps that receive startup context.
ℹ️ For more details on the io.Connect integration and links to the official FDC3 API documentation, see the FDC3 Compliance section.
For all else, follow the general upgrade guide.
Upgrading from 4.5 to 4.6
Home App
When upgrading @interopio/home-ui-react, update the getIcon() function in the config object of the <Section /> component used for creating custom Launchpad sections. It must now return { variant: IconVariant } for predefined icons or { src: string } for custom icons instead of a string.
The following example demonstrates returning a predefined icon:
const getIcon = () => ({ variant: "apps" });The following example demonstrates returning a custom icon:
const getIcon = () => ({ src: "https://example.com/icon.svg" });Platform Styles
The Layouts panel in the Launchpad has been redesigned, and several CSS variables in @interopio/theme have been removed or replaced. Update custom styles that use the affected variables:
- Replace the variables for the old Layouts panel with the CSS variables for the Layouts footer:
--launchpad-layouts-check-icon-size,--launchpad-layouts-create-button-margin,--launchpad-layouts-header-height,--launchpad-layouts-header-padding,--launchpad-layouts-no-active-padding,--launchpad-layouts-separator-color,--launchpad-layouts-separator-margin,--launchpad-layouts-separator-size, and--launchpad-layouts-wrapper-margin. - Remove uses of
--launchpad-section-item-actions-desktop-gap,--launchpad-section-item-actions-margin,--launchpad-section-item-actions-mobile-gap, and--workspace-popup-wsp-separator. - Replace
--workspace-popup-app-paddingwith--workspace-popup-app-padding-horizontaland--workspace-popup-app-padding-vertical. - Replace
--workspace-popup-wsp-title-lhand--workspace-popup-wsp-title-paddingwith--workspace-popup-add-workspace-title-lhand--workspace-popup-add-workspace-title-paddingrespectively. - Replace
--workspace-settings-h-paddingand--workspace-settings-v-paddingwith--workspace-settings-padding.
Review the new CSS variables for Workspace dialogs and popups and the Workspace Settings panel when adapting your styles to the redesigned elements.
For all else, follow the general upgrade guide.
Upgrading from 4.4 to 4.5
Follow the general upgrade guide.
Upgrading from 4.3 to 4.4
Follow the general upgrade guide.
Upgrading from 4.2 to 4.3
Follow the general upgrade guide.
Upgrading from 4.1 to 4.2
Follow the general upgrade guide.
Upgrading from 4.0 to 4.1
Widget
The compact mode of the io.Connect widget and the mode property of the WidgetConfig object have been deprecated. Remove the deprecated configuration and references to the WidgetMode type, which has been removed from the library types.
Replace the deprecated "top", "bottom", "left", and "right" positions with the applicable value from WidgetPosition: "top-left", "top-center", "top-right", "center-left", "center-right", "bottom-left", "bottom-center", or "bottom-right". The default position has changed from "bottom" to "bottom-center".
The following example demonstrates configuring the widget position when initializing @interopio/browser:
import IOBrowser from "@interopio/browser";
const config = {
widget: {
enable: true,
position: "top-center"
}
};
const io = await IOBrowser(config);Apply the same position changes to any default widget configuration in the Main app.
For all else, follow the general upgrade guide.
Upgrading from 3.5 to 4.0
License Keys
License keys generated before 8 November 2024 are no longer supported. Contact sales@interop.io to obtain an updated license key and replace the existing key in your Main app configuration. The new license keys are bound to a specific client origin, so ensure that the key covers the origin from which you deploy your platform.
Home App
The Home App has been redesigned, which requires changes to custom implementations using @interopio/home-ui-react.
Configuration
The function passed to the getIOConnectConfig property of the config object for the <IOConnectHome /> component now accepts an object with type and user properties instead of the logged in user object directly. Update your callback to retrieve authentication details from the user property. The type property identifies the configured authentication mechanism. Use the updated Home App configuration example when adapting authentication for the Main app and user details for the Profile panel.
⚠️ Note that enabling the Modals API and configuring modal resources is mandatory for using the Launchpad.
Components & Styles
Update custom components and styles to account for the redesigned Home App:
- The Notification Panel is now in the Home App header area, and the notification badge has been removed from the Launchpad. The old User panel has been deprecated and replaced by the Profile panel in the system dropdown menu. The "More" button has been removed from Launchpad sections.
- Replace the deprecated
HeaderLogoAreaproperty of theworkspacesobject in the Home App configuration withLogoComponentin theheaderobject undercomponentsin the sameworkspacesobject. Follow the instructions for customizing the Logo element. - The
NotificationsPanelandUserPanelproperties of thelaunchpadobject have been deprecated. Adapt customizations to the new Notification Panel and Profile panel. - Replace the deprecated
Sectionsproperty of thelaunchpadobject with thesectionsarray in itscomponentsobject, describing the default and custom Launchpad sections to display. - The
iconName,iconSource,displayCount, andshowAllItemsproperties of theconfigobject for the<Section />component have been deprecated. Update custom Launchpad sections to use the supported configuration. TheisCollapsibleproperty now defaults totrue. Set it explicitly tofalseif your section must remain expanded. - Replace imports and uses of components that are no longer exported:
<HomeAppWorkspace />,<LaunchpadSlidePanel />,<LayoutsPanel />,<Logo />,<NotificationsIcon />,<SearchBar />,<SearchResults />,<SlidePanel />,<UserPanel />, and<UserPanelIcon />. Use the supported Home App components for the affected customizations.
Channels
The publish() method no longer throws an error when the current window is joined to multiple Channels but is restricted from publishing to one or more of them. Data is published to each Channel where publishing is allowed. Update code that relies on rejection of the entire operation when one of the joined Channels restricts publishing.
Intent Resolver
The @interopio/intents-resolver-api and @interopio/intents-resolver-ui-react libraries have been deprecated in io.Connect Browser in favor of @interopio/intent-resolver-ui. The new Intent Resolver is embedded in the client DOM instead of running as a standalone window.
The intents property used to configure the legacy Intent Resolver when initializing @interopio/browser has also been deprecated. When migrating to the new resolver, configure its resources in the Main app and enable it via the intentResolver configuration in the Main app and Browser Clients. Reimplement custom resolver UI using the custom component mechanism of the new library.
⚠️ Note that the legacy Intent Resolver implementations remain supported in io.Connect Browser 4.0. Migrating to the new resolver isn't required solely to upgrade the platform.
Widget
The redesigned widget is embedded in the client DOM instead of running as a standalone app. When using this widget, supply its fonts in addition to its bundle and styles. Without the fonts, the widget icons won't be displayed. The fonts are distributed with @interopio/widget.
The following example demonstrates configuring the widget resources when initializing @interopio/browser-platform:
import IOBrowserPlatform from "@interopio/browser-platform";
const config = {
licenseKey: "my-license-key",
widget: {
sources: {
bundle: "https://my-widget/widget-bundle.js",
styles: ["https://my-widget/styles.css", "https://example.com/custom-styles.css"],
fonts: ["https://my-widget/fonts.css"]
}
}
};
const { io } = await IOBrowserPlatform(config);The legacy widget remains supported in io.Connect Browser 4.0.
Workspaces
The io.Connect Workspaces have been redesigned, which introduces breaking changes when upgrading @interopio/workspaces-ui-react to version 4.0 or later.
These changes affect custom Workspaces Apps that use the affected default components and deployments that customize the default Workspaces App with CSS. If you have entirely replaced the affected components with your own custom components, those component changes won't affect your implementation. If you don't upgrade the library, your existing Workspaces App will still work in io.Connect Browser 4.0.
Update affected components and custom styles:
- Replace
<WorkspaceTabV2 />with<WorkspaceTab />. The legacy version 1 of<WorkspaceTab />has been removed. - Replace the removed
<GlueLogo />component with<Logo />and remove imports of the legacy Glue42 CSS files. - Move customizations of the old "Save Workspace" system popup to the dialog provided by
<WorkspaceTab />. - Update styles for the changed CSS classes of
<Logo />, the background of an empty Workspace, and<WorkspaceTab />. - Account for the changed tab sizing strategy and the position of the "Add Apps" button, which is now to the left of the window group header, after the window tabs.
- Rework custom styles for the restructured HTML and CSS of the "Add Apps" and "Add Workspace" popups using the Workspaces CSS variables.
For all else, follow the general upgrade guide.
Upgrading from 3.4 to 3.5
Widget
The widget is now configured via resources supplied by the Main app. You no longer need to install @interopio/widget in each app or pass the IOBrowserWidget() factory function when initializing the Main app or Browser Clients.
Replace the deprecated channelSelector property of the widget configuration with channels. Move Channel Selector UI settings to the selector object under channels. Use the displayMode property of channels to select whether all Channels or only FDC3 Channels are displayed.
To configure the widget in the Main app, use the widget property in the configuration object for initializing @interopio/browser-platform. Provide URLs pointing to the widget bundle and styles and any default settings to pass to Browser Clients:
import IOBrowserPlatform from "@interopio/browser-platform";
const config = {
licenseKey: "my-license-key",
widget: {
sources: {
bundle: "https://my-widget/widget-bundle.js",
styles: ["https://my-widget/styles.css", "https://example.com/custom-styles.css"]
},
defaultConfig: {
position: "top",
channels: {
selector: {
enable: true,
type: "directional"
}
}
},
blockList: ["https://example.com/*", "https://another-example.com/*"]
}
};
const { io } = await IOBrowserPlatform(config);To request using the widget in a Browser Client, explicitly enable it in the configuration object for initializing @interopio/browser. You can also override the default widget settings from the Main app:
import IOBrowser from "@interopio/browser";
const options = {
widget: {
enable: true,
position: "top",
channels: {
selector: {
enable: true,
type: "default"
}
}
}
};
const io = await IOBrowser(options);For all else, follow the general upgrade guide.
Upgrading from 3.3 to 3.4
Follow the general upgrade guide.
Upgrading from 3.2 to 3.3
Follow the general upgrade guide.
Upgrading from 3.1 to 3.2
Follow the general upgrade guide.
Upgrading from 3.0 to 3.1
Follow the general upgrade guide.
Upgrading to 3.0
See the Migrating to io.Connect Browser section.