microsoft / BotFramework-Composer

Dialog creation and management for Microsoft Bot Framework Applications
https://docs.microsoft.com/en-us/composer/
MIT License
870 stars 371 forks source link

Imported package's sub-dialogs do not render in UI, but work in the bot #6350

Closed ryanisgrig closed 3 years ago

ryanisgrig commented 3 years ago

Describe the bug

A component with multiple dialogs is not rendering all of them in Composer when installing. HelpAndCancel package version v1.0.0-preview.20210309.c0ed425 has exported assets at https://github.com/microsoft/botframework-components/tree/ryanlengel/helpandcancel_bugbash/packages/HelpAndCancel/exported that are installed in the Conversational Core template or independently through Package Manager.

This version of the package contains 3 dialogs:

  1. Root with LU triggers
  2. Cancel with BeginDialog trigger of cancel dialog
  3. Help with BeginDialog trigger of help dialog image

After installing the package only the root dialog appears in the Composer UI, but when starting bot and testing the conversations the other dialogs work as expected. This may be a bug with the contents of my package but could also be something with how Composer is ingesting/rendering the imported dialogs.

Imported root dialog is the only one that shows up image

Responses from the package are successful image

Version

Commit 823d4e08

Browser

OS

To Reproduce

  1. Use latest with Component Model feature enabled
  2. Create an EmptyBot project
  3. Go to Package Manager, install Microsoft.Bot.Components.HelpAndCancel v1.0.0-preview.20210309.c0ed425
  4. Manually copy the triggers/dialogs provided in the HelpAndCancel dialog into the root dialog.
  5. Run the both and test Help/Cancel triggers.

Expected behavior

All dialogs imported should show up.

cwhitten commented 3 years ago

@ryanlengel when you click on the "Help" element in the Begin Dialog node under the Help trigger, what happens?

ryanisgrig commented 3 years ago

@cwhitten it refreshes and goes back to the emptyBot root dialog. Attached gif composer_issue_6350

srinaath commented 3 years ago

@ryanlengel What happens if you go back to the Home screen and open it again (reloading it)? In addition, could you attach the bot assets to this ticket for us to get a repro.

benbrown commented 3 years ago

I believe this is happening because the child dialogs are themselves inside another dialogs/ subfolder inside the component.

Those should all be moved up into the root exported/ folder @ryanlengel

benbrown commented 3 years ago

Currently, Composer limits the paths folders and depth of searching when indexing the project.

ryanisgrig commented 3 years ago

Got it that makes sense, @gabog is going to take a look at this package and can let us know. If Composer intends to limit the searching depth, we may benefit from an "Export as package" option that flattens an exported bot and cleans up to only necessary files?

ryanisgrig commented 3 years ago

If you go back and reload from the home screen, the behavior is the same. Here's the bot attached (haven't made Ben's suggestion on it) issue_6350.zip

benbrown commented 3 years ago

I believe we have resolved this. @ryanlengel is that correct?

ryanisgrig commented 3 years ago

Yes this is resolved - closing.