ironmansoftware / universal-modules

PowerShell Universal modules that provide additional functionality to the platform.
MIT License
16 stars 4 forks source link

Adaptive Card Component #11

Open NiklasSLG opened 1 year ago

NiklasSLG commented 1 year ago

Summary of the new feature / enhancement

Since I failed in implementing the component after a few attempts, I would like to make a request for this. I am concerned about the AdaptiveCard library

https://www.npmjs.com/package/adaptivecards or https://www.npmjs.com/package/adaptivecards

I find it very chamant to generate a nice card from a JSON payload or to do the same via the templates function via variables.

If the request seems nonsensical or not worth the effort just close it.

Greetings Niklas

Viajaz commented 1 year ago

If you want to generate AdaptiveCards for Microsoft Teams, may I recommend PSTeams? https://www.powershellgallery.com/packages/PSTeams

NiklasSLG commented 1 year ago

Sorry for the late feedback, was on vacation :-) I don't want to send cards so much as have them render in the browser. I know the module, but since I like to work with the templating function I have my own little script based on the .net package AdaptiveCards.Templating to be able to build and send cards with a variable data payload. to display these cards in the browser before sending would be great besides I also find AdaptiveCards in general visually nice and the compatibility is very high.

I could imagine an AdaptiveCards component based on react as I said before The following command came to my mind: New-UDAdaptiveCard -Card (Full Card as JSON) New-UDAdaptiveCard -Template (Card Template as JSON) -Data (Datapayload as JSON)

adamdriscoll commented 7 months ago

I've added a placeholder for this. It still requires implementation. Unfortunately, MSFT doesn't have a supported react component so it requires more work than a traditional component.

https://github.com/ironmansoftware/universal-modules/tree/main/Components/AdaptiveCards