docs: update dialog guides to current SDK patterns#2795
Merged
heyitsaamir merged 2 commits intomainfrom Apr 28, 2026
Merged
Conversation
The TS and Python dialog docs were using deprecated TaskFetchAction/TaskFetchData and manual if-else routing. Updated to use the current SDK patterns: OpenDialogData for triggering, SubmitData for submit routing, and per-dialog handler registration instead of catch-all handlers. Co-Authored-By: Claude <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the Teams SDK dialog documentation to reflect current handler-routing patterns and newer OpenDialogData / SubmitData shapes, reducing boilerplate in examples.
Changes:
- Replace deprecated
TaskFetchAction/TaskFetchDatapatterns withOpenDialogData(TS/Python). - Switch from catch-all handlers to per-dialog/per-action routes (
dialog.open.<id>,dialog.submit.<action>,@app.on_dialog_open("<id>"),@app.on_dialog_submit("<action>")). - Simplify dialog submit responses in Python by returning
TaskModuleResponsedirectly (noInvokeResponse(body=...)wrapping).
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| teams.md/src/pages/templates/in-depth-guides/dialogs/creating-dialogs.mdx | Adds guidance encouraging per-dialog handlers over if/else routing. |
| teams.md/src/components/include/in-depth-guides/dialogs/creating-dialogs/typescript.incl.md | Updates TS dialog open + submit examples to OpenDialogData/SubmitData and scoped routes. |
| teams.md/src/components/include/in-depth-guides/dialogs/creating-dialogs/python.incl.md | Updates Python dialog open examples to OpenDialogData and @app.on_dialog_open("<id>") routing. |
| teams.md/src/components/include/in-depth-guides/dialogs/handling-dialog-submissions/typescript.incl.md | Updates TS submission handling to dialog.submit.<action> routing guidance and examples. |
| teams.md/src/components/include/in-depth-guides/dialogs/handling-dialog-submissions/python.incl.md | Updates Python submission handling to action-scoped @app.on_dialog_submit("<action>"). |
| teams.md/src/components/include/in-depth-guides/dialogs/handling-multi-step-forms/typescript.incl.md | Refactors TS multi-step dialog example to step-specific submit routes + SubmitData state passing. |
| teams.md/src/components/include/in-depth-guides/dialogs/handling-multi-step-forms/python.incl.md | Refactors Python multi-step dialog example to step-specific submit routes + SubmitData state passing. |
The tip was in the shared template, which would show it for C# too (where the old catch-all pattern is still used). Moved it into the language-specific includes with language-appropriate syntax. Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
TaskFetchAction/TaskFetchDatawithOpenDialogDatain TS and Python dialog docsdialog.open.simple_form/@app.on_dialog_open("simple_form"))SubmitDatafor action-based routing instead of manualsubmissiondialogtypefieldsInvokeResponse(body=...)wrappingTest plan
npm run generate:docsinteams.md/generates cleanlyOpenDialogData,SubmitDatafrom@microsoft/teams.cards/microsoft_teams.cards)