Forum Discussion
catmanjan2010
Oct 17, 2022Copper Contributor
Teams command bar integration bot shows See More and See Less button for no reason
Teams command bar integration bot shows "See More" and "See Less" button for no reason Clicking the buttons has no effect How do we remove these buttons? Seems to appear no matter what length...
Nivedipa-MSFT
Microsoft
Nov 07, 2022
catmanjan2010 - We have tested with text property but still we are not getting see more and see less button.
We have tested this on Teams Desktop version 1.5.00.30306 and web version.
We have used below code
var card = new ThumbnailCard
{
Title = $"{packageId}, {version}",
Text="This is adaptive card",
Subtitle = description,
Images = new List<CardImage> { new CardImage { Url = $"https://raw.githubusercontent.com/microsoft/botframework-sdk/master/icon.png" } }
};
if (!string.IsNullOrEmpty(iconUrl))
{
card.Images = new List<CardImage>() { new CardImage(iconUrl, "Icon") };
}
var attachment = new MessagingExtensionAttachment
{
ContentType = ThumbnailCard.ContentType,
Content = card,
};
return Task.FromResult(new MessagingExtensionResponse
{
ComposeExtension = new MessagingExtensionResult
{
Type = "result",
AttachmentLayout = "list",
Attachments = new List<MessagingExtensionAttachment> { attachment }
}
});
Could you please share your card code to test at our end?
catmanjan2010
Nov 07, 2022Copper Contributor
Nivedipa-MSFT Here is a screenshot of what I see, I am not sure what element is causing it but its definitely happening
The only difference I see between mine and yours is my add in name appears in my card, I have a custom size image and buttons
var attachments = response.Results.Select(result =>
{
var buttons = new List<CardAction>();
var titleString = result.Title?.Raw;
// check for links
if (!string.IsNullOrEmpty(result.Extension?.Raw))
{
var protocol = result.Extension.Raw.ToOfficeProtocol();
if (!string.IsNullOrEmpty(result.EditUrl?.Raw) && !string.IsNullOrEmpty(protocol))
{
buttons.Add(new CardAction(
"openUrl",
"Edit",
image: $"{_hydraUri}/icon/{result.Icon.Raw}",
value: $"{_teamsBotUri}/launch.html?link="));
}
}
buttons.Add(new CardAction("openUrl", "Manage", value: $"{_teamsBotUri}/Manage"));
if (!string.IsNullOrEmpty(result.Url.Raw))
{
titleString = $"<a href='{result.Url.Raw}'>{titleString}</a>";
}
var imageType = "FOLDER";
if (result.Icon != null)
{
imageType = result.Icon.Raw;
}
var card = new ThumbnailCard
{
Title = titleString,
Subtitle = result.Body?.Snippet,
Text = result.Metadata?.ContentSourceId,
Images = new List<CardImage> { new CardImage { Url = $"{_hydraUri}/icon/{imageType}" } },
Buttons = buttons
};
var attachment = new MessagingExtensionAttachment
{
ContentType = ThumbnailCard.ContentType,
Content = card,
Preview = card.ToAttachment()
};
return attachment;
});
return new MessagingExtensionResponse
{
ComposeExtension = new MessagingExtensionResult
{
Type = "result",
AttachmentLayout = "list",
Attachments = attachments.ToList()
}
};
- Nivedipa-MSFTNov 28, 2022
Microsoft
catmanjan2010 - Could you please confirm if you are using public version or any other version of Teams? - Nivedipa-MSFTNov 15, 2022
Microsoft
catmanjan2010 - We have tested this image with fixed size 256x256 but still we are not getting see more button.
Please refer below image. Are you testing this on public version of Teams? - catmanjan2010Nov 10, 2022Copper Contributor
Nivedipa-MSFT the image file is 256x256 but when its drawn in teams it seems to be auto scaled
- Nivedipa-MSFTNov 10, 2022
Microsoft
catmanjan2010 - Could you please share your custom size images so we can test with these images? - catmanjan2010Nov 08, 2022Copper ContributorYou have Microsoft Teams Version 1.5.00.28567 (64-bit). It was last updated on 01/11/2022.
- Nivedipa-MSFTNov 08, 2022
Microsoft
catmanjan2010 - Could you please share the Teams version on which you are testing this?