Conversation
There was a problem hiding this comment.
Pull request overview
Updates the Microsoft.Teams.Cards Adaptive Cards action helpers to align with newly generated Teams-specific *SubmitActionData models, and begins deprecating the legacy convenience action types.
Changes:
- Marked legacy
*Actionhelper classes as obsolete in favor of generated*SubmitActionDatareplacements. - Updated
InvokeActionto constructInvokeSubmitActionDatausing the newIUnion-based value type. - Added/updated XML docs to reflect the deprecation guidance.
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| Libraries/Microsoft.Teams.Cards/Actions/TaskFetchAction.cs | Added [Obsolete] + deprecation docs directing to TaskFetchSubmitActionData. |
| Libraries/Microsoft.Teams.Cards/Actions/SignInAction.cs | Added [Obsolete] + deprecation docs directing to SigninSubmitActionData. |
| Libraries/Microsoft.Teams.Cards/Actions/MessageBackAction.cs | Added [Obsolete] + deprecation docs directing to MessageBackSubmitActionData. |
| Libraries/Microsoft.Teams.Cards/Actions/InvokeAction.cs | Added [Obsolete] and updated InvokeSubmitActionData construction to use Union<object, CollabStageInvokeDataValue>. |
| Libraries/Microsoft.Teams.Cards/Actions/IMBackAction.cs | Added [Obsolete] + deprecation docs directing to ImBackSubmitActionData. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Updates the Teams Adaptive Cards library to the latest generated model output and migrates usage away from deprecated hand-written action types toward generated submit-action data types.
Changes:
- Updated tests to use new required constructors (e.g.,
AdaptiveCard(body),ChoiceSetInput(choices)). - Updated the Dialogs sample to launch task modules via
Action.Submit+TaskFetchSubmitActionDatainstead ofTaskFetchAction. - Marked legacy action helper classes (
IMBackAction,InvokeAction,MessageBackAction,SignInAction,TaskFetchAction) as[Obsolete]and pointed to generated replacements.
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| Tests/Microsoft.Teams.Cards.Tests/AdaptiveCardsTest.cs | Migrates test card construction to new required constructors. |
| Samples/Samples.Dialogs/Program.cs | Switches task/fetch launching to generated submit-action data; adds helper factory. |
| Libraries/Microsoft.Teams.Cards/Actions/TaskFetchAction.cs | Marks legacy TaskFetchAction obsolete in favor of generated submit-action data. |
| Libraries/Microsoft.Teams.Cards/Actions/SignInAction.cs | Marks legacy SignInAction obsolete in favor of generated submit-action data. |
| Libraries/Microsoft.Teams.Cards/Actions/MessageBackAction.cs | Marks legacy MessageBackAction obsolete in favor of generated submit-action data. |
| Libraries/Microsoft.Teams.Cards/Actions/InvokeAction.cs | Marks legacy InvokeAction obsolete; updates to new union-based value shape. |
| Libraries/Microsoft.Teams.Cards/Actions/IMBackAction.cs | Marks legacy IMBackAction obsolete in favor of generated submit-action data. |
Comments suppressed due to low confidence (1)
Samples/Samples.Dialogs/Program.cs:176
AdaptiveCardno longer has a parameterless constructor (it now requires the body list in its constructor). Thisnew Microsoft.Teams.Cards.AdaptiveCard { Body = ... }initialization will fail to compile; switch to constructing the card with the body list via the constructor and keepActions/other properties in the object initializer.
static Microsoft.Teams.Cards.AdaptiveCard CreateDialogLauncherCard()
{
var card = new Microsoft.Teams.Cards.AdaptiveCard
{
Body = new List<Microsoft.Teams.Cards.CardElement>
{
new Microsoft.Teams.Cards.TextBlock("Select the examples you want to see!")
{
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Core.csfrom latest codegen outputInvokeAction.csto use newIUniontype forInvokeSubmitActionDatavalue parameterIMBackAction,InvokeAction,MessageBackAction,SignInAction, andTaskFetchActionwith [Obsolete], pointing to their generated replacementsmsteamsadded to several types:AdaptiveCard,SubmitAction,Image,SubmitActionDataAdaptiveCard(body),ChoiceSetInput(choices)StyleEnumclass removed (replaced byChoiceSetInputStyle)