Skip to content

Commit

Permalink
feat: Plumbs UpdateActivity and DeleteActivity into the app (#3887)
Browse files Browse the repository at this point in the history
* Plumbs UpdateActivity and DeleteActivity into the app

* Remove duplicate entry
  • Loading branch information
cwhitten authored Aug 24, 2020
1 parent 1e2525a commit 9a11603
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,26 @@ const builtinVisualSDKSchema: FlowSchema = {
/>
),
},
[SDKKinds.DeleteActivity]: {
widget: 'ActionCard',
header: {
widget: 'ActionHeader',
title: 'Delete activity',
},
body: (data) => (
<>
<FixedInfo>{data.activityId || '?'}</FixedInfo>
</>
),
},
[SDKKinds.UpdateActivity]: {
widget: 'ActionCard',
header: {
widget: 'ActionHeader',
title: 'Update activity',
},
body: (data) => data.activity,
},
[SDKKinds.DeleteProperty]: {
widget: 'ActionCard',
body: (data) => data.property,
Expand Down
11 changes: 11 additions & 0 deletions Composer/packages/lib/shared/src/labelMap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,17 @@ export const ConceptLabels: { [key in ConceptLabelKey]?: LabelOverride } = {
title: formatMessage('Message updated'),
subtitle: formatMessage('Message updated activity'),
},
[SDKKinds.UpdateActivity]: {
title: formatMessage('Update activity'),
subtitle: formatMessage('Update a an activity previously sent during the conversation'),
},
[SDKKinds.DeleteActivity]: {
title: formatMessage('Delete activity'),
},
[SDKKinds.OnMessageUpdateActivity]: {
title: formatMessage('Message updated'),
subtitle: formatMessage('Message updated activity'),
},
[SDKKinds.OnRepromptDialog]: {
title: formatMessage('Re-prompt for input'),
subtitle: formatMessage('Reprompt dialog event'),
Expand Down
12 changes: 10 additions & 2 deletions Composer/packages/server/schemas/sdk.uischema
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@
"label": "Debug Break"
}
},
"Microsoft.DeleteActivity": {},
"Microsoft.DeleteProperties": {
"form": {
"helpLink": "https://aka.ms/bfc-using-memory",
Expand All @@ -145,6 +144,11 @@
"subtitle": "Delete Property"
}
},
"Microsoft.DeleteActivity": {
"form": {
"label": "Delete activity"
}
},
"Microsoft.EditActions": {
"form": {
"label": "Modify active dialog",
Expand Down Expand Up @@ -322,7 +326,11 @@
"subtitle": "Trace Activity"
}
},
"Microsoft.UpdateActivity": {},
"Microsoft.UpdateActivity": {
"form": {
"label": "Update an activity"
}
},
"Microsoft.CrossTrainedRecognizerSet": {},
"Microsoft.MultiLanguageRecognizer": {},
"Microsoft.RecognizerSet": {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,4 +163,12 @@ export const DefaultMenuSchema: MenuUISchema = {
label: formatMessage('Emit a telemetry track event'),
submenu: [SubmenuNames.Debugging],
},
[SDKKinds.UpdateActivity]: {
label: formatMessage('Update activity'),
submenu: [SubmenuNames.PropertyManagement],
},
[SDKKinds.DeleteActivity]: {
label: formatMessage('Delete activity'),
submenu: [SubmenuNames.PropertyManagement],
},
};
18 changes: 17 additions & 1 deletion Composer/packages/ui-plugins/lg/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,23 @@ const config: PluginConfig = {
icon: 'MessageBot',
colors: {
theme: Colors.BlueMagenta20,
icon: Colors.BlueMagenta30,
},
},
body: {
widget: 'LgWidget',
field: 'activity',
},
},
},
[SDKKinds.UpdateActivity]: {
flow: {
widget: 'ActionCard',
header: {
widget: 'ActionHeader',
icon: 'MessageBot',
colors: {
theme: Colors.AzureGray3,
icon: Colors.AzureGray2,
},
},
body: {
Expand Down

0 comments on commit 9a11603

Please sign in to comment.