Skip to main content

Changelog

Breaking Changes

⚠️ Note that each breaking change is listed under all libraries it affects.

ℹ️ For more details on upgrading your project to io.Connect Browser 5.0, see the Upgrading section.

@interopio/browser

  • The library is now published only as an ES module. Removed browser.umd.js and browser.umd.min.js. Replace UMD loading with ES module imports or module script tags. Deep imports into installed packages are no longer supported. Import the library and its types from the package root.
  • The browser must now provide native support for WeakRef and FinalizationRegistry.
  • The close() method of a WebWindow instance now returns a Promise<boolean> instead of a Promise<WebWindow>. The resolved value indicates whether the window has been closed.
  • The restore() method of the Layouts API now honors closing prevention by registered handlers on windows and Frame instances when called from an app using @interopio/browser 5.0 or later, unless the restore is explicitly configured to ignore it. Restoring a Global Layout will be rejected if closing is prevented and a confirmation dialog can't be displayed because modal resources aren't configured in the Main app or dialogs aren't enabled in the app displaying it. Calls from apps using @interopio/browser earlier 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. Configure confirmation dialogs or use a RestoreOptions object to force the restore despite prevention.
  • Corrected the declared return type of the unregister() method of the Interop API from void to Promise<void>. This is a type correction only, the runtime behavior hasn't been changed.
  • The add() method of the Channels API now accepts a ChannelContext object instead of a ChannelDefinition object, the data property of which is required. Provide an empty data object if the Channel has no initial context.
  • The onChanged() and onChannelsChanged() methods of the Channels API now invoke the registered handlers immediately with the currently joined Channel or Channels. The handlers won't be invoked if the window hasn't joined a Channel. The return types of the my() and current() methods and the Channel argument of the onChanged() handler now include undefined, reflecting the existing behavior when the window hasn't joined a Channel.
  • The lastUpdate property of the AppPreferences object is now a Date instead of a string.
  • The click() method of the Notifications API now closes the notification by default, even when the clearNotificationOnClick platform setting is set to false. Previously, calls without click options honored that setting. To keep the notification open, pass { close: false } as a third argument. The method now also rejects the request if the specified notification action doesn't exist.
  • Removed the deprecated addIntentListener() method of the Intents API. Use the register() method instead and await registration before accessing the unsubscribe function. Renamed the AddIntentListenerRequest interface to RegisterIntentRequest.
  • Removed the deprecated workspacesSandbox property from the details object of app definitions. Use iframeSandbox instead.

@interopio/browser-platform

  • The library is now published only as an ES module. Removed browser.platform.umd.js. Replace UMD loading with ES module imports or module script tags. Deep imports into installed packages are no longer supported. Import the library and its types from the package root.
  • The browser must now provide native support for WeakRef and FinalizationRegistry.
  • Deprecated the otel configuration object in favor of insights. The settings in the deprecated object are no longer applied. Migrate the metric settings and enable the required signals. Removed the IOConnectBrowserPlatform.Otel namespace from the TypeScript declarations. Use IOConnectBrowserPlatform.Insights instead.
  • Renamed the type identifier for the metric counting started Workspaces from workspace_startup to workspace_started. Update metric filters and overrides accordingly. The new workspace_startup metric measures startup duration.
  • The close() method of a WebWindow instance now returns a Promise<boolean> instead of a Promise<WebWindow>. The resolved value indicates whether the window has been closed.
  • The restore() method of the Layouts API now honors closing prevention by registered handlers on windows and Frame instances when called from an app using @interopio/browser 5.0 or later, unless the restore is explicitly configured to ignore it. Restoring a Global Layout will be rejected if closing is prevented and a confirmation dialog can't be displayed because modal resources aren't configured in the Main app or dialogs aren't enabled in the app displaying it. Calls from apps using @interopio/browser earlier 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. Configure confirmation dialogs or use a RestoreOptions object to force the restore despite prevention.
  • Corrected the declared return type of the unregister() method of the Interop API from void to Promise<void>. This is a type correction only, the runtime behavior hasn't been changed.
  • The add() method of the Channels API now accepts a ChannelContext object instead of a ChannelDefinition object, the data property of which is required. Provide an empty data object if the Channel has no initial context.
  • The onChanged() and onChannelsChanged() methods of the Channels API now invoke the registered handlers immediately with the currently joined Channel or Channels. The handlers won't be invoked if the window hasn't joined a Channel. The return types of the my() and current() methods and the Channel argument of the onChanged() handler now include undefined, reflecting the existing behavior when the window hasn't joined a Channel.
  • The lastUpdate property of the AppPreferences object is now a Date instead of a string.
  • The click() method of the Notifications API now closes the notification by default, even when the clearNotificationOnClick platform setting is set to false. Previously, calls without click options honored that setting. To keep the notification open, pass { close: false } as a third argument. The method now also rejects the request if the specified notification action doesn't exist.
  • Removed the deprecated addIntentListener() method of the Intents API. Use the register() method instead and await registration before accessing the unsubscribe function. Renamed the AddIntentListenerRequest interface to RegisterIntentRequest.
  • Removed the deprecated workspacesSandbox property from the details object of app definitions. Use iframeSandbox instead and clear the platform site storage before starting the upgraded platform.

⚠️ Note that clearing this data will also delete locally stored Layouts and app preferences.

@interopio/fdc3

Updated the library to conform to the FDC3 3.0 standard, including the following changes to the previously supported API:

  • Removed getSystemChannels() and joinChannel(). Use getUserChannels() and joinUserChannel() instead.
  • Removed string app targets from open(), raiseIntent(), and raiseIntentForContext(). Use an AppIdentifier object - e.g., { appId: "my-app" }.
  • Removed the addContextListener(handler) overload. Use addContextListener(null, handler) to listen for all context types.
  • Removed the onAddContextListener(), onUnsubscribe(), and onDisconnect() methods of Private Channels. Use addEventListener() with the respective event type instead.
  • Removed the OriginatingAppMetadata property of the optionalFeatures object from the result of getInfo().
  • Reduced the timeout for app initialization and startup context delivery via open() from 120 to 30 seconds. The request will be rejected with AppTimeout if the timeout expires.

@interopio/theme

  • Removed the --workspace-popup-app-title-margin, --workspace-popup-app-title-lh, --workspace-popup-app-placement-section-font-size, --workspace-popup-app-placement-section-lh, and --workspace-popup-add-workspace-title-lh CSS variables as part of the changes to the "Add Apps" and "Add Workspace" popups. Use the new title padding and color variables for customizing the popup headings.
  • Removed the unused --workspace-popup-app-max-height CSS variable.

@interopio/workspaces-api

New Features

⚠️ Note that each new feature is listed under all libraries it affects.

@interopio/browser

Preventing Window Closing & Layout Restore

You can now execute custom logic before an io.Connect Window closes and prevent closing it via the onClosing() method of a WebWindow instance. The callback receives a prevent() function and can perform asynchronous operations before completing:

const myWindow = io.windows.my();
let hasUnsavedChanges = true;

const handler = async (prevent) => {
    if (hasUnsavedChanges) {
        prevent();
    }
};

const unsubscribe = myWindow.onClosing(handler);

The close() method now accepts a CloseOptions object as an argument in which you can specify whether to allow the window to prevent closing and whether to show a confirmation dialog to the user:

const options = {
    allowPrevent: true,
    showDialog: true
};

await myWindow.close(options);

The dialog will be shown only when the closing operation allows prevention, requests a dialog, and a handler prevents closing. It will appear in the window being closed or, for a Workspace window, in its Workspaces App instance.

⚠️ 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.

⚠️ Note that stopping an app instance via the App Management API will invoke its closing handlers, but will stop the instance even if a handler invokes prevent().

Closing handlers aren't invoked when the user closes the native browser window.

The RestoreOptions object passed to the restore() method now supports controlling closing prevention and user confirmation for windows and Frame instances being closed during a Global Layout restore. If a 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.

The following example demonstrates how to restore a Global Layout while allowing the current apps to prevent closing:

const options = {
    name: "My Layout",
    type: "Global",
    closeRunningInstances: true,
    allowPrevent: true,
    showDialog: true
};

await io.layouts.restore(options);

To force the restore despite closing prevention, configure the RestoreOptions object to ignore prevention. Closing handlers will still be invoked, but won't be able to prevent the operation.

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.

Intents

The filterHandlers() method now supports filtering a supplied set of Intent handlers and retrieving the selected Intent name.

The FilterHandlersResult object has an intent property. When the Intent Resolver is opened and the user selects an Intent handler, this property holds the name of the Intent selected by the user:

const filter = {
    contextTypes: ["fdc3.instrument"],
    openResolver: true
};

const { handlers, intent } = await io.intents.filterHandlers(filter);

console.log(`The user selected the "${intent}" Intent handled by "${handlers[0].applicationName}".`);

To apply the filtering criteria to a specific set of Intent handlers, use the handlers property of the HandlerFilter object. If no handlers are supplied, the criteria will be applied to all available handlers.

The following example demonstrates filtering the handlers of an Intent retrieved with the find() method:

const intentName = "ViewChart";
const [intent] = await io.intents.find(intentName);

const filter = {
    handlers: intent.handlers,
    contextTypes: ["fdc3.instrument"],
    openResolver: false
};

const { handlers } = await io.intents.filterHandlers(filter);

console.log(handlers);

You can now pass metadata when raising an Intent. Use the metadata property of the IntentRequest object passed to the raise() method. The metadata will be passed as a third argument to the handler registered with the register() method:

// Registering an Intent handler.
const intentName = "ViewOrder";
const handler = (context, caller, metadata) => console.log(metadata);

await io.intents.register(intentName, handler);

// Raising an Intent with metadata.
const intentRequest = {
    intent: intentName,
    context: { type: "fdc3.order", data: { id: "ORD-42" } },
    metadata: { correlationId: "req-8f2c" }
};

await io.intents.raise(intentRequest);

FDC3 Context Metadata in Channels

The Channels API now supports publishing and retrieving metadata for FDC3 contexts. Pass the metadata in the fdc3 object of the options for the publish() method and set enabled to true. Use custom for metadata specific to your app.

The following example demonstrates publishing an FDC3 context with custom metadata via the Channels API:

const context = {
    type: "fdc3.instrument",
    id: { ticker: "MSFT" }
};

const options = {
    name: "Red",
    fdc3: {
        enabled: true,
        metadata: { custom: { workflow: "portfolio" } }
    }
};

await io.channels.publish(context, options);

The metadata is available in the fdc3Metadata property of the data object in the Channel contexts retrieved via get(), getMy(), and getMyChannels(), and in the fdc3Metadata property of the data object passed to the callbacks registered via subscribe() and subscribeFor().

Closing Notifications on Click

You can now specify whether to close a notification when invoking the click() method of the Notifications API. Use the close property of the third argument to override the clearNotificationOnClick platform setting for that operation. The close property defaults to true:

const id = notification.id;
const options = { close: false };

await io.notifications.click(id, undefined, options);

Updating Interop Methods

It's now possible to update the properties of an already registered Interop method by using the updateMethod() method of the Interop API. Pass the name of a method registered by your app and an object with the properties to update. Omitted properties will retain their current values:

const methodName = "MyMethod";
const update = {
    displayName: "My Method",
    description: "Calculates the sum of two numbers.",
    version: 2
};

await io.interop.updateMethod(methodName, update);

You can update the displayName, description, objectTypes, version, and flags properties of the method. The flags object will be replaced entirely. The name, the input and output signatures, and the handler of an Interop method can't be updated. Interop streams can't be updated.

To get notified when an app updates the properties of an Interop method it offers, use the serverMethodUpdated() method:

const handler = (info) => {
    const serverName = info.server.application;
    const methodName = info.method.name;
    console.log(`Interop server "${serverName}" has updated method "${methodName}".`);
};

io.interop.serverMethodUpdated(handler);

io.Insights

Browser Clients can now publish custom metrics and create custom traces via the Insights API, alongside the automatic tracing of io.Connect API operations and app lifecycle events. Default platform metrics are published only by the platform. Publishing logs via io.Insights isn't supported.

When using the Insights API via io.insights, the @interopio/browser library handles the initialization of @interopio/otel internally. The io.Insights base, metrics, and traces packages are optional peer dependencies. To use io.Insights, install the base package and the packages for the signals you want to publish. The following command installs support for both metrics and traces:

npm install @interopio/insights-base @interopio/insights-metrics @interopio/insights-traces

Configuration & Usage

Browser Clients automatically receive the io.Insights settings of the Main app when they connect to the platform and don't need to repeat its configuration. The trace and auto instrumentation settings configured in the Main app apply to all Browser Clients unless overridden.

To override settings for a specific Browser Client or define its custom metrics and metric filters, use the insights object when initializing @interopio/browser. Client settings are merged with the settings received from the Main app and take precedence over them. Platform metric definitions and metric filters aren't inherited by Browser Clients.

The following example demonstrates overriding inherited settings for metrics and traces, executing an operation within a custom span, and updating a custom counter:

import IOBrowser from "@interopio/browser";

const metricName = "myApp.orderCalculations";

const config = {
    insights: {
        enabled: true,
        // Enabling metric exports and configuring a custom counter.
        metrics: {
            enabled: true,
            url: "https://my-collector.example.com/v1/metrics",
            metrics: [
                {
                    type: "custom_counter",
                    name: metricName
                }
            ],
            // Excluding metric values with a matching attribute.
            filters: [
                {
                    name: metricName,
                    attributes: { operation: "preview" },
                    enabled: false
                }
            ]
        },
        // Enabling trace exports.
        traces: {
            enabled: true,
            url: "https://my-collector.example.com/v1/traces",
            // Enabling spans with this source prefix and allowing them to start a trace.
            filters: [
                {
                    source: "myApp.orders",
                    enabled: true,
                    canBeRoot: true,
                    level: "INFO"
                }
            ]
        }
    }
};

const io = await IOBrowser(config);

// Retrieving the custom metric configured during initialization.
const calculationCounter = io.insights.metrics.get(metricName);
const order = { id: "12345", quantity: 10, price: 125 };

const calculateTotal = (tracingState) => {
    const total = order.quantity * order.price;
    const level = "INFO";
    const data = { orderId: order.id, total };

    // Attaching data to the current span.
    tracingState.addData(level, data);

    return total;
};

const source = "myApp.orders.calculateTotal";

// Executing an operation within a custom span.
const total = io.insights.traces.withSpan(source, calculateTotal);

const count = 1;
const attributes = { operation: "calculateTotal" };

// Incrementing the custom counter with attributes for this measurement.
calculationCounter.add(count, attributes);

ℹ️ For more details on configuring io.Insights in Browser Clients and using the Insights API, see the Configuration > io.Connect Browser and Insights API > JavaScript sections in the official io.Insights documentation.

@interopio/browser-platform

io.Insights

io.Connect Browser now supports io.Insights traces alongside default platform metrics and custom metrics. The Main app can create custom metrics and spans via io.insights on the io object returned by IOBrowserPlatform(). Publishing logs via io.Insights isn't supported by the platform or by Browser Clients.

Platform Traces & Metrics

Automatic traces capture io.Connect API operations and app lifecycle events, including operations spanning multiple apps. Depending on the configuration, tracing can also capture user interactions, network activity, app performance, and errors.

Added metrics for measuring Workspace startup and its individual stages:

Metric Type Description
workspace_startup Workspace startup duration.
workspace_startup_apps Duration of starting the apps in the Workspace.
workspace_startup_component Startup duration of a Workspace component.
workspace_startup_frame Duration of starting the Workspaces App instance.
workspace_startup_frame_init Duration of initializing the Workspaces App.
workspace_startup_frame_page_load Duration of loading the Workspaces App page.
workspace_startup_frame_workspace_render Duration of rendering the Workspace in the Workspaces App.

Added the app_duration_soft metric, which reports the time on focus of the currently focused app at every publishing interval, without waiting for the app to lose focus. The metric is disabled by default.

Configuration

When using the Insights API via io.insights in the Main app, the @interopio/browser-platform library handles the initialization of @interopio/otel internally. The io.Insights base, metrics, and traces packages are optional peer dependencies. To use io.Insights, install the base package and the packages for the signals you want to publish. The following command installs support for both metrics and traces:

npm install @interopio/insights-base @interopio/insights-metrics @interopio/insights-traces

Provide the configuration via the top-level insights object when initializing @interopio/browser-platform. Enable io.Insights and each required signal, and provide the collector URLs and settings for publishing telemetry. These settings also apply to the Insights API in the Main app. The browser configuration object doesn't accept separate insights settings.

When traces are enabled, Click Stream and App Startup tracing are enabled by default in the Main app and Browser Clients, unless explicitly disabled.

The following example enables io.Insights and publishing of platform metrics and traces:

import IOBrowserPlatform from "@interopio/browser-platform";

const config = {
    licenseKey: "my-license-key",
    insights: {
        enabled: true,
        // Enabling platform metrics and customizing a predefined metric.
        metrics: {
            enabled: true,
            url: "https://my-collector.example.com/v1/metrics",
            metrics: [
                {
                    type: "workspace_startup",
                    name: "workspace_startup",
                    buckets: [1000, 5000, 10000, 30000]
                }
            ],
            // Excluding measurements that don't include starting a new Frame instance.
            filters: [
                {
                    type: "workspace_startup",
                    attributes: { includesFrameCreation: false },
                    enabled: false
                }
            ]
        },
        // Enabling trace exports.
        traces: {
            enabled: true,
            url: "https://my-collector.example.com/v1/traces"
        }
    }
};

const { io } = await IOBrowserPlatform(config);

Settings Inheritance & Headers

Connected Browser Clients inherit selected platform defaults, including collector settings, trace settings, and static headers. Each client defines its own custom metrics and metric filters.

Header callbacks configured on the platform apply only to its own telemetry exports. To provide dynamic headers for a Browser Client, such as a rotating authorization token, configure a callback via the headers property of the insights object in that app. For headers specific to one signal, use the headers property of the metrics or traces object under insights.

Functions, promises, and live SDK instances such as readers and exporters aren't transferred to connected apps. The exceptions are the additionalAttributes and additionalResourceAttributes functions of the insights object, which are called once when a Browser Client connects, and their results are sent to it. Configure callbacks and SDK objects in the app that uses them. When the platform uses custom metric readers, exporters, a meter provider, or an existing OpenTelemetry SDK, client metrics won't be enabled automatically. Each client must enable and configure its own metrics.

ℹ️ For more details on configuring io.Insights in the Main app, see the Configuration > io.Connect Browser > Enabling io.Insights section in the official io.Insights documentation.

Preventing Window Closing & Layout Restore

Added support for preventing closing windows and Frame instances, displaying confirmation dialogs, and allowing apps to prevent Global Layout restore.

Use the closeHandlers property of the windows object to enable or disable window and Frame closing handlers and specify how long to wait for them to complete. App definitions can override these settings for window closing handlers via the closeHandlers property of the details object. Frame closing handlers use the global settings.

The following example demonstrates how to allow up to five seconds for window and Frame closing handlers to complete:

import IOBrowserPlatform from "@interopio/browser-platform";

const config = {
    licenseKey: "my-license-key",
    windows: {
        closeHandlers: {
            enabled: true,
            timeout: 5000
        }
    }
};

const { io } = await IOBrowserPlatform(config);

Placeholder App

Added the Placeholder App, displayed automatically when restoring a Global Layout or a Workspace containing an app that is no longer defined. It preserves the position of the missing app, and saving the Layout retains the original app information so that it can be restored when the app becomes available again.

You can customize the Placeholder App with the IOPlaceholderApp components of @interopio/components-react or provide your own app with the reserved name io-connect-placeholder-app.

Intents

Added support for filtering a supplied set of Intent handlers, returning the selected Intent name from filterHandlers(), and passing metadata to Intent handlers.

FDC3 Context Metadata in Channels

Added support for publishing and retrieving FDC3 context metadata via the Channels API.

Closing Notifications on Click

Added support for overriding the clearNotificationOnClick setting for individual notification clicks via the close option.

Updating Interop Methods

Added support for updating registered Interop method properties via updateMethod() and receiving updates via serverMethodUpdated().

Workspaces

Added support for showing and hiding window group headers and for the new Workspaces closing, tracing, and startup metrics capabilities.

@interopio/fdc3

FDC3 3.0

io.Connect Browser 5.0 is certified as conforming to the FDC3 3.0 standard. The @interopio/fdc3 library now implements the FDC3 3.0 API, including closing the current app, clearing Channel contexts, context clearing events, listeners for multiple context types, and registering Intent listeners for specific context types.

Added support for metadata in app startup, context broadcasts, Intent requests, and Intent results. Apps can retrieve stored contexts with their metadata and specify whether raising an Intent should start a new app instance or use an existing instance.

@interopio/intent-resolver-ui

Added support for restricting the Intent Resolver to a supplied set of handlers and returning the selected Intent name.

@interopio/theme

Added CSS variables for customizing the styles of the following io.Connect Browser apps and UI components:

Launchpad Sections

Variable Description
--launchpad-section-header-inner-gap Gap between the columns in the headers of the main Launchpad sections.
--launchpad-section-header-left-column-gap Gap between the collapse button and the icon in the headers of the main Launchpad sections.
--launchpad-section-header-nested-padding-left Left padding for the headers of the first nested Launchpad sections.
--launchpad-section-header-root-padding-left Left padding for the headers of the main Launchpad sections.
--launchpad-section-indent-step Additional left padding per nesting level beyond the first nested section. Applies to headers and items.
--launchpad-section-item-nested-padding-left Left padding for items in the first nested Launchpad sections.
--launchpad-section-item-root-padding-left Left padding for items in the main Launchpad sections.

Launchpad Context Menus

Variable Description
--home-context-menu-header-height Height for the context menu header.
--home-context-menu-header-padding-with-subtitle Padding for the context menu header when it contains a subtitle.
--home-context-menu-header-padding Padding for the context menu header.
--home-context-menu-subtitle-lh Line height for the context menu subtitle.
--home-context-menu-title-color Color for the context menu title.
--home-context-menu-title-with-subtitle-color Color for the context menu title when the header contains a subtitle.
--home-context-menu-title-with-subtitle-font-size Font size for the context menu title when the header contains a subtitle.
--home-context-menu-title-with-subtitle-line-height Line height for the context menu title when the header contains a subtitle.

Workspace Tabs, Dialogs & Popups

Variable Description
--workspace-popup-add-workspace-title-color Color for the title of the "Add Workspace" popup.
--workspace-popup-app-button-padding Padding for the buttons in the "Add Apps" popup.
--workspace-popup-app-filter-padding Padding for the filter section in the "Add Apps" popup.
--workspace-popup-app-title-color Color for the title of the "Add Apps" popup.
--workspace-popup-app-title-padding Padding for the title of the "Add Apps" popup.
--workspace-popup-subtitle-color Color for the subtitle in the Workspace tab menu.
--workspace-window-tab-title-lh Line height for the titles of Workspace window tabs.

Lists

Variable Description
--list-item-left-column-gap Gap between the elements in the left column of a list item.
--list-item-right-column-gap Gap between the elements in the right column of a list item.

The following example demonstrates how to customize Workspace window tab titles and the spacing of the buttons in the "Add Apps" popup:

#root {
    --workspace-window-tab-title-lh: 20px;
    --workspace-popup-app-button-padding: 12px 16px;
}

@interopio/workspaces-api

App Restrictions

You can now restrict the apps that users can add to a Workspace via the "Add Apps" popup. Use the appRestrictions property of the WorkspaceConfig object to specify a default rule and rules for individual apps. Individual app rules will override the default rule.

The following example demonstrates defining app restrictions when creating a Workspace:

const definition = {
    children: [
        {
            type: "group",
            children: [
                {
                    type: "window",
                    appName: "app-one"
                }
            ]
        }
    ],
    config: {
        title: "My Workspace",
        appRestrictions: {
            // Rules for individual apps that will override the default rule.
            apps: [
                { appName: "app-two", allowInApplicationPopup: true }
            ],
            // Default rule for all apps.
            default: { allowInApplicationPopup: false }
        }
    }
};

const workspace = await io.workspaces.createWorkspace(definition);

The restrictions are also available via the appRestrictions property of the Workspace and WorkspaceSummary objects. These restrictions apply to the popup and don't prevent apps from being added programmatically.

Window Group Header Visibility

You can now show and hide the header of a window group via its showHeader() and hideHeader() methods. The header contains the window tabs and the buttons of the group. When the header is hidden, the selected window will take up its space. Use the isHeaderVisible property to check the current state.

The following example demonstrates hiding a group header and checking its visibility:

const workspace = await io.workspaces.getMyWorkspace();
const predicate = () => true;
const group = workspace.getGroup(predicate);

await group.hideHeader();

console.log(group.isHeaderVisible);

To create a group with a hidden header, set to false the isHeaderVisible property of the config object in the BoxDefinition object passed to the addGroup() method. The setting is preserved when saving and restoring Workspace Layouts. The operations can't be used while the Workspace is hibernated.

Positioning New Elements

The addWindow(), addGroup(), addRow(), and addColumn() methods now support a positionIndex property in the config object of the WorkspaceWindowDefinition or BoxDefinition passed to the respective method. Use it to insert the element at a specific position among its siblings:

const workspace = await io.workspaces.getMyWorkspace();
const definition = {
    children: [
        { type: "window", appName: "client-portfolio" }
    ],
    config: { positionIndex: 0 }
};

const group = await workspace.addGroup(definition);

The position is a zero-based index. If it exceeds the number of existing children, the element will be added last. The setting applies to elements added via these methods. Elements in a children array retain the order specified in the array.

Preventing Closing

You can now prevent closing a Workspaces App instance in io.Connect Browser via the onClosing() method of its Frame instance. The callback receives a FrameClosingData object containing a prevent() function:

const frame = await io.workspaces.getMyFrame();
const handler = async ({ prevent }) => {
    prevent();
};

const unsubscribe = await frame.onClosing(handler);

The close() method accepts a FrameCloseOptions object in which you can specify whether to allow the Frame to prevent closing and whether to show a confirmation dialog to the user:

const options = {
    allowPrevent: true,
    showDialog: true
};

await frame.close(options);

The dialog will be shown only when the closing operation allows prevention, requests a dialog, and a handler prevents closing. It will appear in the Workspaces App instance being closed.

⚠️ Note that displaying a confirmation dialog requires modal resources to be configured in the Main app and dialogs to be enabled in the Workspaces App instance displaying it.

An io.Connect Window instance participating in the Workspace can also prevent closing the Workspaces App.

io.Insights

Added support for tracing createWorkspace() and restoreWorkspace() as connected operations across the calling app, the platform, the Workspaces App, and the apps started in the Workspace.

@interopio/workspaces-ui-react

  • Added "Hide App Tab Headers" and "Show App Tab Headers" options to the Workspace tab menu for hiding or showing the headers of all window groups in the Workspace.
  • Added support for app restrictions in the "Add Apps" popup.
  • Added support for inserting Workspace elements at a specific position.
  • Closing Workspace tabs and individual window tabs from the Workspaces UI now honors closing prevention and supports confirmation dialogs.
  • Added support for placeholder apps when a Workspace contains an app that is no longer defined.
  • Added support for Workspace traces and startup metrics.

@interopio/workspaces-ui-web-components

  • Added "Hide App Tab Headers" and "Show App Tab Headers" options to the Workspace tab menu for hiding or showing the headers of all window groups in the Workspace.
  • Added support for app restrictions in the "Add Apps" popup.
  • Added support for inserting Workspace elements at a specific position.
  • Closing Workspace tabs and individual window tabs from the Workspaces UI now honors closing prevention and supports confirmation dialogs.
  • Added support for placeholder apps when a Workspace contains an app that is no longer defined.
  • Added support for Workspace traces and startup metrics.

Improvements & Bug Fixes

⚠️ Note that each improvement or bug fix is listed under all libraries it affects.

@interopio/browser

  • Improved initialization performance for all apps.
  • Fixed an issue with restoring the Channel membership of apps when initializing them.
  • Fixed an issue with discovering Interop methods as Intent handlers without the required Intent metadata.
  • Fixed an issue with saving restored Global Layouts that replaced existing app components instead of preserving their identifiers and settings.

@interopio/browser-platform

  • Reduced the size of the library bundle.
  • Improved initialization performance for all apps.
  • Improved handling of unavailable apps when creating and restoring Workspaces and restoring Global Layouts.
  • Fixed issues with displaying the Intent Resolver when a handler matches multiple Intents or when multiple handlers belong to a targeted app, and with discovering Interop methods as Intent handlers without the required metadata.
  • Fixed an issue with registering Workspace windows after their Workspaces App instance has closed.
  • Fixed an issue with saving restored Global Layouts that replaced existing app components instead of preserving their identifiers and settings.

@interopio/fdc3

  • Improved argument validation and error reporting for invalid contexts, unavailable apps, and unavailable app instances.
  • Improved targeting of running app instances that aren't present in the app directory.
  • Fixed issues with replaying context after changing User Channels and with cleaning up listeners when disconnecting Private Channels.

@interopio/home-ui-react

  • Improved the alignment of nested Launchpad sections and the titles, grouping, and order of context menu actions.
  • Fixed an issue with saving Layouts from Launchpad search without displaying success or failure feedback and with overwriting an existing Layout with the same name.
  • Fixed an issue with applying custom Notification Settings components.

@interopio/iframes-api

@interopio/intent-resolver-ui

  • Reduced the size of the library bundle.
  • Improved filtering and updating available Intent handlers and handling requests when a matching Intent Resolver is already open.

@interopio/modals-ui

  • Reduced the size of the library bundle.

@interopio/theme

  • Updated system icons and improved window borders and headers in the light theme.

@interopio/workspaces-api

  • Improved the performance of Workspace events with multiple registered callbacks.

@interopio/workspaces-ui-react

  • Reduced the size of the library bundle.
  • Improved the layout, sizing, labels, and headings of the "Add Apps" and "Add Workspace" popups.
  • Improved handling of missing apps and empty groups when restoring Workspaces.
  • Fixed an issue with applying Workspace loading strategies.
  • Fixed an issue with saving the Channels of Workspace windows and delays when saving Workspaces containing apps that aren't io.Connect clients.
  • Fixed issues with adding containers to an existing Workspace and restoring Layouts containing different types of elements at the root.

@interopio/workspaces-ui-web-components

  • Improved handling of missing apps and empty groups when restoring Workspaces.
  • Fixed an issue with applying Workspace loading strategies.
  • Fixed an issue with saving the Channels of Workspace windows and delays when saving Workspaces containing apps that aren't io.Connect clients.
  • Fixed issues with adding containers to an existing Workspace and restoring Layouts containing different types of elements at the root.