-
Notifications
You must be signed in to change notification settings - Fork 374
feat: use uischema to define Flow Actions #3858
Conversation
|
@yeze322 as we discussed last night. I agree that we should allow basic data binding into the uischema, however I don't think we shouldn't promote users to inline HTML like that. Can you come up with a few example expressions that you need to render the widgets currently so we can think on how to model the expressiveness you are looking for? |
This comment has been minimized.
This comment has been minimized.
|
@cwhitten Chris I updated the description with newest example schema |
|
As I tested in both LG/Expression, we have multiple approaches to write a string interpolation A restriction in Expression is that string interpolation needs to be wrapped in ``. @a-b-r-o-w-n Which one would you prefer? I have no strong opinions. We can support both but the default Flow uischema as a sample needs to be in a uniform format. |
|
@yeze322 I think matching the sdk properties as closely as possible would be best. So to me that looks like we should use the LG parser for string interpolation. |
I updated the schema, the Action ‘SetProperty' is an example on how string interpolation be written LG format. One thing to note is writting string interpolation in LG format can simplify the schema in some case but not all the cases. Expression engine is still required regarding sometimes we want to take the raw value instead of getting a string. For example, in BeginDialog, |
|
That sounds reasonable and is the same as when authoring bots, so hopefully the learning curve will be small. I think we should consider adding this functionality to the form properties in the ui schema as well. |
|
@yeze322 sorry for all the conflicts. I removed the extensions directory 😕 |
|
@a-b-r-o-w-n that's fine Andy, it's just some import conflicts |
* draft: uischema flow part * draft: try define flow schema * lint: blank line at EOF * schema: add rest actions * schema: unify the schema of yml files * schema: migrate schema to LG * feat: evaluate LG in widgetRenderer * fix: capture LG eval error * schema: migrate schema to LG; TODO: migrate to Exp * feat: mixed evaluation with LG + Exp * refactor: rename variables * schema: migrate some actions to pure exp * fix: wrong result key in BeginDialog * feat: add 'hideFooter' option to widgets/ActionCard * feat: new widget 'PropertyDescription' * schema: migrate to PropertyDescription * schema: migrate prev change to expression * schema: migrat 3 kinds to PropertyDescription in exp * schema: migrate DeleteActivity * feat: new widget 'ResourceOperation' * schema: migrate to 'ResourceOperation' widget * refactor: adjust schema reorder * fix: more restrict regex for value access * schema: migrate SetProperty to lg * refactor: rename ListOverview prop 'itemInterval' * refactor: optimize ListOverview interface desgin * schema: migrate SetProps, DelProps to Exp engine * refactor: suffix builtin config files with '.ts' * clean: remove yml drafts * remove debug code * schema: expand *Input kinds definitions * refactor: move evaluator to Expression domain * test: UT for widgetExpEvaluator * refactor: write inline color value in flow schema * refactor: hoists Flow widget types to @bfc/extension * schema: move flow schema to extension pkg * feat: merge 'flow' part to uischema * fix: render ActionCard safely * fix: move looping schema as Flow's builtin schema * feat: use pure expression way in Flow schema * fix: handle evaluator corner case * schema: migrate whole schema to expression format * typo: space in schema * fix: respect null undfined value in ActionCard * refactor: more robust safeRender * add a comment * schema: Oauth wording * fix: escape those constant strings begin with '=' * feat: only evaluate Action with specific key * schema: update '= Result' usages * feat: be compatible with string interpolation pattern * manually fix some '@bfc/extension-client' imports * fix ForeachPage prop binding Co-authored-by: Chris Whitten <[email protected]>
Description
closes #2955
Convert Flow Editor's schema to pure JSON format. (builtinSchema.ts)
Tasks
adaptive-expressionsFollowing tasks on other repos
Schema Preview

IfConditionBeginDialogSetPropertiesSetProperty(string interpolation in LG format)Task Item
Screenshots
Use
sdk.override.uischemato demo the scenario.sdk.override.uischema:{ "$schema": "https://schemas.botframework.com/schemas/ui/v1.0/ui.schema", "Microsoft.EditArray": { "flow": { "widget": "ActionCard", "header": { "widget": "ActionHeader", "title": "Overrided Edit Array", "icon": "Edit", "colors": { "theme": "#168686", "color": "white", "icon": "white" } }, "body": "=concat('Change Type: ', action.changeType, '\nItems Property: ', action.itemsProperty)", "footer": "=string(action.value)", "hideFooter": "=!action.resultProperty" } } }