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

[Designer] CodeBlock element not recognized for Teams #9105

Open
anuthebananu opened this issue Feb 1, 2025 · 1 comment
Open

[Designer] CodeBlock element not recognized for Teams #9105

anuthebananu opened this issue Feb 1, 2025 · 1 comment

Comments

@anuthebananu
Copy link

The Adaptive Card Designer does not seem to recognize CodeBlock elements.

You can replicate by copying the example from MS Teams Adaptive Card docs into the Designer.

Error from Designer:

Image

Code snippet:

{
  "$schema": "https://adaptivecards.io/schemas/adaptive-card.json",
  "type": "AdaptiveCard",
  "version": "1.5",
  "body": [
    {
      "type": "TextBlock",
      "text": "editor.js",
      "style": "heading"
    },
    {
      "type": "TextBlock",
      "text": "Lines 61 - 76"
    },
    {
      "type": "CodeBlock",
      "codeSnippet": "/**\n* @author John Smith <john.smith@example.com>\n*/\npackage l2f.gameserver.model;\n\npublic abstract strictfp class L2Char extends L2Object {\n  public static final Short ERROR = 0x0001;\n\n  public void moveTo(int x, int y, int z) {\n    _ai = null;\n    log(\"Shouldn't be called\");\n    if (1 > 5) { // what!?\n      return;\n    }\n  }\n}",
      "language": "java",
      "startLineNumber": 61
    }
  ],
  "actions": [
    {
      "type": "Action.OpenUrl",
      "title": "View in Azure Repos",
      "url": "https://azure.microsoft.com/en-us/products/devops/repos/"
    },
    {
      "type": "Action.OpenUrl",
      "title": "Edit in vscode.dev",
      "url": "https://vscode.dev/"
    }
  ]
}
@Prasad-MSFT
Copy link

@anuthebananu, Thanks for raising your issue. We are able to repro this and have raised a bug for the same.
We will inform you once we get any further update from engineering team. Thanks!

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

No branches or pull requests

2 participants