Botframework-composer: Add a customized runtime(include action and schema) sample

Created on 29 Apr 2020  路  3Comments  路  Source: microsoft/BotFramework-Composer

Describe the bug

Synced with Brenda and Dong, here is our proposal.

We can create a sample(bot template) folder with the customization part of the runtime. Here is the bot looks like:

  /bot.dialog
  /language-generation
  /language-understanding
  /dialogs 
     /custmozedDialogs
  /runtime
     /customizedCode
  /schemas
     customized.schema

With all the customization part in the template, when user create a bot from that template, we will help user copy all the assets above, and user can configure use custom schema, we will help user merge the default bot runtime with the customized code. then we can directly run it. We need to explain all the details in docs.

Here are the actions items:

  • [ ] create a sample for customized action and schema. -Lu
  • [ ] update the plugin to enable the merge of default runtime with customized part. -Wenyi
  • [ ] design the name, description and icon of the new template -Marc?
  • [ ] docs -Yan

@cwhitten and @benbrown, please help to review the above proposal.

Version

Browser

  • [ ] Chrome
  • [ ] Safari
  • [ ] Firefox
  • [ ] Edge

OS

  • [ ] macOS
  • [ ] Windows
  • [ ] Ubuntu

To Reproduce

Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior

Screenshots

Additional context

P1 R9-RC Sample

Most helpful comment

We talked about it tonight--everyone is in agreement that adding a boilerplate custom action to the base runtime template is a good idea. it's much easier and we think a better all-around customer experience.

Great ideas!

All 3 comments

A few thoughts:

  • Bundling code in the templates is not currently well supported. Seems this would require the bot to start out of the box with the ejected runtime.
  • I don't think it is a good idea to introduce some way to magically merge codebases. If this is not going to run the normal "managed" runtime, it should be ejected.
  • If this is important functionality to demonstrate to our developers, why hide it in a sample? Why not make this part of the default runtime template? If the point is showing how to build and expose custom actions, the sample custom action can be something simple, like a console.log type action.

A few thoughts:

  • Bundling code in the templates is not currently well supported. Seems this would require the bot to start out of the box with the ejected runtime.
  • I don't think it is a good idea to introduce some way to magically merge codebases. If this is not going to run the normal "managed" runtime, it should be ejected.
  • If this is important functionality to demonstrate to our developers, why hide it in a sample? Why not make this part of the default runtime template? If the point is showing how to build and expose custom actions, the sample custom action can be something simple, like a console.log type action.

We just discussed this in today's standup, the intended user experience is for user, just choose a "customized schema sample" and it just work. That's the first thing to clarify.

So, in order to make this experience work, what's required would be

  1. update the ejection to be merge instead of "replace"
  2. trigger an auto-ejection after creation. This is one is tricky, because our ejection requiring a choice for a list of runtime available, auto doing that and hard coding a version after creation sounds very weird.

To achieve the similar user experience, one option, i would recommend, probably this is @benbrown referred by "hiding", we can just make it into the CSharp project we shipped, with code + schema, so, user just need an ejection (a button click), and everything is put in the right place. The "sideeffects" of this, is any ejection will bring this for any samples, which is fine to me, i mean, once they eject, one more action is OK.

Another option, is do nothing in code, just doc, which I think it's acceptable for a developer, because worse case is just ejection + 2 file download and move.

We talked about it tonight--everyone is in agreement that adding a boilerplate custom action to the base runtime template is a good idea. it's much easier and we think a better all-around customer experience.

Great ideas!

Was this page helpful?
0 / 5 - 0 ratings