8000 ChoicePrompt properly uses ListStyle that's specified by Zerryth · Pull Request #260 · microsoft/botbuilder-python · GitHub
[go: up one dir, main page]

Skip to content

ChoicePrompt properly uses ListStyle that's specified #260

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Jul 17, 2019

Conversation

Zerryth
Copy link
Contributor
@Zerryth Zerryth commented Jul 16, 2019

Fixes #239 , #240

Changes

  • ChoicePrompt._default_choice_options now specifies inline_or_more for the ChoiceFactoryOptions in the appropriate culture

  • Prompt was previously trying to use Dict.get() method, but with the enum class as the key instead of the value that the enum equated to, making all styles go to "default" ListStyle previously, when key was not found (in this case in_line styling)

    • now properly uses enum value as key
  • rearranged switcher variable to properly map in the same order as the values in ListStyle enum class, to apply correct styling

  • ListStyle.none also now returns as an ActivityType.message, whereas before it was None

  • updated unit tests to not only check for in_line styling

@Zerryth Zerryth requested a review from axelsrz July 16, 2019 20:54
@axelsrz axelsrz merged commit 88fa0aa into master Jul 17, 2019
@axelsrz axelsrz deleted the Zerryth/ChoicesListStyle branch July 17, 2019 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ChoiceFactory forces usage of hardcoded ChoiceFactoryOptions; can therefore only use en-us locale
2 participants
0