ℹ️ OpenFin Workspace: OpenFin Workspace is a commercial product and this repo is for evaluation purposes. Use of the OpenFin Container and OpenFin Workspace components is only granted pursuant to a license from OpenFin. Please contact us if you would like to request a developer evaluation key or to discuss a production license. OpenFin Workspace is currently only supported on Windows.
v15 introduces a number of new features:
- Download Manager (Beta)
- Browser Windows and Platform Windows Can Coexist in a Workspace Platform
- New Registration Method for Notification Center -> You must now call register in order for the notification center to startup if it isn't already running.
This release supports updatable filters in Home.
This release contains new features such as LowCode (please see release notes), printing and the ability add customData when saving/reading a page object.
There are no breaking changes.
The dock WorkspaceComponentButtonOptions
have been deprecated, use WorkspaceButtonsConfig
instead.
The layout types LayoutComponentExtended
that were export from @openfin/workspace-platform/client-api/src
have been removed, use OpenFin.LayoutItemConfig instead.
The layout types LayoutComponentExtended
, LayoutComponentStateExtended
, LayoutContentExtended
that were export from @openfin/workspace
have been removed, use OpenFin.LayoutItemConfig instead.
The Openfin runtime core types have been updated. When you move to the matching types for the runtime you may get a number of TypeScript errors:
TS2503: Cannot find namespace 'OpenFin'.
OpenFin is no longer made globally available by default. import the OpenFin type to resolve the issue.
import type OpenFin from '@openfin/core';
TS2322: Type '(InteropBroker: Constructor<InteropBroker>, provider?: ChannelProvider, options?: InteropBrokerOptions, ...args: unknown[]) => InteropBroker' is not assignable to type 'OverrideCallback<InteropBroker, InteropBroker>'.
The constructor has changed and you no longer pass down options. Previously we had:
export function interopOverride(
InteropBroker: OpenFin.Constructor<OpenFin.InteropBroker>,
provider?: OpenFin.ChannelProvider,
options?: OpenFin.InteropBrokerOptions,
...args: unknown[]
): OpenFin.InteropBroker {
class InteropOverride extends InteropBroker {
....
}
return new InteropOverride(provider, options, ...args);
}
And this has now become:
export function interopOverride(
InteropBroker: OpenFin.Constructor<OpenFin.InteropBroker>
): OpenFin.InteropBroker {
class InteropOverride extends InteropBroker {
....
}
return new InteropOverride();
}
TS2322: Type '(WorkspacePlatformProvider: Constructor<WorkspacePlatformProvider>) => Promise<Override>' is not assignable to type 'WorkspacePlatformOverrideCallback'.
You may get an error similar to the one above. Your Platform Override should use the updated Workspace type:
import type { BrowserOverrideCallback } from "@openfin/workspace-platform";
export const overrideCallback: BrowserOverrideCallback = async (WorkspacePlatformProvider) => {
class Override extends WorkspacePlatformProvider {
...
}
return new Override();
};
import type { WorkspacePlatformOverrideCallback } from "@openfin/workspace-platform";
export const overrideCallback: WorkspacePlatformOverrideCallback = async (WorkspacePlatformProvider) => {
class Override extends WorkspacePlatformProvider {
...
}
return new Override();
};
If you have dependencies that bring in an earlier version of @openfin/core and you have TypeScript errors as shown above then you may see some additional errors relating to a type conflict. Resolve the other TypeScript errors first and this error should go away (TypeScript is trying to resolve issues and finds the additional copies of the @openfin/core types).
Here is an example of what the error might say:
TS2345: Argument of type 'import("/YOUR_PATH/node_modules/@openfin/core/src/api/view/Instance").View' is not assignable to parameter of type 'import("/YOUR_PATH/node_modules/OTHER_DEPENDENCY/node_modules/@openfin/core/src/api/view/Instance").View'.
Property '#private' in type 'View' refers to a different member that cannot be accessed from within type 'View'.
This should not be an issue if the other TypeScript errors have been resolved.
- Version Fallback Mechanism. OpenFin Workspace now leverages the Fallback Manifest functionality which was recently introduced with RVM 9 (Stable). With Workspace 12, if an end-user is unable to retrieve the necessary assets for an upgrade to Workspace 13 and beyond, the end-user will remain on their current Workspace version. RVM 9 required.
Notification Center now provides end-users the ability to choose how notifications are viewed.
Available options are:
- All
- Needs Attention (“persistent notifications”)
- Grouped by Sender
- Sort by Priority or Date continue to be available.
End-users can now view or dismiss all persistent Notifications on their desktop with a single mouse click.
OpenFin Workspace and Notifications assets are now delivered from the Workspace subdomain (workspace.openfin.co) by default.
- Updated Store APIs can now make updates to Store buttons in real-time.
- Resolved issue where queries with a lot of leading spaces calculated suggestion text positions incorrectly
You will need the following dependencies
"dependencies": {
"@openfin/workspace": "^12.6.0",
"@openfin/workspace-platform": "^12.6.0"
}
You should update your dev dependencies
"devDependencies": {
"@openfin/core": "30.74.16"
}
- Fixed Panels for Pages - Workspace Platform and content providers can configure fixed panels on any side of a Browser Page. Developers can programmatically control the size, contents, and options of these panels. The panels are configured at the Page level and saved/restored with snapshots. End-user cannot rearrange, move, or remove these panels.
- Custom Buttons and Landing Page in Store - An Application’s buttons and text in OpenFin Store are now fully customizable. Each application can have both a primary button and a set of secondary buttons. The Landing Page can display either an application or navigation item in any row.
- Custom Toast Location - End-users can now set a specific location within a monitor for where their Notifications will display.
These are enhancements to the Workspace Components that can be picked up. To upgrade please update your package.json references (and DOS setting if you have it locked to a specific workspace version).
You will need the following dependencies
"dependencies": {
"@openfin/workspace": "^11.0.0",
"@openfin/workspace-platform": "^11.0.0"
}
The constructor has changed and you no longer pass down options. Previously we had:
export function interopOverride(
InteropBroker: OpenFin.Constructor<OpenFin.InteropBroker>,
provider?: OpenFin.ChannelProvider,
options?: OpenFin.InteropBrokerOptions,
...args: unknown[]
): OpenFin.InteropBroker {
class InteropOverride extends InteropBroker {
....
}
return new InteropOverride(provider, options, ...args);
}
And this has now become:
export function interopOverride(
InteropBroker: OpenFin.Constructor<OpenFin.InteropBroker>
): OpenFin.InteropBroker {
class InteropOverride extends InteropBroker {
....
}
return new InteropOverride();
}
Your broker can still override functions related to context groups and manifest configured context groups will still be used by the base implementation of the broker.
- Light Mode, Dark Mode, and Sync with OS Setting. You can now specify a light and dark palette with your theme and Workspace Browser will provide you with a menu to toggle between them or use the OS Preference to decide. You can also trigger the change via an api and listen to a change event. The workspace-platform-starter example shows how this can be done alongside the documentation on the OpenFin developer docs. Your old theme definition will continue to work so this isn't a breaking change.
- New Actions Available in Context Menus - Defined via ViewOptions and WindowOptions. You can now specify additional options such as Print, Back and Forward.
- API Control Over Home Search String - You can now trigger an update to the text shown in the Home Search Box. We provide examples of this in the customize-home-templates example (where the help search entry can update the search box when selected).
- Content Renders when Resizing Views - In Browser when you resize a view using the layout controls, the view content remains visible.
- Workspace Analytics - In your platform override you can now add a function that will receive analytic events. The workspace-platform-starter sample gives an example of this.
- We now expose a show/hide API similar to the other workspace components (the toggle api still works)
These are enhancements to the Workspace Components that can be picked up. To upgrade please update your package.json references (and DOS setting if you have it locked to a specific workspace version).
You will need the following dependencies
"dependencies": {
"@openfin/workspace": "^10.0.0",
"@openfin/workspace-platform": "^10.0.0"
}
Added Custom Background Color for Hero Section in Store.
The background color of the hero section of the store by specifying contentBackground1 in your palette.
- Updated Workspace Store icon throughout OpenFin Workspace to be consistent and intuitive to end-users.
- Updated Layout splitters in the Workspace Browser to inherit colors from the theme object. Previously, splitters were always black, regardless of the theme.
- Updated the appearance of the minimize, maximize, close buttons in Workspace Store and the close button in Notifications to match the rest of Workspace components.
The main focus of this release is:
You have the ability to hide favicons from the view tabs if you don't wish them to show.
The format of timestamps on notifications has improved. A notification that is at least 1 hour old will now display the absolute timestamp (e.g., “Jun 3, 11:59 PM”) of creation to users. A notification that is less than 1 hour old will continue showing the relative timestamp of creation (e.g., “36 min ago”) to users.
End-users can now select a specific monitor for Notification Toasts and the Notification Center to appear on.
We are changing the default behavior of notifications so that clicking on the body of a notification does nothing, rather than dismissing it; the user must click on the icon in the top right corner of a notification to dismiss or clear it. Notification providers can override this behavior so that clicking does dismiss (the previous behavior).
The main focus of this release is:
OpenFin has introduced the ability for developers to register a Workspace Platform with the Dock component. This enables end-users to access multiple Workspace Platforms in a single, unified Dock component.
In addition, Dock is fully themable by Workspace Platforms, to deliver a branded experience whilst being part of a shared experience.
Developers of Workspace Platform can also fully customize the buttons in Dock. For example, they can add, remove and reorder buttons in Dock.
Home no longer appears when a Workspace Platform first registers the Home component. For Home to show automatically, developers of Workspace Platforms must add Home.show()
right after registering the Home component. This is the pattern followed in the starters so if you have been following the starters you have already been doing this.
When you register a component you will be returned information that will tell you the version of Workspace you have registered against as well as the version of the npm module that was used for the registration.
{
clientAPIVersion: string;
workspaceVersion: string;
}
You will need the following dependencies
"dependencies": {
"@openfin/workspace": "^9.0.0",
"@openfin/workspace-platform": "^9.0.0"
}
We have introduced new starters:
-
use-theming - this starter is focused on giving you an easy way of trying out different theme palettes. You can change and apply them to the workspace to find the right combination of colors for your platform.
-
register-with-dock-basic - a starter that gives you an easy introduction to Dock and how you can customize it.
-
integrate-with-rss - a few people have asked us about providing a feed for notifications and opening the result in a window. We've used rss as an example and created a starter you can experiment with.
-
common - we have an updated Winform app that demonstrates context sharing and we now point to our brand new Process Manager to help you in debugging your application.
-
workspace-platform-starter - workspace platform starter continues to be the main example that shows a way of combining all the workspace components and some patterns as suggestions. The following changes have been applied:
- DockProvider - Dock support has been added and is configurable through the manifest file
- An additional example endpoint has been added. This one lets you expose an endpoint that wraps a channel api.
- InitOptionsProvider - More module types supported. You can now create a module for handling init option params and we include an example that allows external apps to raise an intent or pass context via querystring parameters that target a platform.
- ConnectionProvider - The concept of connections has been added to workspace-platform-starter. How do you support other applications e.g. Native C# apps to provide listing for their child views? How do they get launched when selected and how can the child views be captured in a snapshot (by becoming a snapshot source).
The main focus of this release is:
For developers of existing applications that use the Platform API, you now have the option to use OpenFin Workspace components while continuing to use your existing custom platform windows. This provides additional flexibility on deciding when to adopt our out-of-the box Browser component, easing your transition to Workspace.
- We have a sample how-to/register-with-platform-windows
- https://developers.openfin.co/of-docs/docs/integrate-platform-apps-with-workspace
Platform Providers can now configure search results to display only on-demand, after the end-user selects a result. This can significantly improve performance for queries that can have numerous results. For example, your Home Provider can fetch only the top-level search results in the initial query and then display the details of a particular result only after a user clicks on it, deferring the lookup of additional rich information to your backend services only when that information is required. Templates to indicate result loading or failure to the user are included.
- The how-to/customize-home-templates sample has been updated with examples.
- https://developers.openfin.co/of-docs/docs/provide-search-results-async
Platform Providers can now lock Browser Windows and/or Pages to offer fixed, repeatable experiences for end-users. End-users can also manually lock and unlock Pages themselves in Workspace Browser, if that feature is enabled through a Platform Provider’s configuration.
- The how-to/register-with-browser samples shows a page with browser lock/unlock enabled.
- https://developers.openfin.co/of-docs/docs/lock-content-in-browser
The visual designs of filters in Workspace Home have been improved, so end-users can quickly and easily zero in on the content that they are searching for and quickly clear out selected filters
You will need the following dependencies
"dependencies": {
"@openfin/workspace": "^8.0.0",
"@openfin/workspace-platform": "^8.0.0"
}
The structure of the how-to samples has been updated. The views (content) and some of the common scripts to setup dos, start and kill the project and the apps.json file have been moved to a how-to/common folder. The express.js code has been simplified so it most cases you just have an index.ts file. And the server now maps the sample folder and /common to the common how-to.
A new npm command "npm run setup" has also been introduced that takes advantage of our npm workspaces support and installs from the root directory and then builds the sample you are currently in and the common directory.
Samples that used the apps.json file can still do so but most will be updated to point to the apps.json file in common (so there is consistency across samples). The manifest for samples that point to the common/apps.json have a new setting in the manifest appProvider section. This tells the sample which manifestTypes from within the apps.json file you wish to support (e.g. only workspace-platform-starter supports inline-view as a manifestType as it is supported by the sample and will not be recognized by the workspace api).
The main focus of this release is on introducing support for Workspace Management APIs and adding a UI for Workspace Management to the Browser.
If you have customized the main browser menu you may want to change the way the menu is constructed so that it inherits the default menu options instead of being a list of specific menu options (the workspace-platform-starter example shows this change between the move from v6 to v7) or you can extend that custom menu to include the new options that are available as seen in the following documentation:
You will need the following dependencies
"dependencies": {
"@openfin/workspace": "^7.0.0",
"@openfin/workspace-platform": "^7.0.0"
}
With Workspace 6.0, OpenFin has added additional options when it comes to customization. You can now customize:
- The browser controls and menu (https://developers.openfin.co/of-docs/docs/customize-browser-features)
- Customize the template displayed as part of a search result entry in home (https://developers.openfin.co/of-docs/docs/customize-search-results-in-home)
- Register your workspace platform with Notification Center so that your theming is taken into account.(https://developers.openfin.co/of-docs/docs/connect-a-workspace-platform-to-notification-center)
You will need the following dependencies
"dependencies": {
"@openfin/workspace": "^6.0.0",
"@openfin/workspace-platform": "^6.0.0"
}
There are no breaking changes in this release (just fixes and the new features mentioned above). If you have pinned your workspace version you will need to update your desktop owner setting to point to version 6.3.6 (if you have not pinned it then you will get the latest version of workspace on your next launch). If you are running a sample from this branch then running the npm command "npm run dos" update your desktop owner settings to point to the local dos file that specifies version 6.3.6.
With Workspace 5.5, OpenFin has continued extended theme support so that the provided palette now applies to the OpenFin Home and Store Components.
You will need the following dependencies
"dependencies": {
"@openfin/workspace": "^5.5.0",
"@openfin/workspace-platform": "^5.5.0"
}
There are no breaking changes and this release just includes fixes and extends theming support to OpenFin Home and Store (no api changes are required). If you have pinned your workspace version you will need to update your desktop owner setting to point to version 5.5.0 (if you have not pinned it then you will get the latest version of workspace on your next launch). If you are running a sample from this branch then running the npm command "npm run dos" update your desktop owner settings to point to the local dos file that specifies version 5.5.0.
With Workspace 5.0, OpenFin has extended the ability for Workspace customers to have more granular control of their Workspace implementation. The @openfin/workspace module adds additional capabilities such as an improved ability to theme components. We have also introduced a new npm module @openfin/workspace-platform which lets you instantiate a workspace platform instead of the existing platform api. This lets you application launch OpenFin Browser Windows (with pages) under your own application instead of under Workspace giving you greater control and flexibility.
You will need the following dependencies
"dependencies": {
"@openfin/workspace": "^5.0.0",
"@openfin/workspace-platform": "^5.0.0"
}
Using the register-with-store example as a guide:
- Update your npm dependencies as shown above
- Update your manifest
- Do a few api updates (show below)
You will need to do a few manifest updates as you are now responsible for launching views, snapshots and native apps (if you decide to support that).
- Update the runtime version in your manifest to at least: 23.96.67.7
- Add the following setting to your platform configuration in your manifest: "preventQuitOnLastWindowClosed":true
- Permissions: You need to add a openUrlWithBrowser permission (OpenFin Browser gives the option of opening a view using the system browser via right click). Optional: permissions for launching external processes (launchExternalProcess) if you wish to enable the launching of native apps and downloadAsset (if you want to version and deploy your native app through OpenFin). An example of the platform section of the register-with-store manifest is shown below:
"platform": {
"uuid": "register-with-store",
"icon": "http://localhost:8080/favicon.ico",
"autoShow": false,
"providerUrl": "http://localhost:8080/platform/provider.html",
"preventQuitOnLastWindowClosed":true,
"permissions": {
"System": {
"launchExternalProcess": true,
"downloadAsset": true,
"openUrlWithBrowser": {
"enabled": true,
"protocols": ["mailto"]
}
}
},
"defaultWindowOptions": {
"permissions": {
"System": {
"openUrlWithBrowser": {
"enabled": true,
"protocols": ["mailto"]
}
}
}
}
}
File: home.ts
To make it easier to determine which filter was selected we have added an id so you don't have to rely on 'title' when determining what logic to apply.
So this:
let tagFilter: CLIFilter = {
title: 'Tags',
type: CLIFilterOptionType.MultiSelect,
options: []
};
becomes:
let tagFilter: CLIFilter = {
id: 'tags',
title: 'Tags',
type: CLIFilterOptionType.MultiSelect,
options: []
};
File: store.ts
You now need to specify an icon with your registration. This icon will show in the store dropdown alongside your store name.
So this:
return {
id: settings.storefrontProvider.id,
title: settings.storefrontProvider.title,
getNavigation: getNavigation.bind(this),
getLandingPage: getLandingPage.bind(this),
getFooter: getFooter.bind(this),
getApps,
launchApp: launch
};
becomes:
return {
id: settings.storefrontProvider.id,
title: settings.storefrontProvider.title,
icon: settings.storefrontProvider.icon,
getNavigation: getNavigation.bind(this),
getLandingPage: getLandingPage.bind(this),
getFooter: getFooter.bind(this),
getApps,
launchApp: launch
};
settings.storefrontProvider.icon is just a setting in the manifest.fin.json file of the sample that provides a string to an icon url.
Launching an app is now a platform responsibility and has moved from @openfin/workspace to @openfin/workspace-platform.
This requires two changes:
File: platform.ts
Instead of initializing an OpenFin Platform you will be initializing an OpenFin Workspace Platform.
So this:
import { fin } from 'openfin-adapter/src/mock';
export async function init() {
console.log('Initializing platform');
await fin.Platform.init({});
}
becomes:
import { init as workspacePlatformInit, BrowserInitConfig } from '@openfin/workspace-platform';
export async function init() {
console.log('Initializing platform');
let browser: BrowserInitConfig = {};
await workspacePlatformInit({
browser
});
}
Once you know your app has initialized a workspace platform you can now safely reference it and use the launchApp function it provides. The platform.ts file in the sample shows an example of configuring the icons and window title but it was excluded from the snippet above to keep things simple.
File: launch.ts
The following snippet replaces common code with ... to highlight the changes.
So this:
import { launchApp } from "@openfin/workspace";
...
export async function launch(appEntry: App) {
console.log("Application launch requested: ", appEntry);
if(appEntry.manifestType === "external") {
...
} else {
await launchApp(appEntry);
}
console.log("Finished application launch request");
}
becomes:
import { getCurrentSync } from '@openfin/workspace-platform';
...
export async function launch(appEntry: App) {
console.log("Application launch requested: ", appEntry);
if(appEntry.manifestType === "external") {
...
} else {
let platform = getCurrentSync();
await platform.launchApp({app: appEntry});
}
console.log("Finished application launch request");
}
In the store sample there is a developer.snapshot.fin.json file that includes two views showing OpenFin related documentation. The snapshot had the following:
...
"workstacks": [
{
"name": "Developer Docs"
}
],
It shouldn't have that. It is an incomplete workstacks definition and this has now been renamed to pages. If you have this, remove it from your snapshot and it will load correctly.
Desktop Owner Settings are still needed for two things:
- Pinning the version of workspace (we still provide the dos command so you can pin your workspace to version 5.0.0 to run the 5.0.0 sample). Without this the latest version of Workspace will be used.
- Specifying an icon - this is only used by the dock now as everything else is configured using APIs.
This is now done when you initialize your workspace platform. You can specify Default Window Options for your Browser Windows. Example taken from the store example: platform.ts
import { init as workspacePlatformInit, BrowserInitConfig } from '@openfin/workspace-platform';
import { getSettings } from './settings';
export async function init() {
console.log('Initializing platform');
let settings = await getSettings();
let browser: BrowserInitConfig = {};
if (settings.browserProvider !== undefined) {
browser.defaultWindowOptions = {
icon: settings.browserProvider.windowOptions?.icon,
workspacePlatform: {
pages: null,
title: settings.browserProvider.windowOptions?.title,
favicon: settings.browserProvider.windowOptions?.icon
}
};
}
await workspacePlatformInit({
browser
});
}
So now that your code is working what else has changed from a user perspective?
Workspaces & Pages are no longer shown by default in the Home UI - We now provide APIs to be able to fetch saved pages and return them in the search results yourself. If you want to implement workspaces then you will need to do that through your workspace platform.
The save icon is present on your browser's window and by default it will save your page to indexedDB. Version 5 provides APIs to get these pages. You can also specify a different storage location (e.g. you may decide you want to save them to a rest endpoint).
If you have existing pages from version 1-4 that you need to migrate please contact [email protected] who can either help or put you in touch with a solution engineer. Documentation on migration approaches will also be available on the OpenFin site.
The ability to share content will come back but has been removed in order to plan an approach that suits the SDK first approach that we have in place.
Please contact [email protected] who can put you in contact with one of our Solution Engineers if you currently use this feature and want to talk about options.
The Add New Page/View button (and right click context menu option) is hidden by default and needs to be configured
In versions 1-4 you would see a + button next to the page tab (the visibility of this button could be configured through DOS).
This button is now missing by default and needs to be configured. Configuring this option lets you specify the page that should be loaded into the Add New View view.
The new features for this release will be covered is covered in our release notes but this section will give a brief overview.
There is a new npm module available that continues to empower you as the workspace platform developer.
This module lets you initialize a workspace platform instead of a standard OpenFin platform and in doing so gives you the following:
- An API to launch OpenFin Browser windows and Pages (that fall under your platform and not OpenFin Workspace).
- The ability to specify custom urls for the "Add Page" and "Add View" views.
- The ability to specify default window options so that you can customize the logo shown in the menu and taskbar as well as the Window Title without needing Desktop Owner Settings.
- An API for the retrieval and saving of Pages with a local store as default but with the option of overriding and providing your own logic for where pages should be saved and retrieved.
- The initial introduction of theming support.
This is best done through default window options.
import { init as workspacePlatformInit, BrowserInitConfig } from '@openfin/workspace-platform';
export async function init() {
console.log('Initializing platform');
let browser: BrowserInitConfig = {};
browser.defaultWindowOptions = {
icon: 'http path to icon',
workspacePlatform: {
pages: null,
title: 'Title for windows',
favicon: 'http path to favicon',
newTabUrl: 'http url of page to load when someone selects adds a new view',
newPageUrl: 'http url of page to load when someone selects add a page'
}
};
await workspacePlatformInit({
browser
});
}
This is done when you initialize your platform:
import { init as workspacePlatformInit, CustomThemeOptions } from '@openfin/workspace-platform';
export async function init() {
console.log('Initializing platform');
const theme: CustomThemeOptions[] = [
{
label: 'Starter Theme',
logoUrl: 'http://localhost:8080/favicon.ico',
palette: {
brandPrimary: '#0A76D3',
brandSecondary: '#383A40',
backgroundPrimary: '#111214'
}
}
];
await workspacePlatformInit({
theme
});
}
This is taken from the browser.ts file (assuming the platform has been initialized) in the how-to register-store as (well as home) examples.
File: browser.ts
import { getCurrentSync, Page } from '@openfin/workspace-platform';
export async function getPage(pageId: string) {
let platform = getCurrentSync();
return platform.Storage.getPage(pageId);
}
export async function getPages() {
let platform = getCurrentSync();
return platform.Storage.getPages();
}
export async function deletePage(pageId: string) {
let platform = getCurrentSync();
return platform.Storage.deletePage(pageId);
}
export async function launchPage(page: Page) {
let platform = getCurrentSync();
return platform.Browser.createWindow({
workspacePlatform: {
pages: [page]
}
});
}
export async function launchView(
view: OpenFin.PlatformViewCreationOptions | string,
targetIdentity?: OpenFin.Identity
) {
let platform = getCurrentSync();
let viewOptions;
if (typeof view === 'string') {
viewOptions = { url: view };
} else {
viewOptions = view;
}
return platform.createView(viewOptions, targetIdentity);
}
Focus - the ability to show/hide tabs to make it easier to focus on the content within a browser window
The following new feature has been added for your end users:
Tabs Hidden - Click on the focus icon again
With Workspace 4.0, OpenFin has introduced the ability for Workspace customers to have more granular control of their Workspace implementation. This control is enabled through Workspace by exposing an API that allows for Provider Apps to perform the function of a CLI Provider. This approach allows Provider Apps to register with the Home API and then perform such actions as:
Manage the application, view and workspaces content available in Workspace Provide an async (aka “lazy”) Search Provide in-memory auto-complete Search Display icons for all registered Providers in the Home/Search UI Selecting a given CLI provider icon to show the results from that provider Apply icons/ logos
With the addition of the CLI Provider concept, OpenFin has deprecated Workspace Desktop Owner Setting overrides (customConfig options ) that pertain to apps and workspaces REST URLs in favor of this programmatic API approach.
- The fins link or desktop icon to start workspace components is no longer supported. These must be started by a workspace platform or CLI provider. The system will now return an error if the fins link is used to start a workspace component.
- The “/W” entry point into the Workspaces directory has been removed.
- The command buttons (Storefront, Notifications etc) no longer show on the Home UI. They are available as root commands by typing /.
- You can no longer specify a Content Discovery Service (CDS). An example is available for how to mimic this functionality using the new APIs available in the howto.
- Home and Store are now enabled by default. However, they will not show unless a platform has registered with them.
- Workspace service is no longer supported. Any saved workspaces are only saved locally. Additional workspace related APIs will be released in upcoming releases.
- Unlike the v1 search API, you must select a CLI provider to see the results from that provider. However, if only one provider is registered then it is automatically selected.
The logo setting is still supported for Desktop Owners and is used to specify the default logo for Home, Browser, the Dock and TaskBar Icons:
"style": {
"iconUrl": "https://yourserver/favicon-16x16.png"
}
The new API approach will let you register your logo for Home without the need for DesktopOwnerSettings (configuring the logo for Browser etc will be available in a future release).
You can import Home from @openfin/workspace to register your application against Home. The icon setting lets you specify your logo.
const cliProvider: CLIProvider = {
title: 'title',
id: 'id',
icon: 'http://pathto/icon',
onUserInput: onUserInput,
onResultDispatch: onResultDispatch
};
await Home.register(cliProvider);
The how to samples provide a basic how to example (how-to/register-with-home-basic) as well as a more complex example (how-to/register-with-home).
Instead of configuring the apps endpoint through DesktopOwnerSettings:
"appDirectoryUrl": "https://yourserver/api/apps"
You can now import Home from @openfin/workspace to register your application against Home. The onUserInput and onResultDispatch setting lets you specify functions to determine what results to return based on user queries and the ability to respond to a user selection.
const cliProvider: CLIProvider = {
title: 'title',
id: 'id',
icon: 'http://pathto/icon',
onUserInput: onUserInput,
onResultDispatch: onResultDispatch
};
await Home.register(cliProvider);
We have an example (how-to/register-with-home) that shows how to register against Home, query a rest endpoint that matches the appDirectoryUrl format and map that to a collection of search results to display in Home.
If you have never configured a share url in DesktopOwnerSettings then we recommend not starting that now as we are looking at having an API driven approach. If you already have this configured then it will continue to work in version 4 of OpenFin Workspace.
"shareUrl": "https://yourserver/api/share"
This DesktopOwnerSetting is no longer supported in version 4. Please reach out to support or a Solutions Engineer to go over alternate approaches.
"workspacesUrl": "https://yourserver/api/workspaces"
We have examples of using the search api to populate a list of applications in our version 3 branch. The example: how-to/register-with-home is an updated version of the version 3 how-to/add-an-application-to-workspace-via-api example. You will notice that both examples still follow the same approach. The main difference can be found by comparing search.ts against home.ts. You will see that @openfin/workspace is used instead of @openfin/search-api and that workspace.ts is also no longer needed.
No. Views will continue to behave in the same way.
No. Your pages and workspaces will still be listed in Home.
No. There is a version 3 branch configured to help teams who are still on version 3: https://github.com/built-on-openfin/workspace-starter/tree/workspace/v3.0.0/
Seeing this messages means you are running version 4+ of OpenFin Workspace. From version 4 OpenFin Workspace is an API driven experience and is launched from an application instead of directly. The how-to samples in this repo show you how to build an application that uses our openfin/workspace APIs.
It may be that your existing shortcuts point to the latest version of OpenFin Workspace instead of a specific version. To pin to an earlier version of OpenFin Workspace please look at the question below.
To stay on version v3 you can do the following:
Clone the version 3 branch> and run the npm run dos command on any of the how-to samples. You will need to have the local server running to serve the dos.json file.
Create your own dos file:
{
"desktopSettings": {
"systemApps": {
"workspace": {
"version": "3.0.0"
}
}
}
}
To configure Desktop Owner Settings you will need to be able to modify your registry settings. This can be done by scripts, applications or by hand.
You need to add a registry key:
Key : HKEY_CURRENT_USER\Software\OpenFin\RVM\Settings\DesktopOwnerSettings
Type : String
Value : file:\\\C:\PATH\TO\YOUR\FOLDER\registry_dos_local.json
To add/update this setting we are going to launch RegEdit from the command line (or you can launch it from the Windows Start Bar) by typing regedit and hitting enter.
You will be presented with RegEdit where you can expand the folders until you get to OpenFin\RVM\Settings. If you see "DesktopOwnerSettings" it means that this has already been set by your organization. Please check with your organization's desktop owner so that configuration can take place with their awareness.
If no DesktopOwnerSettings value exists then please add it by right clicking on OpenFin/RVM/Settings and adding a new string value:
You will provided an entry in the Settings Folder that you can rename to DesktopOwnerSettings. Double click on the new entry to set the value to a file path e.g.:
file:\\\C:\PATH\TO\YOUR\FOLDER\registry_dos_local.json
or a url (if you have a webserver):
http://localhost:8080/registry_dos_local.json
Once you have done either of the approaches above you need to:
-
Use TaskManager, ProcessExplorer or the command line to close all OpenFin applications (so that the new DesktopOwnerSettings will get picked up).
-
Launch OpenFin Workspace using the system apps fins link (this will pick up your version setting and update any desktop shortcuts): fins://system-apps/workspace
You should now see version 3 of OpenFin Workspace.