microsoft / microsoft/AdaptiveCards

[Designer] Setting attributes to (not set) does not actually remove the property

Open
#9,143 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area-Designer Bug
Dominant language
C#
Stars
2k
Forks
595
Avg merge
1d 19h
Merged PRs (30d)
1

Description

Problem Description

When using the designer to set an attribute, for example fontType to “Monospace”, the corresponding JSON property is added:

Image

However, when later changing the attribute back to “(not set)”, I expect the JSON property to be removed. However, it is kept as-is.

Card JSON
{
    "type": "AdaptiveCard",
    "body": [
        {
            "type": "TextBlock",
            "text": "${title}",
            "fontType": "Monospace"
        }
    ],
    "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
    "version": "1.6"
}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue in the Designer by setting a TextBlock's fontType to Monospace and then back to “(not set)”. Trace how the Designer updates and serializes the Card JSON, then verify that resetting the attribute removes the fontType property and that the behavior is covered by an appropriate regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.