From 9ea342d1b5c0cab8954f90b0c29960b3272fbcd1 Mon Sep 17 00:00:00 2001 From: John Date: Mon, 22 Jan 2024 11:18:56 +0000 Subject: [PATCH 1/3] Update snap app asset path --- how-to/integrate-with-snap-basic/README.md | 2 +- how-to/integrate-with-snap-basic/public/manifest.fin.json | 2 +- how-to/integrate-with-snap/README.md | 2 +- how-to/integrate-with-snap/public/manifest.fin.json | 2 +- how-to/workspace-platform-starter/CHANGELOG.md | 2 +- .../workspace-platform-starter/docs/how-to-configure-snap.md | 4 ++-- how-to/workspace-platform-starter/public/manifest.fin.json | 2 +- .../workspace-platform-starter/public/pack.manifest.fin.json | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/how-to/integrate-with-snap-basic/README.md b/how-to/integrate-with-snap-basic/README.md index 30f8b3dfa0..ccc85197d4 100644 --- a/how-to/integrate-with-snap-basic/README.md +++ b/how-to/integrate-with-snap-basic/README.md @@ -12,7 +12,7 @@ This example demonstrates connecting to and using layouts with Snap. The package utilized by this example is [@openfin/snap-sdk](https://www.npmjs.com/package/@openfin/snap-sdk). -> The **@openfin/snap-sdk** is currently in beta, this sample requires the Snap Asset Url for the Snap Server. Please ask OpenFin for the url and then replace the `SNAP_ASSET_URL` in `manifest.fin.json` with it. +> The **@openfin/snap-sdk** is currently in beta. The version of the Snap SDK is referenced in package.json and the app asset defined in `manifest.fin.json`. ## Getting Started diff --git a/how-to/integrate-with-snap-basic/public/manifest.fin.json b/how-to/integrate-with-snap-basic/public/manifest.fin.json index 0675c13ff0..8a78e2d3b7 100644 --- a/how-to/integrate-with-snap-basic/public/manifest.fin.json +++ b/how-to/integrate-with-snap-basic/public/manifest.fin.json @@ -44,7 +44,7 @@ }, "appAssets": [ { - "src": "SNAP_ASSET_URL", + "src": "https://cdn.openfin.co/release/snap/0.2.0/snap.zip", "alias": "openfin-snap", "version": "0.2.0", "target": "OpenFinSnap.exe", diff --git a/how-to/integrate-with-snap/README.md b/how-to/integrate-with-snap/README.md index d4fe5c9add..d5014b2c86 100644 --- a/how-to/integrate-with-snap/README.md +++ b/how-to/integrate-with-snap/README.md @@ -12,7 +12,7 @@ This example demonstrates saving and restoring native applications as part of a The package utilized by this example is [@openfin/snap-sdk](https://www.npmjs.com/package/@openfin/snap-sdk). -> The **@openfin/snap-sdk** is currently in beta, this sample requires the Snap Asset Url for the Snap Server. Please ask OpenFin for the url and then replace the `SNAP_ASSET_URL` in `manifest.fin.json` with it. +> The **@openfin/snap-sdk** is currently in beta. The version of the Snap SDK is referenced in package.json and the app asset defined in `manifest.fin.json`. ## Getting Started diff --git a/how-to/integrate-with-snap/public/manifest.fin.json b/how-to/integrate-with-snap/public/manifest.fin.json index db9537e96e..ad407cd1ae 100644 --- a/how-to/integrate-with-snap/public/manifest.fin.json +++ b/how-to/integrate-with-snap/public/manifest.fin.json @@ -47,7 +47,7 @@ }, "appAssets": [ { - "src": "SNAP_ASSET_URL", + "src": "https://cdn.openfin.co/release/snap/0.2.0/snap.zip", "alias": "openfin-snap", "version": "0.2.0", "target": "OpenFinSnap.exe", diff --git a/how-to/workspace-platform-starter/CHANGELOG.md b/how-to/workspace-platform-starter/CHANGELOG.md index 2121f8b830..b6175d2da2 100644 --- a/how-to/workspace-platform-starter/CHANGELOG.md +++ b/how-to/workspace-platform-starter/CHANGELOG.md @@ -10,7 +10,7 @@ - Docs - Added a document showing [How To Add A Service](./docs/how-to-add-a-service.md) - Improved launchPreference so that now args for a native app (app asset or external) can be specified via launchPreference. Launch preference can also be configured to allow args to be specified dynamically when the launch request is made. Please see [how to define app launch preference](./docs/how-to-define-app-launch-preference.md). - Improved launchPreference so additional options such as url, interop, customData can be specified. Modules can now pass a launchPreference when launching an app by appId. They can see if the app supports being updated by getting the app by id and checking for the updatable setting under launchPreference.options. Only inline-view/view and inline-window/window support updatable launch preferences. Please see [how to define app launch preference](./docs/how-to-define-app-launch-preference.md). -- Added support for Snap, enable by setting `customSettings.snapProvider.enabled` to true. Configure the `customSettings.snapProvider.serverAssetInfo` to point to the `SNAP_ASSET_URL`. Enable the Snap debugging window by setting `customSettings.snapProvider.showDebugWindow` to true. +- Added support for Snap, enable by setting `customSettings.snapProvider.enabled` to true. Enable the Snap debugging window by setting `customSettings.snapProvider.showDebugWindow` to true. - Added new module type `content-creation`, these modules can be used to define content creation rules and handle the associated events. Modules are added in `customSettings.contentCreationProvider` section in manifest. - Added example content creation module which interrogates the `features` property from `window.open` to determine where to place a view in relation to where it was launched from. An example app `Content Creation Example` demonstrates this in use. - Added CustomActionCallerType enum to actions-shapes, use these in preference to the workspace-platform CustomActionCallerType type to avoid importing the whole npm package into your modules. diff --git a/how-to/workspace-platform-starter/docs/how-to-configure-snap.md b/how-to/workspace-platform-starter/docs/how-to-configure-snap.md index 4da8502925..63163fe2df 100644 --- a/how-to/workspace-platform-starter/docs/how-to-configure-snap.md +++ b/how-to/workspace-platform-starter/docs/how-to-configure-snap.md @@ -7,7 +7,7 @@ The OpenFin Snap SDK provides the ability to snap windows together, include native applications. For more detailed information see [OpenFin Snap SDK](https://developers.openfin.co/of-docs/docs/snap) -To enable snap support in your platform you can add the following in your manifest.fin.json. As the Snap SDK is currently in beta you must contact OpenFin to get the real url for the `SNAP_ASSET_URL` +To enable snap support in your platform you can add the following in your manifest.fin.json. ```json { @@ -17,7 +17,7 @@ To enable snap support in your platform you can add the following in your manife "enabled": true, "id": "workspace-platform-starter", "serverAssetInfo": { - "src": "SNAP_ASSET_URL", + "src": "https://cdn.openfin.co/release/snap/0.2.0/snap.zip", "alias": "openfin-snap", "version": "0.2.0", "target": "OpenFinSnap.exe" diff --git a/how-to/workspace-platform-starter/public/manifest.fin.json b/how-to/workspace-platform-starter/public/manifest.fin.json index 1642eed70b..822bf43f16 100644 --- a/how-to/workspace-platform-starter/public/manifest.fin.json +++ b/how-to/workspace-platform-starter/public/manifest.fin.json @@ -1661,7 +1661,7 @@ "enabled": false, "id": "workspace-platform-starter", "serverAssetInfo": { - "src": "SNAP_ASSET_URL", + "src": "https://cdn.openfin.co/release/snap/0.2.0/snap.zip", "alias": "openfin-snap", "version": "0.2.0", "target": "OpenFinSnap.exe" diff --git a/how-to/workspace-platform-starter/public/pack.manifest.fin.json b/how-to/workspace-platform-starter/public/pack.manifest.fin.json index a741105eab..f92b57bd87 100644 --- a/how-to/workspace-platform-starter/public/pack.manifest.fin.json +++ b/how-to/workspace-platform-starter/public/pack.manifest.fin.json @@ -859,7 +859,7 @@ "enabled": false, "id": "workspace-platform-starter", "serverAssetInfo": { - "src": "SNAP_ASSET_URL", + "src": "https://cdn.openfin.co/release/snap/0.2.0/snap.zip", "alias": "openfin-snap", "version": "0.2.0", "target": "OpenFinSnap.exe" From bdc53f1366a0d67b6bb63f9dec80e8cbffe10b18 Mon Sep 17 00:00:00 2001 From: John Date: Mon, 22 Jan 2024 11:19:06 +0000 Subject: [PATCH 2/3] Linting update. --- how-to/register-with-dock-basic/client/src/dock.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/how-to/register-with-dock-basic/client/src/dock.ts b/how-to/register-with-dock-basic/client/src/dock.ts index 8cd3d49f59..34c9976927 100644 --- a/how-to/register-with-dock-basic/client/src/dock.ts +++ b/how-to/register-with-dock-basic/client/src/dock.ts @@ -14,7 +14,6 @@ import { type CustomActionsMap } from "@openfin/workspace-platform"; - let platformTitle: string | undefined; let platformIcon: string | undefined; let customIconUrl: string | undefined; From 4cdea77c1ffc7c2b5d96cbfb41a9cc6370be4f1b Mon Sep 17 00:00:00 2001 From: John Date: Mon, 22 Jan 2024 11:31:55 +0000 Subject: [PATCH 3/3] Update dock example The new buttons resulted in window scroll bars so the window size was increased. The enable disable buttons did not take into account whether or not a dock was registered. --- how-to/register-with-dock-basic/client/src/provider.ts | 4 ++++ how-to/register-with-dock-basic/public/manifest.fin.json | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/how-to/register-with-dock-basic/client/src/provider.ts b/how-to/register-with-dock-basic/client/src/provider.ts index dff767ab78..922fe80c20 100644 --- a/how-to/register-with-dock-basic/client/src/provider.ts +++ b/how-to/register-with-dock-basic/client/src/provider.ts @@ -190,6 +190,8 @@ function setStates(isRegistered: boolean | null): void { deregisterButton && showButton && minimizeButton && + enableButton && + disableButton && showHomeButton && showNotificationButton && showStorefrontButton && @@ -202,6 +204,8 @@ function setStates(isRegistered: boolean | null): void { deregisterButton.disabled = isRegistered === null || !isRegistered; showButton.disabled = isRegistered === null || !isRegistered; minimizeButton.disabled = isRegistered === null || !isRegistered; + enableButton.disabled = isRegistered === null || !isRegistered; + disableButton.disabled = isRegistered === null || !isRegistered; showHomeButton.disabled = isRegistered === null || isRegistered; showNotificationButton.disabled = isRegistered === null || isRegistered; showStorefrontButton.disabled = isRegistered === null || isRegistered; diff --git a/how-to/register-with-dock-basic/public/manifest.fin.json b/how-to/register-with-dock-basic/public/manifest.fin.json index bec40d69d3..cba3a4fb93 100644 --- a/how-to/register-with-dock-basic/public/manifest.fin.json +++ b/how-to/register-with-dock-basic/public/manifest.fin.json @@ -10,7 +10,9 @@ "icon": "http://localhost:8080/favicon.ico", "autoShow": true, "providerUrl": "http://localhost:8080/platform/provider.html", - "preventQuitOnLastWindowClosed": true + "preventQuitOnLastWindowClosed": true, + "minWidth": 750, + "defaultWidth": 750 }, "shortcut": { "company": "OpenFin",