-
Notifications
You must be signed in to change notification settings - Fork 793
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
Oneway and Mutual Dependency ElementRelationShip #1360
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,11 +20,17 @@ urlFragment: officedev-microsoft-teams-samples-app-hello-world-nodejs | |
* Tabs | ||
* Bots | ||
* Messaging Extensions | ||
* Element RelationShip Property | ||
* OneWay Dependency | ||
* Mutual Dependency | ||
|
||
## Interaction with app | ||
|
||
![HelloWorldGif](Images/AppHelloWorldGif.gif) | ||
|
||
![ElementRelationShipProperty](Images/ElementRelationShip/OneWay_MutualDependency.gif) | ||
|
||
|
||
## Try it yourself - experience the App in your Microsoft Teams client | ||
Please find below demo manifest which is deployed on Microsoft Azure and you can try it yourself by uploading the app package (.zip file link below) to your teams and/or as a personal app. (Sideloading must be enabled for your tenant, [see steps here](https://docs.microsoft.com/microsoftteams/platform/concepts/build-and-test/prepare-your-o365-tenant#enable-custom-teams-apps-and-turn-on-custom-app-uploading)). | ||
|
||
|
@@ -164,6 +170,26 @@ The simplest way to run this sample in Teams is to use Teams Toolkit for Visual | |
|
||
**Note:** Similarly, you can test your application in the Office 365 desktop app as well. | ||
|
||
**Element RealtionShip Property** | ||
**Oneway Dependency - Bot and Message Extension both should work** | ||
![BotResponse](Images/ElementRelationShip/3.ResponseFromBot_OnewayDepency.png) | ||
|
||
![MessageExtension](Images/ElementRelationShip/4.MsgExt_OneWayDependency.png) | ||
|
||
**Mutual Dependency - Bot,Tab and Configurable Tab all three should work** | ||
**Group Scope** | ||
![ConfigurableTab](Images/ElementRelationShip/6.ConfigureTab.png) | ||
|
||
![GroupChatTab](Images/ElementRelationShip/7.GC_Tab_MutualDependency.png) | ||
|
||
![GroupChatBot](Images/ElementRelationShip/8.GC_Bot_MutualDependency.png) | ||
|
||
![GroupChatMessageExt](Images/ElementRelationShip/9.GC_MsgExtension.png) | ||
|
||
**Outlook - Oneway Dependency** | ||
**Outlook doesn't support bots, and since Message Extensions depend on a bot, the Message Extension doesn't work in Outlook** | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is wrong in two aspects:
|
||
![OutLookMessageExtension](Images/ElementRelationShip/11.Outlook_MsgExt.png) | ||
|
||
## Deploy the bot to Azure | ||
|
||
To learn more about deploying a bot to Azure, see [Deploy your bot to Azure](https://aka.ms/azuredeployment) for a complete list of deployment instructions. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,80 +1,119 @@ | ||
{ | ||
"$schema": "https://developer.microsoft.com/json-schemas/teams/v1.16/MicrosoftTeams.schema.json", | ||
"manifestVersion": "1.16", | ||
"$schema": "https://developer.microsoft.com/json-schemas/teams/vDevPreview/MicrosoftTeams.schema.json", | ||
"manifestVersion": "devPreview", | ||
"version": "1.0.0", | ||
"id": "${{TEAMS_APP_ID}}", | ||
"packageName": "com.contoso.helloworld", | ||
"developer": { | ||
"name": "Contoso", | ||
"websiteUrl": "https://www.microsoft.com", | ||
"privacyUrl": "https://www.microsoft.com/privacy", | ||
"termsOfUseUrl": "https://www.microsoft.com/termsofuse" | ||
"name": "Contoso", | ||
"websiteUrl": "https://www.microsoft.com", | ||
"privacyUrl": "https://www.microsoft.com/privacy", | ||
"termsOfUseUrl": "https://www.microsoft.com/termsofuse" | ||
}, | ||
"name": { | ||
"short": "Hello World", | ||
"full": "Hello World App for Microsoft Teams" | ||
"short": "ElementRelationshipSet", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this an app for ElementRelationshipSet or for Hello World? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Created New sample, Comment fixed |
||
"full": "Hello World App for Microsoft Teams" | ||
}, | ||
"description": { | ||
"short": "Hello World App for Microsoft Teams", | ||
"full": "This sample app provides a very simple app for Microsoft Teams. You can extend this to add more content and capabilities." | ||
"short": "Hello World App for Microsoft Teams", | ||
"full": "This sample app provides a very simple app for Microsoft Teams. You can extend this to add more content and capabilities." | ||
}, | ||
"icons": { | ||
"outline": "outline.png", | ||
"color": "color.png" | ||
"outline": "outline.png", | ||
"color": "color.png" | ||
}, | ||
"accentColor": "#60A18E", | ||
"staticTabs": [ | ||
{ | ||
"entityId": "com.contoso.helloworld.hellotab", | ||
"name": "Hello Tab", | ||
"contentUrl": "https://${{BOT_DOMAIN}}/hello", | ||
"scopes": [ | ||
"personal" | ||
"elementRelationshipSet": { | ||
"oneWayDependencies": [ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's add one more oneWayDepend scenario that's about a tab dependsOn ME (at ME level, instead of command level) |
||
{ | ||
"element": { | ||
"name": "composeExtensions", | ||
"id": "composeExt_ID", | ||
"commandIds": [ | ||
"getRandomText" | ||
] | ||
}, | ||
"dependsOn": [ | ||
{ | ||
"name": "bots", | ||
"id": "${{AAD_APP_CLIENT_ID}}" | ||
} | ||
] | ||
} | ||
], | ||
"mutualDependencies": [ | ||
[ | ||
{ | ||
"name": "bots", | ||
"id": "${{AAD_APP_CLIENT_ID}}" | ||
}, | ||
{ | ||
"name": "staticTabs", | ||
"id": "staticTab_ID" | ||
}, | ||
{ | ||
"name": "configurableTabs", | ||
"id": "configurableTab_ID" | ||
} | ||
] | ||
] | ||
} | ||
}, | ||
"staticTabs": [ | ||
{ | ||
"entityId": "staticTab_ID", | ||
"name": "Hello Tab", | ||
"contentUrl": "https://${{BOT_DOMAIN}}/hello", | ||
"scopes": [ | ||
"personal" | ||
] | ||
} | ||
], | ||
"configurableTabs": [ | ||
{ | ||
"configurationUrl": "https://${{BOT_DOMAIN}}/configure", | ||
"canUpdateConfiguration": true, | ||
"scopes": [ | ||
"team" | ||
] | ||
} | ||
{ | ||
"id": "configurableTab_ID", | ||
"configurationUrl": "https://${{BOT_DOMAIN}}/configure", | ||
"canUpdateConfiguration": true, | ||
"scopes": [ | ||
"team", | ||
"groupChat" | ||
] | ||
} | ||
], | ||
"bots": [ | ||
{ | ||
"botId": "${{AAD_APP_CLIENT_ID}}", | ||
"needsChannelSelector": false, | ||
"isNotificationOnly": false, | ||
"scopes": [ | ||
"team", | ||
"personal" | ||
] | ||
} | ||
{ | ||
"botId": "${{AAD_APP_CLIENT_ID}}", | ||
"needsChannelSelector": false, | ||
"isNotificationOnly": false, | ||
"scopes": [ | ||
"team", | ||
"personal", | ||
"groupChat" | ||
] | ||
} | ||
], | ||
"composeExtensions": [ | ||
{ | ||
"botId": "${{AAD_APP_CLIENT_ID}}", | ||
"commands": [ | ||
{ | ||
"id": "getRandomText", | ||
"description": "Gets some random text and images that you can insert in messages for fun.", | ||
"title": "Get some random text for fun", | ||
"initialRun": true, | ||
"parameters": [ | ||
{ | ||
"name": "cardTitle", | ||
"description": "Card title to use", | ||
"title": "Card title" | ||
} | ||
{ | ||
"id": "composeExt_ID", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a searchME dependsOn bot case. Yet our hero case for RT in terms of command level dependency is really actionME dependsOn bot. And this actionME should also contain a botSentCard scenario. Also suggest we explicitly use the "type" field to call out the type of the command. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fixed |
||
"botId": "${{AAD_APP_CLIENT_ID}}", | ||
"commands": [ | ||
{ | ||
"id": "getRandomText", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Suggest we use a more meaningful value for the id field, despite not necessarily needing UUID. |
||
"description": "Gets some random text and images that you can insert in messages for fun.", | ||
"title": "Get some random text for fun", | ||
"initialRun": true, | ||
"parameters": [ | ||
{ | ||
"name": "cardTitle", | ||
"description": "Card title to use", | ||
"title": "Card title" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} | ||
], | ||
"permissions": [], | ||
"validDomains": [ | ||
"${{BOT_DOMAIN}}" | ||
"${{BOT_DOMAIN}}" | ||
] | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm new to sample app creation, but why do we not create a separate RT sample app yet use existing hello-world app to illustrate RT usage? This might create confusion to developers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also so far only elementRelationshipSet is covered. I don't see "hostMustSupportFunctionalities" yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed