Skip to content

[NodeJS Templating] Expose adaptivecards-templating version#7209

Merged
anna-dingler merged 12 commits intomicrosoft:mainfrom
anna-dingler:exposeTemplatingVersion
Apr 20, 2022
Merged

[NodeJS Templating] Expose adaptivecards-templating version#7209
anna-dingler merged 12 commits intomicrosoft:mainfrom
anna-dingler:exposeTemplatingVersion

Conversation

@anna-dingler
Copy link
Contributor

@anna-dingler anna-dingler commented Apr 11, 2022

Description

Expose the adaptivecards-templating library version by adding a variable $_acTemplateVersion to IEvaluationContext and TemplateObjectMemory. $_acTemplateVersion holds a JSON with versioning info.

Sample Card

{
    "type": "AdaptiveCard",
    "version": "1.0",
    "body": [
        {
            "$when": "${$_acTemplateVersion.major < 2}",
            "type": "TextBlock",
            "text": "Uhoh! Time to update your copy of `adaptivecards-templating`!"
        },
        {
            "$when": "${$_acTemplateVersion.major >= 2}",
            "type": "TextBlock",
            "text": "`adaptivecards-templating` is up to date!"
        }
    ]
}

How Verified

Tested manually on AdaptiveCards designer

Microsoft Reviewers: Open in CodeFlow

@ghost
Copy link

ghost commented Apr 11, 2022

Hi @anna-dingler. Thanks for helping make the AdaptiveCards JS renderer + tooling better. As additional verification, once the JS build succeeds, please go to the test site to test out your website/designer changes.

@anna-dingler anna-dingler marked this pull request as ready for review April 11, 2022 23:33
Copy link
Contributor

@licanhua licanhua left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You may update the document late. I don't know how to track it before we release this change

@ghost ghost removed the Needs: Author Feedback label Apr 19, 2022
@anna-dingler anna-dingler requested a review from jwoo-msft April 20, 2022 03:54
Copy link
Contributor

@beervoley beervoley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@anna-dingler anna-dingler merged commit ed201ab into microsoft:main Apr 20, 2022
@anna-dingler anna-dingler deleted the exposeTemplatingVersion branch April 20, 2022 21:19
michaelfarnsworth pushed a commit to michaelfarnsworth/AdaptiveCards that referenced this pull request Nov 10, 2022
…t#7209)

* In progress: expose templating version

* Expose templating version update

* resolve PR comments

* add template version unit test

* Add unit tests and resolve comments
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.

4 participants

Comments