Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 24, 2025

Aligns with teams.ts PR #381 to update the AttachmentLayout enum values.

Changes

  • Enum value: AttachmentLayout.CAROUSELAttachmentLayout.GRID (value: "carousel""grid")
  • Docstring: Updated method documentation to reflect the new enum value

Usage

from microsoft.teams.api.models import AttachmentLayout, MessagingExtensionResult

result = MessagingExtensionResult(
    attachment_layout=AttachmentLayout.GRID,  # Previously CAROUSEL
    attachments=[...]
)

Note: This is a breaking change for code using AttachmentLayout.CAROUSEL.

Original prompt

can you change AttachmentLayout to be list | grid instead of list | carousel. Link microsoft/teams.ts#381 in the PR description.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits October 24, 2025 23:17
Co-authored-by: heyitsaamir <48929123+heyitsaamir@users.noreply.github.com>
Co-authored-by: heyitsaamir <48929123+heyitsaamir@users.noreply.github.com>
Copilot AI changed the title [WIP] Change AttachmentLayout to list or grid format Change AttachmentLayout enum from "carousel" to "grid" Oct 24, 2025
Copilot AI requested a review from heyitsaamir October 24, 2025 23:23
Copilot finished work on behalf of heyitsaamir October 24, 2025 23:23
@heyitsaamir
Copy link
Collaborator

@copilot these are not helpful tests. Remove them.

Co-authored-by: heyitsaamir <48929123+heyitsaamir@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Oct 24, 2025

@copilot these are not helpful tests. Remove them.

Removed the test file in commit 1509aa2.

@heyitsaamir heyitsaamir marked this pull request as ready for review October 24, 2025 23:34
Copilot AI review requested due to automatic review settings October 24, 2025 23:34
Copilot finished work on behalf of heyitsaamir October 24, 2025 23:34
Copy link
Contributor

Copilot AI left a 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.CAROUSEL to AttachmentLayout.GRID with value "grid"
  • Updated docstring in the with_attachment_layout method 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"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants