From 869a7634c0d706949b521e3c44dc1fcee2279383 Mon Sep 17 00:00:00 2001 From: Kris West Date: Thu, 9 Mar 2023 16:36:26 +0000 Subject: [PATCH 1/7] Deprecating IntentMetadata.displayname --- docs/api/ref/DesktopAgent.md | 18 +++++++++--------- docs/api/ref/Metadata.md | 7 ++++--- src/api/DesktopAgent.ts | 16 ++++++++-------- src/api/IntentMetadata.ts | 5 ++++- src/app-directory/specification/appd.yaml | 7 ++----- website/static/schemas/next/app-directory.yaml | 7 ++----- 6 files changed, 29 insertions(+), 31 deletions(-) diff --git a/docs/api/ref/DesktopAgent.md b/docs/api/ref/DesktopAgent.md index f74f5f201..1045296b3 100644 --- a/docs/api/ref/DesktopAgent.md +++ b/docs/api/ref/DesktopAgent.md @@ -283,7 +283,7 @@ I know 'StartChat' exists as a concept, and want to know which apps can resolve const appIntent = await fdc3.findIntent("StartChat"); // returns a single AppIntent: // { -// intent: { name: "StartChat", displayName: "Chat" }, +// intent: { name: "StartChat" }, // apps: [ // { appId: "Skype" }, // { appId: "Symphony" }, @@ -299,7 +299,7 @@ const appIntent = await fdc3.findIntent("StartChat"); // returns an AppIntent, but with multiple options for resolution, // which includes an existing instance of an application: // { -// intent: { name: "StartChat", displayName: "Chat" }, +// intent: { name: "StartChat" }, // apps: [ // { appId: "Skype" }, // { appId: "Symphony" }, @@ -315,21 +315,21 @@ const appIntent = await fdc3.findIntent("StartChat", contact); // returns only apps that support the type of the specified input context: // { -// intent: { name: "StartChat", displayName: "Chat" }, +// intent: { name: "StartChat" }, // apps: { name: "Symphony" }] // } const appIntent = await fdc3.findIntent("ViewContact", "fdc3.ContactList"); // returns only apps that return the specified result type: // { -// intent: { name: "ViewContact", displayName: "View Contact Details" }, +// intent: { name: "ViewContact" }, // apps: { appId: "MyCRM", resultType: "fdc3.ContactList"}] // } const appIntent = await fdc3.findIntent("QuoteStream", instrument, "channel"); // returns only apps that return a channel which will receive the specified input and result types: // { -// intent: { name: "QuoteStream", displayName: "Quotes stream" }, +// intent: { name: "QuoteStream" }, // apps: { appId: "MyOMS", resultType: "channel"}] // } ``` @@ -363,11 +363,11 @@ const appIntents = await fdc3.findIntentsByContext(context); // returns, for example: // [ // { -// intent: { name: "StartCall", displayName: "Call" }, +// intent: { name: "StartCall" }, // apps: [{ appId: "Skype" }] // }, // { -// intent: { name: "StartChat", displayName: "Chat" }, +// intent: { name: "StartChat" }, // apps: [ // { appId: "Skype" }, // { appId: "Symphony" }, @@ -376,7 +376,7 @@ const appIntents = await fdc3.findIntentsByContext(context); // ] // }, // { -// intent: { name: "ViewContact", displayName: "View Contact" }, +// intent: { name: "ViewContact" }, // apps: [{ appId: "Symphony" }, { appId: "MyCRM", resultType: "fdc3.ContactList"}] // } // ]; @@ -388,7 +388,7 @@ or I look for only intents that are resolved by apps returning a particular resu const appIntentsForType = await fdc3.findIntentsByContext(context, "fdc3.ContactList"); // returns for example: // [{ -// intent: { name: "ViewContact", displayName: "View Contact" }, +// intent: { name: "ViewContact" }, // apps: [{ appId: "Symphony" }, { appId: "MyCRM", resultType: "fdc3.ContactList"}] // }]; diff --git a/docs/api/ref/Metadata.md b/docs/api/ref/Metadata.md index cb11fda52..9b3e651fc 100644 --- a/docs/api/ref/Metadata.md +++ b/docs/api/ref/Metadata.md @@ -302,9 +302,10 @@ interface IntentMetadata { /** The unique name of the intent that can be invoked by the raiseIntent call. */ readonly name: string; - /** A friendly display name for the intent that should be used to render UI - * elements. - */ + /** Display name for the intent. Deprecated in favour of using the intent name for display as + * display name may vary for each application as it is defined in the app's AppD record. + * @deprecated + */ readonly displayName: string; } ``` diff --git a/src/api/DesktopAgent.ts b/src/api/DesktopAgent.ts index 8ed745e14..278b3c446 100644 --- a/src/api/DesktopAgent.ts +++ b/src/api/DesktopAgent.ts @@ -72,7 +72,7 @@ export interface DesktopAgent { * * // returns a single AppIntent: * // { - * // intent: { name: "StartChat", displayName: "Chat" }, + * // intent: { name: "StartChat" }, * // apps: [ * // { appId: "Skype" }, * // { appId: "Symphony" }, @@ -88,7 +88,7 @@ export interface DesktopAgent { * // returns an AppIntent, but with multiple options for resolution, * // which includes an existing instance of an application: * // { - * // intent: { name: "StartChat", displayName: "Chat" }, + * // intent: { name: "StartChat" }, * // apps: [ * // { appId: "Skype" }, * // { appId: "Symphony" }, @@ -104,7 +104,7 @@ export interface DesktopAgent { * * // returns only apps that support the type of the specified input context: * // { - * // intent: { name: "StartChat", displayName: "Chat" }, + * // intent: { name: "StartChat" }, * // apps: [{ appId: "Symphony" }] * // } * @@ -112,7 +112,7 @@ export interface DesktopAgent { * * // returns only apps that return the specified result Context type: * // { - * // intent: { name: "ViewContact", displayName: "View Contact Details" }, + * // intent: { name: "ViewContact" }, * // apps: { appId: "MyCRM", resultType: "fdc3.ContactList"}] * // } * @@ -120,7 +120,7 @@ export interface DesktopAgent { * * // returns only apps that return a channel which will receive the specified input and result types: * // { - * // intent: { name: "QuoteStream", displayName: "Quotes stream" }, + * // intent: { name: "QuoteStream" }, * // apps: [{ appId: "MyOMS", resultType: "channel"}] * // } * ``` @@ -148,11 +148,11 @@ export interface DesktopAgent { * // returns for example: * // [ * // { - * // intent: { name: "StartCall", displayName: "Call" }, + * // intent: { name: "StartCall" }, * // apps: [{ name: "Skype" }] * // }, * // { - * // intent: { name: "StartChat", displayName: "Chat" }, + * // intent: { name: "StartChat" }, * // apps: [ * // { appId: "Skype" }, * // { appId: "Symphony" }, @@ -166,7 +166,7 @@ export interface DesktopAgent { * const appIntentsForType = await fdc3.findIntentsByContext(context, "fdc3.ContactList"); * // returns for example: * // [{ - * // intent: { name: "ViewContact", displayName: "View Contacts" }, + * // intent: { name: "ViewContact" }, * // apps: [{ appId: "MyCRM", resultType: "fdc3.ContactList"}] * // }]; * diff --git a/src/api/IntentMetadata.ts b/src/api/IntentMetadata.ts index 41e7280ee..a5d733c65 100644 --- a/src/api/IntentMetadata.ts +++ b/src/api/IntentMetadata.ts @@ -10,6 +10,9 @@ export interface IntentMetadata { /** The unique name of the intent that can be invoked by the raiseIntent call */ readonly name: string; - /** A friendly display name for the intent that should be used to render UI elements */ + /** Display name for the intent. Deprecated in favour of using the intent name for display as + * display name may vary for each application as it is defined in the app's AppD record. + * @deprecated + */ readonly displayName: string; } diff --git a/src/app-directory/specification/appd.yaml b/src/app-directory/specification/appd.yaml index ba81c7591..00899b5b0 100644 --- a/src/app-directory/specification/appd.yaml +++ b/src/app-directory/specification/appd.yaml @@ -607,7 +607,8 @@ components: properties: displayName: type: string - description: An optional display name for the intent that may be used in UI instead of the name. + description: Optional display name for the intent. Deprecated in favour of the Intent name, which is common amongst all apps that support it, where the display name may vary. + deprecated: true contexts: type: array items: @@ -1028,11 +1029,9 @@ components: intents: listensFor: ViewChart: - displayName: View Chart contexts: - fdc3.instrument myApp.GetPrice: - displayName: Get Price contexts: - fdc3.instrument resultType: myApp.quote @@ -1143,11 +1142,9 @@ components: intents: listensFor: ViewChart: - displayName: View Chart contexts: - fdc3.instrument myApp.GetPrice: - displayName: Get Price contexts: - fdc3.instrument resultType: myApp.quote diff --git a/website/static/schemas/next/app-directory.yaml b/website/static/schemas/next/app-directory.yaml index ba81c7591..9e4695a7c 100644 --- a/website/static/schemas/next/app-directory.yaml +++ b/website/static/schemas/next/app-directory.yaml @@ -607,7 +607,8 @@ components: properties: displayName: type: string - description: An optional display name for the intent that may be used in UI instead of the name. + description: Optional display name for the intent. Deprecated in favour of the Intent name, which is common amongst all apps that support it, where teh display name may vary. + deprecated: true contexts: type: array items: @@ -1028,11 +1029,9 @@ components: intents: listensFor: ViewChart: - displayName: View Chart contexts: - fdc3.instrument myApp.GetPrice: - displayName: Get Price contexts: - fdc3.instrument resultType: myApp.quote @@ -1143,11 +1142,9 @@ components: intents: listensFor: ViewChart: - displayName: View Chart contexts: - fdc3.instrument myApp.GetPrice: - displayName: Get Price contexts: - fdc3.instrument resultType: myApp.quote From 1fc9bb6ed56c7b1a4570d26e097e654d1ae1d060 Mon Sep 17 00:00:00 2001 From: Kris West Date: Thu, 9 Mar 2023 19:03:11 +0000 Subject: [PATCH 2/7] Changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5b9b7f2db..060cdf929 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Deprecated +* Deprecated `IntentMetadata.displayName` and the appD record's `interop.intents.listensFor[].displayName` field in favour of using intent names for display (which are required to be recognizable) as it can be set differently for each application in the appD ([#926](https://github.com/finos/FDC3/pull/926)) + ### Fixed ## [FDC3 Standard 2.0](https://github.com/finos/FDC3/compare/v1.2..v2.0) - 2022-07-01 From 16f0f575b6e95b5a63bd4db9beb5751137a585cf Mon Sep 17 00:00:00 2001 From: Kris West Date: Wed, 5 Apr 2023 14:28:22 +0100 Subject: [PATCH 3/7] Update src/api/IntentMetadata.ts Co-authored-by: Matt Jamieson <10372+mattjamieson@users.noreply.github.com> --- src/api/IntentMetadata.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/api/IntentMetadata.ts b/src/api/IntentMetadata.ts index a5d733c65..e5ca94474 100644 --- a/src/api/IntentMetadata.ts +++ b/src/api/IntentMetadata.ts @@ -10,9 +10,9 @@ export interface IntentMetadata { /** The unique name of the intent that can be invoked by the raiseIntent call */ readonly name: string; - /** Display name for the intent. Deprecated in favour of using the intent name for display as - * display name may vary for each application as it is defined in the app's AppD record. - * @deprecated + /** Display name for the intent. + * @deprecated Use the intent name for display as display name may vary for + * each application as it is defined in the app's AppD record. */ readonly displayName: string; } From 7cd7f39400c9200d9d8d25cd48c440772da7e353 Mon Sep 17 00:00:00 2001 From: Kris West Date: Wed, 5 Apr 2023 14:33:15 +0100 Subject: [PATCH 4/7] Update src/app-directory/specification/appd.yaml --- src/app-directory/specification/appd.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app-directory/specification/appd.yaml b/src/app-directory/specification/appd.yaml index 00899b5b0..555bd322d 100644 --- a/src/app-directory/specification/appd.yaml +++ b/src/app-directory/specification/appd.yaml @@ -607,7 +607,7 @@ components: properties: displayName: type: string - description: Optional display name for the intent. Deprecated in favour of the Intent name, which is common amongst all apps that support it, where the display name may vary. + description: Optional display name for the intent. Deprecated in favour of the intent name, which is common amongst all apps that support it, where the display name may vary as it is defined in the app's AppD record. deprecated: true contexts: type: array From 59fc9f3cbf1b3fa6b77c488b8e016e41cc84a70b Mon Sep 17 00:00:00 2001 From: Kris West Date: Wed, 5 Apr 2023 14:34:11 +0100 Subject: [PATCH 5/7] Update website/static/schemas/next/app-directory.yaml --- website/static/schemas/next/app-directory.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/static/schemas/next/app-directory.yaml b/website/static/schemas/next/app-directory.yaml index 9e4695a7c..bb3043d06 100644 --- a/website/static/schemas/next/app-directory.yaml +++ b/website/static/schemas/next/app-directory.yaml @@ -607,7 +607,7 @@ components: properties: displayName: type: string - description: Optional display name for the intent. Deprecated in favour of the Intent name, which is common amongst all apps that support it, where teh display name may vary. + description: Optional display name for the intent. Deprecated in favour of the intent name, which is common amongst all apps that support it, where the display name may vary as it is defined in the app's AppD record. deprecated: true contexts: type: array From b4150fa8fde03b51b6a7583e0cc6301ecc6995c7 Mon Sep 17 00:00:00 2001 From: Kris West Date: Wed, 5 Apr 2023 14:34:33 +0100 Subject: [PATCH 6/7] Update docs/api/ref/Metadata.md Co-authored-by: Matt Jamieson <10372+mattjamieson@users.noreply.github.com> --- docs/api/ref/Metadata.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/api/ref/Metadata.md b/docs/api/ref/Metadata.md index 9b3e651fc..278393651 100644 --- a/docs/api/ref/Metadata.md +++ b/docs/api/ref/Metadata.md @@ -302,10 +302,10 @@ interface IntentMetadata { /** The unique name of the intent that can be invoked by the raiseIntent call. */ readonly name: string; - /** Display name for the intent. Deprecated in favour of using the intent name for display as - * display name may vary for each application as it is defined in the app's AppD record. - * @deprecated - */ + /** Display name for the intent. + * @deprecated Use the intent name for display as display name may vary for + * each application as it is defined in the app's AppD record. + */ readonly displayName: string; } ``` From f705e718e7163f1db47c404f9d26acbd857cdd14 Mon Sep 17 00:00:00 2001 From: Kris West Date: Wed, 5 Apr 2023 14:35:10 +0100 Subject: [PATCH 7/7] Update src/app-directory/specification/appd.yaml --- src/app-directory/specification/appd.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app-directory/specification/appd.yaml b/src/app-directory/specification/appd.yaml index 555bd322d..bb3043d06 100644 --- a/src/app-directory/specification/appd.yaml +++ b/src/app-directory/specification/appd.yaml @@ -607,7 +607,7 @@ components: properties: displayName: type: string - description: Optional display name for the intent. Deprecated in favour of the intent name, which is common amongst all apps that support it, where the display name may vary as it is defined in the app's AppD record. + description: Optional display name for the intent. Deprecated in favour of the intent name, which is common amongst all apps that support it, where the display name may vary as it is defined in the app's AppD record. deprecated: true contexts: type: array