Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecating IntentMetadata.displayname #926

Merged
merged 8 commits into from
May 30, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 9 additions & 9 deletions docs/api/ref/DesktopAgent.md
Original file line number Diff line number Diff line change
Expand Up @@ -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" },
Expand All @@ -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" },
Expand All @@ -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<fdc3.Quote>");
// 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<fdc3.Quote>"}]
// }
```
Expand Down Expand Up @@ -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" },
Expand All @@ -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"}]
// }
// ];
Expand All @@ -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"}]
// }];

Expand Down
7 changes: 4 additions & 3 deletions docs/api/ref/Metadata.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
kriswest marked this conversation as resolved.
Show resolved Hide resolved
readonly displayName: string;
}
```
Expand Down
16 changes: 8 additions & 8 deletions src/api/DesktopAgent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export interface DesktopAgent {
*
* // returns a single AppIntent:
* // {
* // intent: { name: "StartChat", displayName: "Chat" },
* // intent: { name: "StartChat" },
* // apps: [
* // { appId: "Skype" },
* // { appId: "Symphony" },
Expand All @@ -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" },
Expand All @@ -104,23 +104,23 @@ 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" }]
* // }
*
* const appIntent = await fdc3.findIntent("ViewContact", contact, "fdc3.ContactList");
*
* // 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"}]
* // }
*
* const appIntent = await fdc3.findIntent("QuoteStream", instrument, "channel<fdc3.Quote>");
*
* // 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<fdc3.Quote>"}]
* // }
* ```
Expand Down Expand Up @@ -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" },
Expand All @@ -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"}]
* // }];
*
Expand Down
5 changes: 4 additions & 1 deletion src/api/IntentMetadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
kriswest marked this conversation as resolved.
Show resolved Hide resolved
readonly displayName: string;
}
7 changes: 2 additions & 5 deletions src/app-directory/specification/appd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
kriswest marked this conversation as resolved.
Show resolved Hide resolved
kriswest marked this conversation as resolved.
Show resolved Hide resolved
deprecated: true
contexts:
type: array
items:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
7 changes: 2 additions & 5 deletions website/static/schemas/next/app-directory.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
kriswest marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.

deprecated: true
contexts:
type: array
items:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down