-
Notifications
You must be signed in to change notification settings - Fork 6
Add MessagingExtensionAttachmentLayout enum with "grid" support #186
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
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.