Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove $kind restriction on Flow Editor layouter #5999

Merged
merged 9 commits into from
Mar 1, 2021

Conversation

yeze322
Copy link
Contributor

@yeze322 yeze322 commented Feb 26, 2021

Description

closes #5395

Summary
Be able to reuse builtin branching widgets in custom Actions. (IfConditionWidget | SwitchConditionWidget | ForeachWidget)

Changes

  1. Remove $kind checking in transfomers of IfConditionWidget | SwitchConditionWidget | ForeachWidget to reuse them.
  2. Implicitly add nowrap flag to all above widgets in case uischema author forgets to add it. (without this flag, the layout will be messed up)

Explaination:

Now that we already supported uischema driven Action customization, the Flow Editor's layouter shouldn't restrict the input $kind anymore. By removing the $kind checking logic, those branching widgets are opened to external $kinds.

External Action $kind can then declare the widget field as one of IfConditionWidget | SwitchConditionWidget | ForeachWidget in uischema flow part.

Follow-up:
@zxyanliu let's document it!

Task Item

Screenshots

  1. Reuse IfConditonWidget
    image

image

  1. Reuse ForeachWidget
    image
    image

@yeze322 yeze322 changed the title chore: remove $kind restriction on Flow Editor layouter [WIP] chore: remove $kind restriction on Flow Editor layouter Feb 26, 2021
@yeze322 yeze322 changed the title [WIP] chore: remove $kind restriction on Flow Editor layouter chore: remove $kind restriction on Flow Editor layouter Feb 26, 2021
@yeze322 yeze322 requested a review from EricDahlvang February 26, 2021 05:09
@yeze322
Copy link
Contributor Author

yeze322 commented Feb 26, 2021

@cwhitten @EricDahlvang please review

@boydc2014
Copy link
Contributor

a lot of adaptive-flow UT seems to be failing

@yeze322
Copy link
Contributor Author

yeze322 commented Feb 27, 2021

@boydc2014 Oops, it's the circular reference problem
__
Fixed

@coveralls
Copy link

coveralls commented Feb 27, 2021

Coverage Status

Coverage remained the same at 53.71% when pulling c4e8d01 on yeze322:flow/custom-widget into afaf5d9 on microsoft:main.

@yeze322 yeze322 merged commit 7416cb6 into microsoft:main Mar 1, 2021
lei9444 pushed a commit to lei9444/BotFramework-Composer-1 that referenced this pull request Jun 15, 2021
* remove $kind restriction on branching transformers

* defense non-obejct input in transformers

* nowrap by default for branching nodes

* avoid circular reference

Co-authored-by: Dong Lei <donglei@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Declarative UI widgets in Custom Actions
3 participants