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

Unnecessary console.log on Image Card Element if "altText" is not provided. #128

Open
luislovera87 opened this issue Apr 9, 2024 · 0 comments

Comments

@luislovera87
Copy link

Target Application

React Native

Application Operating System

Other

Schema Version

1.4

Problem Description

A console.log on "adaptivecards-reactnative/src/components/elements/image.js" at line 277 to receive "altText" is always shown in the logs.

Expected Outcome

Remove the console.log to prevent unnecessary logs and performance issues.

Actual Outcome

a log on the terminal shown as "undefined" since "altText" is not provided on the payload for an Image component

Card JSON

{
    "id": "my-id",
    "communicationMode": "mobile",
    "body": [
        {
            "$data": "${data}",
            "columns": [
                {
                    "items": [
                        {
                            "size": "auto",
                            "style": "person",
                            "type": "Image",
                            "url": "${data.profilePicture}"
                        }
                    ],
                    "type": "Column",
                    "width": "50px"
                }
            ],
            "separator": "false",
            "type": "ColumnSet"
        }
    ],
    "schema": "http://adaptivecards.io/schemas/adaptive-card.json",
    "type": "AdaptiveCard",
    "version": "1.5",
    "width": "mobile"
}

Repro Steps

  1. Create an adaptive card with a Card Element of type "Image" and url "https://www.github.com".
  2. Do not provide "altText" since it's not a required value as per documentation [here].(https://adaptivecards.io/explorer/Image.html).
  3. See logs in terminal
  4. A "undefined" log is shown for each Card Element that is rendered.
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

1 participant