Skip to content

Conversation

@jwoo-msft
Copy link
Member

@jwoo-msft jwoo-msft commented Sep 23, 2021

Related Issue

Fixed #6365.
Long RichTextBlock's text will get cut off unexpectedly when it's inside a column with shorter width.

Description

This change changed the order when the compression resistance is applied. Applying compression resistance after a view is added to UIStackView does not produce the desired effect. The change applies the compression resistance first, then added to the stack iew.

Sample Card

{
    "type": "AdaptiveCard",
    "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
    "version": "1.3",
    "body": [
        {
            "type": "ColumnSet",
            "columns": [
                {
                    "type": "Column",
                    "width": "stretch",
                    "items": [
                        {
                            "type": "RichTextBlock",
                            "inlines": [
                                   {
                                    "type": "TextRun",
                                    "text": "Step 1\n\n",
                                    "size": "large"                                                                      
                                },        
                                {
                                    "type": "TextRun",
                                    "text": "Season the chicken with salt and pepper.  Add the carrot, celery, chicken, noodles and broth to a 6-quart Instant Pot®",
                                    "wrap": true
                                }                                
                            ]
                        }
                    ]
                },
                {
                    "type": "Column",
                    "width": "auto",
                    "items": [
                        {
                            "type": "ActionSet",
                            "actions": [
                                {
                                    "type": "Action.Submit",
                                    "title": "Action.Submit"
                                }
                            ]
                        }
                    ]
                }
            ]
        }
    ]
}

How Verified

Screen Shot 2021-09-16 at 3 41 55 PM

Microsoft Reviewers: Open in CodeFlow
Microsoft Reviewers: Open in CodeFlow

Copy link
Contributor

@almedina-ms almedina-ms left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@paulcam206
Copy link
Member

@jwoo-msft - looks like you have a merge conflict to fix up :)

@jwoo-msft jwoo-msft enabled auto-merge (squash) September 30, 2021 21:32
@jwoo-msft
Copy link
Member Author

@jwoo-msft - looks like you have a merge conflict to fix up :)

@paulcam206, i had to look into positional ambiguity with buttons. it's all fixed up. :-)

@jwoo-msft jwoo-msft merged commit 99373b6 into main Oct 1, 2021
@jwoo-msft jwoo-msft deleted the jwoo/ios-richTextBlock-update branch October 1, 2021 17:22
michaelfarnsworth pushed a commit to michaelfarnsworth/AdaptiveCards that referenced this pull request Nov 10, 2022
* [iOS] Updated RichTextBlock wrap behavior

* [iOS] Refactored ActionSet constraints and removed auxiliary width constraints that caused text to clipped
rankush pushed a commit to rankush/AdaptiveCards that referenced this pull request May 8, 2024
* [iOS] Updated RichTextBlock wrap behavior

* [iOS] Refactored ActionSet constraints and removed auxiliary width constraints that caused text to clipped
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.

[Rendering] ActionSet type button going off screen

4 participants