Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

Comments

feat: create lg template when schema provides a default value#2487

Merged
cwhitten merged 2 commits intomicrosoft:masterfrom
a-b-r-o-w-n:feat/create-lg-template
Apr 2, 2020
Merged

feat: create lg template when schema provides a default value#2487
cwhitten merged 2 commits intomicrosoft:masterfrom
a-b-r-o-w-n:feat/create-lg-template

Conversation

@a-b-r-o-w-n
Copy link
Contributor

Description

Previously, the user had to interact with the editor in order to get the template saved.

Note: There is an issue right now with the lg api where if there are multiple parallel writes, the last write wins. So only the last lg field on the form will be created. There is an issue tracking this: #2247

Task Item

closes #2406

@cwhitten cwhitten merged commit df97a7e into microsoft:master Apr 2, 2020
lgFile.templates &&
lgFile.templates.find(template => {
const hasTemplate = useMemo(() => lgFile?.templates.find(t => t.name === lgName), []);
const template = (hasTemplate &&
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here seems no need to find again, if hasTemplate is not a boolean value. it's equal to

const template = hasTemplate || {
     name: lgName,
     parameters: [],
     body: getInitialTemplate(name, value),
   };

a-b-r-o-w-n added a commit that referenced this pull request Apr 3, 2020
…#2487)" (#2500)

This reverts commit df97a7e.

Co-authored-by: Chris Whitten <christopher.whitten@microsoft.com>
@a-b-r-o-w-n a-b-r-o-w-n deleted the feat/create-lg-template branch April 17, 2020 17:16
lei9444 pushed a commit to lei9444/BotFramework-Composer-1 that referenced this pull request Jun 15, 2021
…oft#2487)

* fix cardNoMatchResponse property name

* create lg template when field has a default value
lei9444 pushed a commit to lei9444/BotFramework-Composer-1 that referenced this pull request Jun 15, 2021
…microsoft#2487)" (microsoft#2500)

This reverts commit 80814a1.

Co-authored-by: Chris Whitten <christopher.whitten@microsoft.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants