Split MessageExtensions AttachmentLayout (list|grid) from Attachment.Layout (list|carousel)#503
Draft
Copilot wants to merge 2 commits into
Draft
Split MessageExtensions AttachmentLayout (list|grid) from Attachment.Layout (list|carousel)#503Copilot wants to merge 2 commits into
Copilot wants to merge 2 commits into
Conversation
…Layout (list|carousel) Agent-Logs-Url: https://github.com/microsoft/teams.net/sessions/10784387-fb02-4ea9-bbe2-70add2826380 Co-authored-by: corinagum <14900841+corinagum@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix AttachmentLayout type to replace 'carousel' with 'grid'
Split MessageExtensions AttachmentLayout (list|grid) from Attachment.Layout (list|carousel)
May 13, 2026
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.
Microsoft.Teams.Api.Attachment.Layoutwas being reused for both Activity/Message attachments (wire valueslist | carousel) and MessageExtensionResultattachments (wire valueslist | grid). These are two distinct enums on the wire and need two distinct types.This mirrors the split in teams.ts — the rename attempt in microsoft/teams.ts#381 (merged 2025-10-25) was reverted in microsoft/teams.ts#382 (merged 2025-10-29) in favor of two parallel types. That context was lost in #193 and #488 (and a related rename in #381).
Changes
Libraries/Microsoft.Teams.Api/MessageExtensions/AttachmentLayout.cs—StringEnumwithList("list") andGrid("grid"), following the existingAttachment.Layoutpattern.MessageExtensions/Result.cs—AttachmentLayoutproperty retyped fromApi.Attachment.Layout?to the newMessageExtensions.AttachmentLayout?.Samples/Samples.MessageExtensions/Program.cs— six call sites updated to the new type (required by the property retype).Attachment.cs(List/Carouselpreserved),Messages/Message.cs,Activities/Message/MessageActivity.cs.Non-breaking: the new type is additive, and
Result.AttachmentLayoutassignable values were already constrained tolist/gridin practice. JSON wire format is unchanged.