MicrosoftDocs / msteams-docs

Source for the Microsoft Teams developer platform documentation.
https://aka.ms/teamsdev
Creative Commons Attribution 4.0 International
277 stars 500 forks source link

[Rendering] Multiple TextBlock spacing issue when first block contains mention #8084

Closed Wajeed-msft closed 9 months ago

Wajeed-msft commented 1 year ago

Copied bug from: https://github.com/microsoft/AdaptiveCards/issues/8278

Details from original post:

Target Platforms

Other

SDK Version

1.5

Application Name

Microsoft Teams

Problem Description

The 'none' spacing option appears to not be taking effect when used on a TextBlock element immediately proceeding another TextBlock element containing a mention in MS Teams for Mac. This is from an adaptive card sent by a teams bot to a channel only. Adaptive cards sent by the bot in chat are unaffected.

Screenshots

Example 1: Teams channel adaptive card

Screen Shot 2023-02-03 at 10 13 52 am

Example 2: Teams chat adaptive card

Screen Shot 2023-02-03 at 10 14 29 am

Example 3: Teams channel adaptive card no mention

Screen Shot 2023-02-03 at 10 15 42 am

Card JSON

JSON for examples 1 and 2:

{
  "contentType": "application/vnd.microsoft.card.adaptive",
  "content": {
    "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
    "type": "AdaptiveCard",
    "version": "1.5",
    "msteams": {
      "entities": [
        {
          "type": "mention",
          "text": "<at>Steve Bell</at>",
          "mentioned": {
            "id": "<snipped>",
            "name": "Steve Bell"
          }
        }
      ],
      "width": "full"
    },
    "body": [
      {
        "type": "TextBlock",
        "text": "<at>Steve Bell</at>",
        "weight": "Bolder",
        "wrap": true
      },
      {
        "type": "TextBlock",
        "isSubtle": true,
        "spacing": "none",
        "text": "Business Owner",
        "wrap": true
      }
    ],
    "actions": []
  }
}

JSON for example 3:

{
  "contentType": "application/vnd.microsoft.card.adaptive",
  "content": {
    "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
    "type": "AdaptiveCard",
    "version": "1.5",
    "msteams": {
      "entities": [

      ],
      "width": "full"
    },
    "body": [
      {
        "type": "TextBlock",
        "text": "Steve Bell",
        "weight": "Bolder",
        "wrap": true
      },
      {
        "type": "TextBlock",
        "isSubtle": true,
        "spacing": "none",
        "text": "Business Owner",
        "wrap": true
      }
    ],
    "actions": []
  }
}

Sample Code Language

No response

Sample Code

No response---

Document Details

Do not edit this section.It is required for docs.microsoft.com ➟ GitHub issue linking.

ghost commented 1 year ago

Hi Wajeed-msft! Thank you for bringing this issue to our attention. We will investigate and if we require further information we will reach out in one business day. Please use this link to escalate if you don't get replies.

Best regards, Teams Platform

Meghana-MSFT commented 1 year ago

We are looking into this, we will get back to you.

Meghana-MSFT commented 1 year ago

We tested this issue in Windows and we are also able to repro this issue. We will check internally and update you.

Meghana-MSFT commented 1 year ago

We have raised a bug for the same we will keep you posted on the updates. Thanks!

Meghana-MSFT commented 9 months ago

This issue is fixed in new Teams T2.1. We have verified the fix and there is no spacing issue in new Teams 2.1. Could you please check.

image

microsoft-github-policy-service[bot] commented 9 months ago

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 3 days. It will be closed if no further activity occurs within 3 days of this comment.

microsoft-github-policy-service[bot] commented 9 months ago

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 3 days. It will be closed if no further activity occurs within 3 days of this comment.

microsoft-github-policy-service[bot] commented 9 months ago

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 3 days. It will be closed if no further activity occurs within 3 days of this comment.