microsoft / botframework-sdk

Bot Framework provides the most comprehensive experience for building conversation applications.
MIT License
7.5k stars 2.44k forks source link

[Feature Request] Prompts.choice # retry prompt - shows retry message but does not prompt choices again #2880

Closed sharmadine closed 7 years ago

sharmadine commented 7 years ago

Pre-flight checklist

done

System Information (Required)

Issue Description

Describe the issue here.

Choice prompt - If I type a value not in the the choice option list, the Prompt dialog only shows the Retry Message. It does not prompt the values again for selection. This is breaking our Facebook Bot. Downgrading the version to 3.7.0 make things works again. Snapshots below:

builder.Prompts.choice(session, "Choose", "m1|m2", {
            retryPrompt: "invalid choice, please pick you choice",
            listStyle: builder.ListStyle.button,
            maxRetries: 2
});

Snapshot attached.

image

Example Code

The complete bot code that reproduces the issue.

Steps to Reproduce

  1. Code sample above
  2. image snapshot uploaded

Expected Behavior

What you expected to happen.

RETRY on a Choice Prompt dialog should show the retry message along with options for selection.

Actual Result

What actually happened. Please give examples and support it with screenshots, copied output or error messages.

Explained above with snapshot.

nwhitmont commented 7 years ago

@sharmadine thanks for reporting. we will log this as a feature request.

sharmadine commented 7 years ago

@nwhitmont thanks. But it seems to be an issue and not feature enhancement because it works below version 3.7.0 of botbuilder.

nwhitmont commented 7 years ago

@sharmadine the prompts system was re-written for the v3.8.0 release of botbuilder. The current functionality, eg. showing the retry message without the options, is the expected behavior.

sharmadine commented 7 years ago

oh, this has broken the FB experience completely because FB does not retain the choice buttons as the case with Skype, which leaves user with no options to choose from :-( How can it be overridden to attain pre v3.8.0 behavior?

Wouldn't it be a good idea to provide 'configurability' to have pre v3.8.0 or post v3.8.0 behavior to achieve backward compatibility? Please help and support else we will have big impact on our golive due to this change.

nwhitmont commented 7 years ago

@sharmadine use botbuilder@3.7.0 if you need this re-prompt behavior.

radennis commented 7 years ago

We also prefer the old behavior. Is there some uservoice where we can vote for it? Seems several people have been requesting for it.

We cannot downgrade to 3.7.0 since we need 3.8.0 new features and bug fixes…

stevengum commented 7 years ago

Hi @radennis and @sharmadine, we're currently looking into this and will update with new pertinent info as it arises.

stevengum commented 7 years ago

@sharmadine @radennis, a fix for the issue, PR #2936, has been created and is pending approval for a merge.

Thank you for your patience and understanding.

radennis commented 7 years ago

Thank you for looking into it!

garyfungwelab commented 7 years ago

I am doing like this:

builder.Prompts.choice(session, "Choose", "m1|m2", {
            maxRetries: 0
});

and handle it manually:

(session, results, next) => {
 if (!results.response) {
  // start over here
 return;
 }
}
sharmadine commented 7 years ago

@stevengum97 would you know the timeframe of having the botbuilder version with the dialog fix?

maba4891 commented 7 years ago

@sharmadine upgrading to the recent version 3.9.0 fixed it for me

nwhitmont commented 7 years ago

This issue is closed. If you have a question or problem, please open a new issue at: https://github.com/microsoft/botbuilder/issues/new 👍