You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am one of the creators of Adaptive Cards at Microsoft and I love this component and project, great job!
My only nit is that the parameter name "Schema" is not a good name. A Schema is a description of the SHAPE of a json payload, not the json payload itself.
A much better name would be Card, or to match other blazor components Content
<AdaptiveCardCard="@card"></AdaptiveCard>
Even better would be to have the card be the content of the tag, like this:
<AdaptiveCard>
@childContent
</AdaptiveCard>
This would allow templating to be injected into the definition of the json.
The text was updated successfully, but these errors were encountered:
Hi @tomlm and thanks for the comment and for the suggestions!
The child content implementation was something that was planned at some point but I'm not quite sure why I ended up using the "Schema"-property during the implementation. But as you mention, defining the card's content through child content would make sense.
I think the following two changes could be implemented based on your feedback:
AdaptiveCard.Schema -property is marked as obsolete.
Card content can be set using the Blazor's ChildContent support.
Regarding the other two components included in the library, meaning AdaptiveCards and TemplatedAdaptiveCard, using the "Schema" as the property name makes somewhat sense, because the idea is that you have the card's schema (or should it be template?) and the model which together form the actual card content. What to do you think?
What is actually completely missing from the AdaptiveCards-component is the ability to directly show a collection of cards without having to define the models and the schema. Given a scenario (which I just last week bumped into at work) where a backend returns multiple cards and we want to render them. It's not possible to do that easily using AdaptiveCards-component, because it always requires a single schema which is used to render all the models.
I am one of the creators of Adaptive Cards at Microsoft and I love this component and project, great job!
My only nit is that the parameter name "Schema" is not a good name. A Schema is a description of the SHAPE of a json payload, not the json payload itself.
A much better name would be Card, or to match other blazor components Content
Even better would be to have the card be the content of the tag, like this:
This would allow templating to be injected into the definition of the json.
The text was updated successfully, but these errors were encountered: