Skip to content

Commit

Permalink
Merge branch 'main' into workspace/vnext
Browse files Browse the repository at this point in the history
  • Loading branch information
johnman committed Jan 27, 2024
2 parents e8b782c + d2b3b24 commit 0fe0557
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 2 deletions.
15 changes: 15 additions & 0 deletions how-to/workspace-platform-starter/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,21 @@
- Removed the quote and emoji integration code and dependencies, examples of how they are implemented can be seen in the customize-home-templates example
- Removed the deprecated dock config for `buttons` and `apps`
- Added theming support for the new multi state icon urls for browser buttons
- Added additional FDC3 support so that [context metadata](https://fdc3.finos.org/docs/api/ref/Metadata#contextmetadata) is passed when context is broadcast, an intent is raised or fdc3.open is used. This can be used with fdc3.getInfo to see if the context you received was sent from your app.
- Updated example call app so that it logs the new context metadata when an intent is raised or context received. Added context support to the call app. Updated the example participant history app so that it console logs the context metadata received.
- Added UnsavedPagePromptStrategy support to the browserProvider. This takes advantage of the enhancement in Workspace 16.1 to decide whether or not the page should prompt the user if it has unsaved changes (in the platform override: handleSaveModalOnPageClose). The options are:
- "default" - use the default platform behavior
- "skip-untitled" - any page that hasn't been assigned a title shouldn't prompt the user to save unsaved changes.
- "never" - you never want workspace to show a prompt. Unsaved changes will be lost if the user doesn't save before closing.
- Added better support for firing intents at .NET apps and updated the sample winform application.
- Native applications now use an appId for the UUID (if the uuid is not provided) and instanceId (if provided)
- Support for replacing two tokens if specified in native app (external or app asset) command line args: {OF-PLAT-UUID} will be replaced with the UUID of the platform that launched the native app (useful if you want to validate that it is an expected UUID you are allowed to connect to) and {OF-EXT-UUID} which will pass the UUID we launched your external application with.
- Updated the Winform Interop Example to be an updated copy that can auto connect if passed command line arguments and now supports raising more intents (ViewContact, ViewInstrument, ViewNews) and well as listening to those intents. A logging view has also been added.
- BREAKING CHANGE: manifest.fin.json was the only manifest without a security realm specified. This has been updated but may result in saved data being lost when developing locally. We recommend a security realm to isolate your platform from others and so decided to apply it here as well.
- Fixed - when launching multiple instances of an inline app asset it is possible to try and re-download an app asset that has just been downloaded or exists. We now fetch the app asset info to see if the platform already has the app asset and if it is the required version.
- Added util getCommandLineArgs to extract multiple command line arguments from a string into an array. Snap accepts an array of arguments and app assets and external apps take a string as an args parameter. This lets you specify arguments that cover scenarios where snap is disabled and enabled. Added tests to verify getCommandLineArgs behavior.
- Updated identity returned when launching a native app or app asset (either normally or through snap). The UUID is the app id if the app has been marked as instanceMode = "single" otherwise the uuid is appId/guid (guid being an instanceId). The name is the same as the UUID (as name is not specified in app asset/external process options). If your app supports having multiple instances and it registers intent handlers then we recommend passing the created UUID for your app instance using {OF-EXT-UUD} as part of the command line args so that the uuid can be used when you connect to the OpenFin runtime. When you then connect to the workspace platform interop broker (as the platform will be waiting on that connection to fire an intent against it) it will use the expected UUID as it's connection id.
- Update developer composite menu to use the Close menu option instead of Print as the positioning hook. Add Copy Url to the developer view context menu options.

## v16

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,31 @@ export class DeveloperActions implements Actions {
}
};

actionMap["copy-url"] = async (payload: CustomActionPayload): Promise<void> => {
if (payload.callerType === CustomActionCallerType.ViewTabContextMenu) {
const urls: string[] = [];
for (let i = 0; i < payload.selectedViews.length; i++) {
const viewIdentity = payload.selectedViews[i];
try {
const view = fin.View.wrapSync(viewIdentity);
const info = await view.getInfo();
urls.push(info.url);
} catch (error) {
this._logger?.error(
`Error while trying to capture view url for view ${viewIdentity.name}`,
error
);
}
}
if (urls.length > 0) {
const url = urls.join("\n");
await fin.Clipboard.writeText({
data: url
});
}
}
};

return actionMap;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ export class DeveloperMenus implements Menus {
}
},
position: {
operation: "after",
type: "Print"
operation: "before",
type: "CloseTab"
},
separator: "before"
},
Expand All @@ -118,6 +118,22 @@ export class DeveloperMenus implements Menus {
type: "Custom",
customId: "developer-inspect"
}
},
{
include: true,
label: "Copy Url",
data: {
type: "Custom",
action: {
id: "copy-url"
}
},
position: {
operation: "after",
type: "Custom",
customId: "raise-create-app-definition-intent"
},
separator: "after"
}
];
}
Expand Down

0 comments on commit 0fe0557

Please sign in to comment.