question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Proposal: Right-to-left support

See original GitHub issue

Solves requests

  • Outlook

Summary

Add a rtl Boolean property to AdaptiveCard. When set to true, the card renders in right-to-left.

Design

Adaptive renderers will look for the rtl property at the AdaptiveCard level and adjust rendering accordingly.

{
    "$schema": "https://adaptivecards.io/schemas/adaptive-card.json",
    "type": "AdaptiveCard",
    "version": "1.0",
    "rtl" : true | false, 
    "body": […..]
}

If a card is specified to render in RTL direction, here are some of the things that will change :

Column Layout

By default, the columns in a ColumnSet are rendered left-to-right in horizontal direction. This will change to right-to-left in case of RTL.

LTR with Columns and separators: image

RTL with Columns and separators: image

Text Alignment

  • Text that would be left aligned in LTR is right aligned in RTL
  • Text that would be right aligned in LTR is left aligned in RTL
  • Text that would be centered in LTR remains centered in RTL

Example

LTR: image

RTL: image

Padding and margins

Left and right paddings/margins in LTR become right and left in RTL.

Inputs

  • Text in inputs, which is left aligned in LTR, becomes right aligned in RTL. That includes both the input value and placeholder.
  • Controls within an input (namely radio buttons, check boxes, the dropdown button on a combo box or the calendar button on a date picker) become right aligned in RTL

Example

LTR. image

RTL: image

Text directionality

Text specified in LTR languages should translate to follow RTL directionality.

An example would be : ‘Hello World!’ should translate to "!Hello World’ in RTL.

More details here - https://dotancohen.com/howto/rtl_right_to_left.html

Down-level impact

None.

Host burden

Very low. Just update to the new Adaptive renderer which does all the work.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
matthidingercommented, Jan 31, 2020

JavaScript workaround: while waiting on this feature to be broadly available, it is possible to solve this today using the JavaScript SDK:

AdaptiveCards.AdaptiveCard.onParseElement = (element: AdaptiveCards.CardElement, json: any) => {
    if (element instanceof AdaptiveCards.Container && typeof json["rtl"] === "boolean") {
        element.rtl = json["rtl"];
    }
}
0reactions
msftbot[bot]commented, Mar 17, 2021

Hi @dclaux! We’ve resolved this issue as a duplicate of the referenced issue per comments above. This issue will now be closed. Please feel free to track status with the isssue we’ve duplicated yours to. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to create a proposal with RTL Support - Hebrew
1. Go to your Settings page and change the language to Hebrew: · 2. Go to the Dashboard and click on the (New...
Read more >
Proposals/Better RTL Support
Mahara could improve its support for right-to-left languages. Here's how. Contents. 1 Coding for multi-language compatibility.
Read more >
Ohio Republicans split on marijuana legalization and could ...
Some lawmakers are proposing to overturn legalized recreational weed if voters pass it in ... Mike DeWine, left, and Republican state Rep.
Read more >
Governor Newsom Proposes 28th Amendment to the U.S. ...
SACRAMENTO – Today Governor Gavin Newsom proposed a 28th Amendment to the United States Constitution to enshrine fundamental, broadly supported ...
Read more >
What Knee Do You Propose On, and Why?
According to Keith Willard, a wedding officiant and wedding planner, most people get down on the left knee because they are right-handed.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found