Changelog
New Features
⚠️ Note that each new feature is listed under all libraries it affects.
@interopio/browser
Saving Window Contexts in Layouts
When saving a Global Layout programmatically, you can now instruct the platform to persist the context objects of individual io.Connect Windows (set via the
setContext()method of aWebWindowinstance) by using thesaveWindowContextsproperty of theNewLayoutOptionsobject:const options = { name: "My Layout", saveWindowContexts: true }; const myLayout = await io.layouts.save(options);If a Browser Client has subscribed for Layout save requests via the
onSaveRequested()method and the event handler returns a context object, it will take precedence over the context set via thesetContext()method. If theignoreContextsproperty of theNewLayoutOptionsobject is set totrue, thesaveWindowContextsproperty will be ignored.
@interopio/browser-platform
Saving Window Contexts in Layouts
Added support for persisting window context objects (set via the
setContext()method of aWebWindowinstance) when saving Global Layouts via thesaveWindowContextsproperty of theNewLayoutOptionsobject.Theme Persistence via the App Preferences API
When an external App Preferences store is configured, the user selected theme is now automatically persisted and restored via the app preferences API. This enables the theme selection to be synchronized across different devices and browser sessions for the same user. When using a local app preferences store, themes continue to be stored in the browser local storage as before.
@interopio/workspaces-api
Tab Reorder Events
You can now get notified when Workspace tabs or window tabs are reordered within their respective containers (Workspace Frames and window tab groups). These events are triggered only when dragging a tab to a different position without removing it from its current container.
To subscribe for Workspace tab reorder events at the API level, use the
onWorkspaceTabReordered()method. The event handler receives the reorderedWorkspaceinstance with the updatedpositionIndex:const handler = ({ title, positionIndex }) => console.log(`Workspace "${title}" was reordered to position ${positionIndex}.`); const unsubscribe = await io.workspaces.onWorkspaceTabReordered(handler);To subscribe for window tab reorder events at the API level, use the
onWindowTabReordered()method. The event handler receives the reorderedWorkspaceWindowinstance with the updatedpositionIndex:const handler = ({ title, positionIndex }) => console.log(`Window "${title}" was reordered to position ${positionIndex}.`); const unsubscribe = await io.workspaces.onWindowTabReordered(handler);Tab reorder events are also available for:
Workspaceinstances via theontabReordered()andonWindowTabReordered()methods.
WorkspaceWindowinstances via theontabReordered()method.Saving Window Contexts in Workspace Layouts
When saving a Workspace Layout, you can now instruct the platform to persist the context objects of individual Workspace windows (set via the
setContext()method of aWebWindowinstance) by using thesaveWindowContextsproperty of theWorkspaceLayoutSaveConfigobject passed as an argument to thesave()method:const config = { name: "My Workspace", workspaceId: myWorkspace.id, saveWindowContexts: true }; const workspaceLayout = await io.workspaces.layouts.save(config);You can also use the
saveLayout()method of aWorkspaceinstance when saving an open Workspace as a Workspace Layout:const name = "My Workspace"; const config = { saveWindowContexts: true }; await myWorkspace.saveLayout(name, config);If a Browser Client has subscribed for Layout save requests via the
onSaveRequested()method and the event handler returns a context object, it will take precedence over the context set via thesetContext()method.
Improvements & Bug Fixes
⚠️ Note that each improvement or bug fix is listed under all libraries it affects.
@interopio/browser-platform
- Improved the validation logic when app validation for the app preferences store is enabled in order to avoid issues related to validating the platform app name.
- Fixed an issue related to tracking Workspaces with the
workspace_countmetric.
@interopio/home-ui-react
- Fixed an issue related to the Layouts panel displaying duplicate items with the same name.