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

[NodeJS Templating] Enable host parameters #7199

Merged
merged 16 commits into from
Apr 13, 2022

Conversation

anna-dingler
Copy link
Contributor

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

Description

Allow card author to supply $host data in addition to $root data.

I added $host variable to IEvaluationContext and TemplateObjectMemory so that binding with ${$host.keyHere} will search through the provided $host JSON.

Sample Card

An example card can be found at: source/nodejs/tests/unit-tests/template-test-resources/complex-template-host.json

How Verified

Added new unit tests to source/nodejs/tests/unit-tests for the templating library.

Microsoft Reviewers: Open in CodeFlow

@ghost
Copy link

ghost commented Apr 7, 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 requested a review from licanhua April 7, 2022 20:57
Copy link
Member

@paulcam206 paulcam206 left a comment

Choose a reason for hiding this comment

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

looks great! just found a few minor things 👍

source/nodejs/tests/unit-tests/src/unit-tests.test.ts Outdated Show resolved Hide resolved
source/nodejs/tests/unit-tests/src/unit-tests.test.ts Outdated Show resolved Hide resolved
@ghost ghost removed the Needs: Author Feedback label Apr 7, 2022
@anna-dingler anna-dingler requested a review from paulcam206 April 8, 2022 17:01
@anna-dingler anna-dingler merged commit ac4285b into microsoft:main Apr 13, 2022
@anna-dingler anna-dingler deleted the enableHostParameters branch April 13, 2022 17:35
anna-dingler added a commit that referenced this pull request May 11, 2022
* Change cursor to pointer when hover on action

* Move cursor change out of hover state

* In progress: update templating

* Fix formatting

* Update templating unit tests

* Formatting

* Refactor templating unit tests

* Formatting

* Add additional templating tests

* Bump templating version

* Revert "Bump templating version"

This reverts commit 7cd2f1f.
michaelfarnsworth pushed a commit to michaelfarnsworth/AdaptiveCards that referenced this pull request Nov 10, 2022
* Change cursor to pointer when hover on action

* Move cursor change out of hover state

* In progress: update templating

* Fix formatting

* Update templating unit tests

* Formatting

* Refactor templating unit tests

* Formatting

* Add additional templating tests

* Bump templating version

* Revert "Bump templating version"

This reverts commit 7cd2f1f.
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