botframework-sdk icon indicating copy to clipboard operation
botframework-sdk copied to clipboard

[Skype for Business] Markdown and Line Break formatting inconsistencies (macOS vs Windows)

Open amehta3000 opened this issue 8 years ago • 11 comments

SDK Platform: python SDK Version: BotBuilder 3.11.0 Active Channels: Skype for Business Deployment Environment: ngrok

Issue Description

SFB Markdown for Mac client/ iOS vs PC/Android is inconsistent. We have taken Bot Framework's recommendation to remove html and use only Markdown.

• We have accepted that Markdown bold does not render in either PC nor Mac and have not seen a way to do it without using html (which will completely block output on Mac clients) • Bold on PC renders it as italics • Italics on PC renders as italics • Both of the above are ignored on Mac/iOS clients and just give me text no formatting.

Regardless of Markdown formatting, the most important thing we can do with mostly text based formatting, are LINE BREAKS.

Please advise on how to properly render LINE BREAKS across all channels? We have been instructed to use \n\n but this does not work on SFB standalone clients for PC, MAC, iOS, Android

• On Mac, does not even compute (see screenshot) • On PC, does not compute (see screenshot)

We've tried several methods including unicode \u00A0\u00A0\n and ultimately we came to use the following hack: \n\n\u200C<br/> for a single line break.

To make another paragraph separated by a break we have to use this: \n\n\u200C<br/>\n\nu200C<br/>

This is really bothersome, as we have also seen older instances of SFB on PC have even larger breaks perhaps respecting the original \n\n. See attached image

Code Example

RAW text output that gets sent to json when using the recommend \n\n markdown method:

This is normal text followed by two slash n line breaks.

This should come after two line breaks.

This markdown text should be **BOLD** and this should be __ITALICS__







→ **This title is wrapped by double asteriks**





1 - Button 1



2 - Button 2



3 - Button 3



**This is a footer wrapped by two asteriks, should be Markdown bold.**



Expected Behavior

I expect to consistently be able to create new lines at will across all platforms, PC, Mac, Android, iOS, Azure testbed

Actual Results

See screenshot. sfb_markdown_linebreaks

amehta3000 avatar Jan 09 '18 23:01 amehta3000

I am facing the same issue and not able to make my bot live on production. This is making heavy impact on my product. Guys, can you please resolve this?

rohankulkarni21 avatar Jan 10 '18 06:01 rohankulkarni21

@nihalmehdi so you looks like you also went with \n\n\u200C\n\n for the line break, which is still not ideal and I see that you get an extra space indent on mac.

For the color text, basically you are just inserting a string Under construction - how does that results in a colored text?

amehta3000 avatar Jan 16 '18 17:01 amehta3000

two spaces followed by \n again space followed by \n works on all platforms for skype for business

ganesh1190 avatar Jan 18 '18 13:01 ganesh1190

@ganesh1190 Can you please share screenshots and your output? I just ran this through both PC and Mac and you can get a single carriage return but doubling it will not give you complete line breaks. I would expect \n \n \n \n to give me a blank line, but it does not.

sfb_markdown_linebreaksii

amehta3000 avatar Jan 18 '18 18:01 amehta3000

@amehta3000 I could get new line break using above said code. image

ganesh1190 avatar Jan 19 '18 06:01 ganesh1190

Yes, i see that, but can you make it produce a blank line between Hey / Hi?

var msgToSend = new builder.Message().text("Hey \n \n \n \nHi");

You would assume that you can do another carriage return, but this does not render properly. When we have a little more complex hierarchy of text, blanks line would be preferable for legibility.

amehta3000 avatar Jan 19 '18 17:01 amehta3000

as per previous comments replace \n\n\u200C\n\n with => Hey \n\n\u200C \n\nHi second \n\n should have two spaces before it. This will give you a blank line Testes for all platforms image

ganesh1190 avatar Jan 22 '18 07:01 ganesh1190

codesnippet

nihalmehdi avatar Feb 19 '18 07:02 nihalmehdi

@nihalmehdi the text will not work in Mac OS SFB. MS has indicated that bot framework does not really support HTML across platforms and it better to use Markdown.

amehta3000 avatar Feb 19 '18 16:02 amehta3000

Any markdown for bold that works across android,ios and desktop..

nihalmehdi avatar Feb 27 '18 17:02 nihalmehdi

Thank you for opening an issue against the Bot Framework SDK v3. As part of the Bot Framework v4 release, we’ve moved all v3 work to a new repo located at https://github.com/microsoft/botbuilder-v3. We will continue to support and offer maintenance updates to v3 via this new repo.

From now on, https://github.com/microsoft/botbuilder repo will be used as hub, with pointers to all the different SDK languages, tools and samples repos.

As part of this restructuring, we are closing all tickets in this repo.

For defects or feature requests, please create a new issue in the new Bot Framework v3 repo found here: https://github.com/microsoft/botbuilder-v3/issues

For Azure Bot Service Channel specific defects or feature requests (e.g. Facebook, Twilio, Teams, Slack, etc.), please create a new issue in the new Bot Framework Channel repo found here: https://github.com/microsoft/botframework-services/issues

For product behavior, how-to, or general understanding questions, please use Stackoverflow. https://stackoverflow.com/search?q=bot+framework

Thank you.

The Bot Framework Team

JasonSowers avatar Oct 01 '18 23:10 JasonSowers