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

Skype For Business PromptDialog.Choice screwing up the formatting

Open rosskyl opened this issue 8 years ago • 6 comments

Bot Info

  • SDK Platform: .NET
  • SDK Version: 3.15.0
  • Active Channels: Skype For Business
  • Deployment Environment: Azure Bot Service

Issue Description

The formatting for a list is getting messed up when I use the PromptDialog.Choice with Skype For Business. I have a list of strings that I want to have the user choose an option from and I want to display a number in front of them since Skype For Business does not support buttons. I am manually inserting the numbers in front of each choice and using that as the description. The problem is the last line is has a bullet that is smaller than the rest of them using the format of "(1) Option". Also when I use the format of "1. Option" the formatting is completely messed up and all of the numbers change to 1. This only happens on the desktop version of Skype For Business. It shows up just fine on the Android app.

Code Example

List<string> displayLanguages = new List<string>();
for (int i = 0; i < languages.Count(); i++)
        displayLanguages.Add($"({i + 1}) {languages.ElementAt(i).Text}");
PromptDialog.Choice(context, AfterLanguageSelectAsync, languages, "Choose your language: ", "Invalid choice.", 3, PromptStyle.Auto, displayLanguages);

Where languages is an IEnumerable of a custom class that has the ToString overridden.

Expected Behavior

All of the text to be the same size. For the format of "1. Option" to have each choice on the same line and not overwrite the numbers.

Actual Results

This is with the format of "(1) Option" sfb bot formatting parentheses

This is the format of "1. Option" sfb bot formatting numbers

rosskyl avatar Apr 19 '18 20:04 rosskyl

I have created an incident with the Skype for business team. I will update you when I have more information.

JasonSowers avatar Apr 20 '18 19:04 JasonSowers

Is this still an issue, or has it been fixed? We do not have a SS4B tenant to est on so unfortunately I cannot check for myself.

JasonSowers avatar May 08 '18 22:05 JasonSowers

I've since changed the way I display the options, but the last bullet is still a little smaller.

rosskyl avatar May 09 '18 17:05 rosskyl

here is a workaround:

List<string> displayLanguages = new List<string>();
                for (int i = 0; i < languages.Count; i++)
                {
                    if (i == 0)
                    {
                        displayLanguages.Add($"<ol><li> {languages[i]}</li>");
                    }
                    else if (i == languages.Count - 1)
                    {
                        displayLanguages.Add($"<li> {languages[i]}</li></ol>");
                    }
                    else
                    {
                        displayLanguages.Add($"<li> {languages[i]}</li>");
                    }
                }
PromptDialog.Choice(context, AfterLanguageSelectAsync, languages, "Choose your language: ", "Invalid choice.", 3, PromptStyle.AutoText, displayLanguages);

nikosalexakis avatar May 15 '18 20:05 nikosalexakis

Hi, I am also having the same issue. Any update on this. @JasonSowers

sdharshraj avatar Jun 05 '18 09:06 sdharshraj

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 21:10 JasonSowers