AdaptiveCards icon indicating copy to clipboard operation
AdaptiveCards copied to clipboard

[Rendering] Misleading background color of Adaptive Card in different Microsoft Teams applications

Open MajaEffenberg opened this issue 1 year ago • 8 comments

Target Platforms

Other

SDK Version

1.5

Application Name

Microsoft Teams

Problem Description

The same Adaptive Card have different background and border in different application:

  • Microsoft Teams for Windows desktop
    • no border
    • light gray background
  • Microsoft Teams Web app
    • dark border
    • light gray background
  • Microsoft Teams Android app
    • dark border
    • white background

This inconsistency is confusing in terms of how the Adaptive Card is displayed.

Additional, light gray background color of Adaptive Card makes the Styling of the elements look terrible. Default Style "Good", "Attention" and "Emphasis" are not enough visible, as difference between gray and this style color is not big enough.

Screenshots

Microsoft Teams for Windows desktop (version 24102.2223.2870.9480): image-20240516-080959

Microsoft Teams Web app: image-20240516-081115

Microsoft Teams Android app (version: 1416/1.0.0.2024083602/0507): 1 photo added

Card JSON

{
  "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
  "type": "AdaptiveCard",
  "version": "1.5",
  "body": [
    {
      "type": "ColumnSet",
      "columns": [
        {
          "type": "Column",
          "width": "stretch",
          "items": [
            {
              "type": "TextBlock",
              "text": "Text",
              "wrap": true,
              "fontType": "Default",
              "size": "Small"
            }
          ]
        },
        {
          "type": "Column",
          "width": "auto",
          "items": [
            {
              "type": "TextBlock",
              "text": "Text",
              "fontType": "Default",
              "size": "Small",
              "horizontalAlignment": "Right"
            }
          ]
        }
      ]
    },
    {
      "type": "TextBlock",
      "text": "Text",
      "height": "stretch",
      "wrap": true
    },
    {
      "type": "ColumnSet",
      "columns": [
        {
          "type": "Column",
          "width": "stretch",
          "style": "good",
          "items": [
            {
              "type": "TextBlock",
              "text": "False",
              "wrap": true,
              "horizontalAlignment": "Center",
              "height": "stretch",
              "fontType": "Default",
              "color": "default"
            }
          ]
        },
        {
          "type": "Column",
          "width": "stretch",
          "style": "emphasis",
          "items": [
            {
              "type": "TextBlock",
              "text": "true",
              "wrap": true,
              "horizontalAlignment": "Center",
              "fontType": "Default",
              "height": "stretch",
              "color": "default"
            }
          ]
        }
      ]
    }
  ]
}

Sample Code Language

No response

Sample Code

No response

MajaEffenberg avatar May 16 '24 09:05 MajaEffenberg

Any news on this issue?

MajaEffenberg avatar May 27 '24 08:05 MajaEffenberg

We are having a hard time to design our app if the UI is that inconsistent. Are there any plans to make it look the same on all platforms or is there any documentation on all the different options so that we know what we have to expect?

sschoeb avatar Jun 03 '24 08:06 sschoeb

Any news on this?

MajaEffenberg avatar Jul 01 '24 13:07 MajaEffenberg

I've also been finding this annoying, best workaround so far is to use a base64 encoded image of a 1x1 pixel image of whatever color background you want, apply that as the image URL, and set the ImageFillMode to repeat: https://adaptivecards.io/explorer/BackgroundImage.html

You can generate the code for the background with this: https://hradek.de/html/AdaptiveCardColorGIF.html

Andrew-J-Larson avatar Jul 10 '24 22:07 Andrew-J-Larson

Any news on this one? Is it expected to unify the platforms again?

Additionally the given colors are super bad in terms of accessibility. The light red/green does not work at all and will definitely violate against the European accessibility act: https://commission.europa.eu/strategy-and-policy/policies/justice-and-fundamental-rights/disability/union-equality-strategy-rights-persons-disabilities-2021-2030/european-accessibility-act_en

Are there any plans to support colors that are compatible with european law?

sschoeb avatar Feb 10 '25 16:02 sschoeb

46470704858083Duplicate of #

Ashrafn672 avatar Feb 11 '25 08:02 Ashrafn672

https://api-fd6aff87.duosecurity.com/frame/v4/auth/session_expired> 46470704858083Duplicate of #

Ashrafn672 avatar Feb 11 '25 08:02 Ashrafn672

Any updates on this issue and the support for colors?

MajaEffenberg avatar Mar 07 '25 09:03 MajaEffenberg