microsoft / AdaptiveCards

A new way for developers to exchange card content in a common and consistent way.
https://adaptivecards.io
MIT License
1.75k stars 550 forks source link

[Rendering] : Text is overflowing when textBlock size(fixed) is more than container #7558

Closed rankush closed 1 year ago

rankush commented 2 years ago

Target Platforms

Android, WPF

SDK Version

Latest Master (as of today 22 June, 2022)

Application Name

Webex , Microsoft Designer web Client, Adaptive card Visualizer

Problem Description

Whenever the size(width) of textBlock is fixed and container size is "auto", text is going out of the box The issue in seen in multiple platforms like Android, Windows, Webclient. But same issue is not observed for MAC and iOS.

We are expecting the similar behaviour across the platform. If Mac and iOS adaptive card lib is able to auto fix the width as per the container, why other platforms are not able to do it.

Screenshots

Microsoft designer web client :

image

Windows platform: c28a5c62-ae0d-4c2c-bf8f-d641569ddd3c

Android Platform: Screenshot_20220618-114303

iOS Platform: Webex Cards Feedback  - Webex App Canary

Mac Platform:

image

Card JSON

{
    "type": "AdaptiveCard",
    "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
    "version": "1.2",
    "body": [
                        {
                            "type": "ColumnSet",
                            "columns": [
                              {
                                "type": "Column",
                                "items": [
                                  {
                                    "type": "TextBlock",
                                    "text": "**Wiki Page**"
                                  }
                                ],
                                "bleed": true,
                                "width": "150px"
                              },
                              {
                                "type": "Column",
                                "items": [
                                  {
                                    "type": "TextBlock",
                                    "text": "[https://cisco.sharepoint.com/sites/FDSProductEngineering/SitePages/Zia-Bot-Wiki-Page.aspx](https://cisco.sharepoint.com/sites/FDSProductEngineering/SitePages/Zia-Bot-Wiki-Page.aspx)",
                                    "wrap": true
                                  }
                                ],
                                "width": "360px"
                              }
                            ]
                        },
                        {
                            "type": "ColumnSet",
                            "columns": [
                                {
                                "type": "Column",
                                "items": [
                                    {
                                    "type": "TextBlock",
                                    "text": "**Owner** "
                                    }
                                ],
                                "bleed": true,
                                "width": "150px"
                                },
                                {
                                "type": "Column",
                                "items": [
                                    {
                                    "type": "TextBlock",
                                    "text": "Foundational Data Services: Product Engineering",
                                    "wrap": true
                                    }
                                ],
                                "width": "360px"
                                }
                            ]
                        }, {
                            "type": "ColumnSet",
                            "columns": [
                              {
                                "type": "Column",
                                "items": [
                                  {
                                    "type": "TextBlock",
                                    "text": "**Support**"
                                  }
                                ],
                                "bleed": true,
                                "width": "150px"
                              },
                              {
                                "type": "Column",
                                "items": [
                                  {
                                    "type": "TextBlock",
                                    "text": "[zia-bot-support@cisco.com](mailto:zia-bot-support@cisco.com) or [Webex Support Room](https://eurl.io/#Efrkdnvd1)",
                                    "wrap": true
                                  }
                                ],
                                "width": "360px"
                              }
                            ]
                          }
                    ]

}

Sample Code Language

No response

Sample Code

No response

almedina-ms commented 1 year ago

The renderer is behaving as expected as a specific size is being provided, using other values for column width such as "stretch" or using only a numeric value to denote a proportion may be a better option