poshbotio / PoshBot

Powershell-based bot framework
MIT License
538 stars 108 forks source link

Poshbot - Teams Implementation output wraps at around 52 chars when using New-PoshbotCardResponse -text #243

Closed Dods80 closed 2 years ago

Dods80 commented 2 years ago

New-PoshbotCardResponse -text is wrapping in the output window at around 52 characters length

Expected Behavior

It should pad to the length set by the -width parameter when formatted via Out-String.

Current Behavior

It is ignoring the width to format the output and wrapping at around 52 chars length.

Possible Solution

If I run the builtin !help command this doesn't seem to be effected by the wrapping error.

Steps to Reproduce (for bugs)

1. 2. 3. 4.

Context

Your Environment

Dods80 commented 2 years ago

If I use the New-PoshBotTextResponse as a test with the same text it displays correctly but comes at the expense of losing Titles,Icons,links etc in the output. (maybe !help is using this function).

Dods80 commented 2 years ago

It turns out that office365connector cards no longer support wide formatted output whilst being displayed in MSTeams. This is not a problem with Poshbot. I am currently working on a solution that will use adaptive cards instead.

robinmalik commented 2 years ago

@Dods80 Did you get anywhere with a solution? The width of the current cards renders most things we want to query for as partially unreadable.

I've written custom PS code to create adaptive cards for other purposes, but not for PoshBot. Just wondered if you'd done anything before I attempt to modify the code (although give it all looks to be written using PS classes, I'm not sure how much luck I'll have).