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

Remove innerHTML usage from dynamic typeahead #8900

Merged
merged 4 commits into from
May 7, 2024

Conversation

anna-dingler
Copy link
Contributor

@anna-dingler anna-dingler commented Apr 30, 2024

Related Issue

Fixes #8902

Description

Remove innerHTML usage from dynamic typeahead feature. Now we construct the bold text with individual spans + styling.

Sample Card

{
	"type": "AdaptiveCard",
	"version": "1.6",
	"body": [
		{
			"type": "Input.ChoiceSet",
			"id": "dynamicChoiceSet",
			"label": "Enter the name of your team",
			"placeholder": "AdaptiveCards",
			"isRequired": true,
			"errorMessage": "You must select a valid team",
			"choices": [
				{
					"title": "Office",
					"value": "1"
				},
				{
					"title": "Teams",
					"value": "2"
				},
				{
					"title": "Outlook",
					"value": "3"
				}
			],
			"choices.data": {
				"type": "Data.Query",
				"dataset": "teamScopeInOrg",
				"count": 15,
				"skip": 0
			}
		}
	]
}

How Verified

Verified manually on the AC site.

Example HTML:
image

Behavior remains the same: https://github.com/microsoft/AdaptiveCards/assets/98650930/23c9ecff-5507-4146-a064-db98b3932e62

@anna-dingler anna-dingler marked this pull request as ready for review May 1, 2024 16:16
@anna-dingler anna-dingler enabled auto-merge (squash) May 6, 2024 21:25
@anna-dingler anna-dingler merged commit e946c14 into main May 7, 2024
7 checks passed
@anna-dingler anna-dingler deleted the users/annadingler/trusted-types-refresh branch May 7, 2024 18:38
jwoo-msft pushed a commit that referenced this pull request May 23, 2024
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

Successfully merging this pull request may close these issues.

Remove innerHTML usage from adaptivecards
3 participants