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

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

Open sharmadine opened this issue 9 years ago • 13 comments

Pre-flight checklist

done

System Information (Required)

  • SDK Platform: Node.js
  • SDK Version: 3.8.3
  • Development Environment: localhost | Azure Bot Service | Azure App Service | other localhost and azure aoo service

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.

sharmadine avatar Jun 02 '17 19:06 sharmadine

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

nwhitmont avatar Jun 02 '17 19:06 nwhitmont

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

sharmadine avatar Jun 03 '17 02:06 sharmadine

@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.

nwhitmont avatar Jun 08 '17 22:06 nwhitmont

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.

sharmadine avatar Jun 12 '17 10:06 sharmadine

@sharmadine use [email protected] if you need this re-prompt behavior.

nwhitmont avatar Jun 13 '17 16:06 nwhitmont

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…

radennis avatar Jun 13 '17 17:06 radennis

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

stevengum avatar Jun 13 '17 17:06 stevengum

@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.

stevengum avatar Jun 14 '17 00:06 stevengum

Thank you for looking into it!

radennis avatar Jun 14 '17 06:06 radennis

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;
 }
}

garyfungwelab avatar Jun 14 '17 08:06 garyfungwelab

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

sharmadine avatar Jul 18 '17 05:07 sharmadine

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

laidbackindustries avatar Aug 09 '17 07:08 laidbackindustries

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

nwhitmont avatar Aug 10 '17 01:08 nwhitmont