Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[iOS] Fixed zero padding issue around the card #5516

Merged
merged 1 commit into from
Mar 4, 2021
Merged

Conversation

jwoo-msft
Copy link
Member

@jwoo-msft jwoo-msft commented Mar 4, 2021

Related Issue

Fixed #5501

Description

Not applying padding at zero causes the ACRView to assume default layout configuration, this isn't wrong, but it is an inconsistent behavior compared to when padding > 0. This fix applies padding even if it's zero.

Sample Card

Payload

{
    "type": "AdaptiveCard",
    "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
    "version": "1.3",
    "body": [
        {
            "type": "Container",
            "style": "accent",
            "items": [
                {
                    "type": "ColumnSet",
                    "height": "stretch",
                    "columns": [
                        {
                            "type": "Column",
                            "items": [
                                {
                                    "type": "TextBlock",
                                    "text": "Some text!",
                                    "size": "extraLarge",
                                    "weight": "bolder",
                                    "horizontalAlignment": "center"
                                }
                            ]
                        }
                    ]
                }
            ]
        }
    ]
}

Hostconfig

{
    "spacing" : {
        "padding" : 0
    }
}

How Verified

Before Fix
Not Fixed

After Fix
Fixed

Microsoft Reviewers: Open in CodeFlow

Copy link
Member

@paulcam206 paulcam206 left a comment

Choose a reason for hiding this comment

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

:shipit:

@jwoo-msft jwoo-msft merged commit babad17 into main Mar 4, 2021
@jwoo-msft jwoo-msft deleted the jwoo/ios-padding branch March 4, 2021 21:56
rankush pushed a commit to rankush/AdaptiveCards that referenced this pull request May 8, 2024
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.

[iOS][Rendering] Layout issues when padding is 0
2 participants