Add MessagingExtensionAttachmentLayout enum with "grid" support#186
Conversation
Co-authored-by: heyitsaamir <[email protected]>
Co-authored-by: heyitsaamir <[email protected]>
|
@copilot these are not helpful tests. Remove them. |
Co-authored-by: heyitsaamir <[email protected]>
There was a problem hiding this comment.
Pull Request Overview
This PR updates the AttachmentLayout enum to align with the TypeScript implementation in teams.ts PR #381, changing the enum value from "carousel" to "grid".
Key changes:
- Updated
AttachmentLayout.CAROUSELtoAttachmentLayout.GRIDwith value "grid" - Updated docstring in the
with_attachment_layoutmethod to reflect the new enum value
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/api/src/microsoft/teams/api/models/attachment/attachment_layout.py | Changed enum member from CAROUSEL = "carousel" to GRID = "grid" |
| packages/api/src/microsoft/teams/api/activities/message/message.py | Updated docstring to reference "grid" instead of "carousel" |
|
@copilot revert this change. Then introduce a NEW type called MessagingExtensionAttachmentLayout, and use THAT for the attachmentLayout in MessagingExtensionResult. Don't forget to export types as needed in __init__s. |
Co-authored-by: heyitsaamir <[email protected]>
Reverted |
Aligns with teams.ts PR #381 to add "grid" layout support for messaging extensions while maintaining backward compatibility.
Changes
MessagingExtensionAttachmentLayoutwith valuesLIST = "list"andGRID = "grid"MessagingExtensionResult.attachment_layoutnow usesMessagingExtensionAttachmentLayoutinstead ofAttachmentLayoutAttachmentLayoutremains unchanged withLISTandCAROUSELfor backward compatibilityMessagingExtensionAttachmentLayouttomessaging_extension/__init__.pyUsage
Note: This change maintains backward compatibility. Existing code using
AttachmentLayout.CAROUSELis not affected. Only messaging extension code needs to migrate to the newMessagingExtensionAttachmentLayouttype.Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.