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

Add RTL Card Level support to UWP Renderer #6661

Merged
merged 6 commits into from
Oct 29, 2021
Merged

Conversation

beervoley
Copy link
Contributor

@beervoley beervoley commented Oct 27, 2021

Related Issue

This PR fixes #6506.

Description

Although the documentation states that RTL property is supported on card level, in UWP scenario it was not the case. RTL property was not utilized and I think it was simply overlooked when UWP renderer was introduced.

I've added RTL property to AdaptiveCard class and properly used it to assign FlowDirection to the Root FrameworkElement

Sample Card

image

{
  "type": "AdaptiveCard",
  "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
  "version": "1.5",
  "rtl": true,
  "body": [
    {
      "type": "TextBlock",
      "text": "هذه كتلة نص",
      "wrap": true
    },
    {
      "type": "TextBlock",
      "text": "זהו בלוק טקסט",
      "wrap": true
    },
    {
      "type": "TextBlock",
      "text": "This is a text block",
      "wrap": true
    },
    {
      "type": "ColumnSet",
      "horizontalAlignment": "Center",
      "columns": [
        {
          "type": "Column",
          "rtl": false,
          "items": [
            {
              "type": "TextBlock",
              "text": "هذه كتلة نص",
              "wrap": true
            }
          ]
        }
      ]
    }
  ]
}

How Verified

Manually.

Microsoft Reviewers: Open in CodeFlow

@beervoley
Copy link
Contributor Author

beervoley commented Oct 27, 2021

@paulcam206 should I add a unit test for this scenario?

@paulcam206
Copy link
Member

@paulcam206 should I add a unit test for this scenario?

yes please :)

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.

code looks good -- just need unit tests 👍

@beervoley
Copy link
Contributor Author

code looks good -- just need unit tests 👍

added some tests :)

@beervoley beervoley added the Platform-XAML Bugs or features related to Xaml Renderer label Oct 28, 2021
@beervoley beervoley self-assigned this Oct 28, 2021
@beervoley beervoley added this to In progress in Current Sprint via automation Oct 28, 2021
@microsoft microsoft deleted a comment from azure-pipelines bot Oct 29, 2021
@beervoley
Copy link
Contributor Author

/azp run AdaptiveCards-iOS-CI

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@beervoley
Copy link
Contributor Author

/azp run android-ci.yml

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@beervoley
Copy link
Contributor Author

/azp run android-ci.yml

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Current Sprint automation moved this from In progress to Reviewer approved Oct 29, 2021
@paulcam206
Copy link
Member

/azp run AdaptiveCards-iOS-CI

protip: you can also retrigger a build from the Checks tab

image

@beervoley beervoley merged commit fcf1537 into main Oct 29, 2021
Current Sprint automation moved this from Reviewer approved to Done Oct 29, 2021
@beervoley beervoley deleted the user/vsiliush/issue-6506 branch October 29, 2021 17:57
beervoley added a commit that referenced this pull request Nov 19, 2021
michaelfarnsworth pushed a commit to michaelfarnsworth/AdaptiveCards that referenced this pull request Nov 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Platform-XAML Bugs or features related to Xaml Renderer
Projects
Development

Successfully merging this pull request may close these issues.

[UWP] Uwp doesn't support card level RTL support
3 participants