Skip to content
This repository has been archived by the owner on Jun 30, 2022. It is now read-only.

Hospitality sample and skill changes #2236

Merged
merged 40 commits into from
Aug 28, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
b35a7d8
Add room service dialog files
litofish Aug 8, 2019
9481b61
Add room service luis model
litofish Aug 8, 2019
7c0aeb2
Complete most of room service dialog
litofish Aug 15, 2019
a2a10f5
update menu card
litofish Aug 15, 2019
15892dc
improve luis model
litofish Aug 15, 2019
903e575
final changes
litofish Aug 15, 2019
02d77a5
Merge branch 'next' of https://github.com/microsoft/botframework-solu…
litofish Aug 15, 2019
963f099
Move requested item availability check to hotel service and add adapt…
litofish Aug 15, 2019
cc87ba9
update manifest
litofish Aug 15, 2019
eccb7fc
Adding updated hospitality skill
litofish Aug 16, 2019
a8c0d95
small changes to sample
litofish Aug 16, 2019
7e03a91
restaurant booking fixes
litofish Aug 16, 2019
db838c8
weather skill .lu file update
litofish Aug 16, 2019
fc54b8b
Update skill manifests
litofish Aug 16, 2019
ef2ff6f
Merge branch 'luna/skillfixes' of https://github.com/microsoft/botfra…
litofish Aug 17, 2019
90e7dbf
skills updates
litofish Aug 17, 2019
d30fedf
Merge branch 'next' of https://github.com/microsoft/botframework-solu…
litofish Aug 19, 2019
579d774
Add files for event skill from skill template
litofish Aug 19, 2019
ae543aa
remove other languages
litofish Aug 19, 2019
4f9ad92
Add files for basic find events dialog
litofish Aug 19, 2019
fb473e5
Add Eventbrite service to get event information
litofish Aug 20, 2019
fa6a439
Update Luis model and create adaptive card for events
litofish Aug 21, 2019
a27d13b
Implement populating location state from semantic action
litofish Aug 21, 2019
0d726ee
fix bugs
litofish Aug 21, 2019
02eef3d
Merge branch 'next' of https://github.com/microsoft/botframework-solu…
litofish Aug 21, 2019
fa5a88b
Merge branch 'next' of https://github.com/microsoft/botframework-solu…
litofish Aug 22, 2019
72c614c
Add event skill to sample
litofish Aug 22, 2019
a4620df
Merge branch 'luna/hospitalityVA' of https://github.com/microsoft/bot…
litofish Aug 22, 2019
b05c41f
room service dialog bug fix
litofish Aug 22, 2019
e8d604b
for event, news, and weather skills populate location state from sema…
litofish Aug 22, 2019
42748b8
customize VA start card
litofish Aug 23, 2019
0935110
Add available items and room service menu item
litofish Aug 23, 2019
e725625
Hospitality skill available items updates
litofish Aug 26, 2019
fb5173c
Sample small updates and add Bing Search skill
litofish Aug 26, 2019
f761925
Support adaptive cards being used in Teams for Hospitality and Event …
litofish Aug 26, 2019
5b98f8c
fixes for better funcitonality in Teams
litofish Aug 27, 2019
9768712
merge next
litofish Aug 27, 2019
b46e5f2
Fix visual studio version
litofish Aug 27, 2019
bd83f7a
Fix Teams intro card issue
litofish Aug 28, 2019
88cf3d5
Merge branch 'luna/hospitalityVA' of https://github.com/microsoft/bot…
litofish Aug 28, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
{
"type": "AdaptiveCard",
"id": "EventCard",
"body": [
{
"type": "Container",
"items": [
{
"type": "ColumnSet",
"columns": [
{
"type": "Column",
"verticalContentAlignment": "Center",
"items": [
{
"type": "TextBlock",
"id": "title",
"size": "Large",
"weight": "Bolder",
"color": "Dark",
"text": "Local Event"
}
],
"width": "stretch"
}
]
}
]
},
{
"type": "Image",
"url": "{ImageUrl}"
},
{
"type": "TextBlock",
"text": "**{Title}**",
"size": "Medium",
"weight": "Bolder"
},
{
"type": "Container",
"items": [
{
"type": "TextBlock",
"text": "{StartDate}",
"spacing": "Small"
},
{
"type": "TextBlock",
"text": "{Location}",
"spacing": "Small"
},
{
"type": "TextBlock",
"text": "{Price}",
"spacing": "Small"
}
]
},
{
"type": "TextBlock",
"text": "Powered by **Eventbrite**",
"horizontalAlignment": "Right",
"size": "Small"
}
],
"actions": [
{
"type": "Action.OpenUrl",
"title": "Get Tickets",
"url": "{Url}"
}
],
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"version": "1.0",
"speak": "{Speak}"
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@
using Luis;
using Microsoft.Bot.Builder;
using Microsoft.Bot.Builder.Dialogs;
using Microsoft.Bot.Builder.Dialogs.Choices;
using Microsoft.Bot.Builder.Skills;
using Microsoft.Bot.Builder.Solutions.Authentication;
using Microsoft.Bot.Builder.Solutions.Responses;
using Microsoft.Bot.Builder.Solutions.Util;
using Microsoft.Bot.Connector;
using Microsoft.Bot.Schema;

namespace EventSkill.Dialogs
Expand Down Expand Up @@ -175,5 +177,16 @@ protected async Task HandleDialogExceptions(WaterfallStepContext sc, Exception e
var state = await StateAccessor.GetAsync(sc.Context);
state.Clear();
}

// Get card that renders for adaptive card 1.0
protected string GetCardName(ITurnContext context, string name)
{
if (Channel.GetChannelId(context) == Channels.Msteams)
{
name += ".1.0";
}

return name;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ private async Task<DialogTurnResult> FindEvents(WaterfallStepContext sc, Cancell
Url = item.Url
};

cards.Add(new Card("EventCard", eventCardData));
cards.Add(new Card(GetCardName(sc.Context, "EventCard"), eventCardData));
}

await sc.Context.SendActivityAsync(ResponseManager.GetCardResponse(FindEventsResponses.FoundEvents, cards, null));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ private async Task<InterruptionAction> OnLogout(DialogContext dc)

private async Task PopulateStateFromSemanticAction(ITurnContext context)
{
// Example of populating local state with data passed through semanticAction out of Activity
// Populating local state with data passed through semanticAction out of Activity
var activity = context.Activity;
var semanticAction = activity.SemanticAction;
if (semanticAction != null && semanticAction.Entities.ContainsKey("location"))
Expand Down
2 changes: 2 additions & 0 deletions skills/src/csharp/experimental/eventskill/EventSkill.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
</PropertyGroup>

<ItemGroup>
<Content Remove="Content\EventCard.1.0.json" />
<Content Remove="Content\EventCard.json" />
<Content Remove="Responses\FindEvents\FindEventsResponses.json" />
<Content Remove="Responses\Main\MainResponses.de.json" />
Expand All @@ -24,6 +25,7 @@
</ItemGroup>

<ItemGroup>
<EmbeddedResource Include="Content\EventCard.1.0.json" />
<EmbeddedResource Include="Content\EventCard.json" />
<EmbeddedResource Include="Responses\FindEvents\FindEventsResponses.json" />
<EmbeddedResource Include="Responses\Main\MainResponses.de.json" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public class EventSkillState

public EventLuis LuisResult { get; set; }

public string CurrentCoordinates { get; internal set; }
public string CurrentCoordinates { get; set; }

public void Clear()
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"type": "AdaptiveCard",
"id": "FoodItemCard",
"body": [
{
"type": "ColumnSet",
"columns": [
{
"type": "Column",
"items": [
{
"type": "TextBlock",
"text": "{Quantity}",
"horizontalAlignment": "Center"
}
],
"width": "auto"
},
{
"type": "Column",
"items": [
{
"type": "TextBlock",
"text": "{Name}"
},
{
"type": "TextBlock",
"text": "{SpecialRequest}",
"spacing": "None"
}
],
"width": "stretch"
},
{
"type": "Column",
"items": [
{
"type": "TextBlock",
"text": "${Price}",
"horizontalAlignment": "Right"
}
],
"width": "auto"
}
]
}
],
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"version": "1.0",
"speak": "{Speak}"
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"horizontalAlignment": "Center"
}
],
"width": "40px"
"width": 10
},
{
"type": "Column",
Expand All @@ -30,7 +30,7 @@
"spacing": "None"
}
],
"width": "stretch"
"width": 70
},
{
"type": "Column",
Expand All @@ -41,7 +41,7 @@
"horizontalAlignment": "Right"
}
],
"width": "auto"
"width": 20
}
]
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
{
"type": "AdaptiveCard",
"version": "1.0",
"id": "FoodOrderCard",
"body": [
{
"type": "Container",
"items": [
{
"type": "ColumnSet",
"columns": [
{
"type": "Column",
"verticalContentAlignment": "Center",
"items": [
{
"type": "TextBlock",
"id": "title",
"size": "Large",
"weight": "Bolder",
"color": "Dark",
"text": "Current Order"
}
],
"width": "stretch"
}
]
}
]
},
{
"type": "Container",
"id": "items",
"items": []
},
{
"type": "Container",
"items": [
{
"type": "ColumnSet",
"columns": [
{
"type": "Column",
"items": [
{
"type": "TextBlock",
"text": "Bill Total",
"horizontalAlignment": "Right"
}
],
"width": "stretch"
},
{
"type": "Column",
"items": [
{
"type": "TextBlock",
"weight": "Bolder",
"text": "${BillTotal}",
"horizontalAlignment": "Right"
}
],
"width": "auto"
}
]
}
]
}
],
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json"
}
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"horizontalAlignment": "Center"
}
],
"width": "40px"
"width": 10
},
{
"type": "Column",
Expand All @@ -71,7 +71,7 @@
"text": "Item"
}
],
"width": "stretch"
"width": 70
},
{
"type": "Column",
Expand All @@ -83,7 +83,7 @@
"horizontalAlignment": "Right"
}
],
"width": "auto"
"width": 20
}
]
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"type": "AdaptiveCard",
"id": "MenuCard",
"body": [
{
"type": "Container",
"items": [
{
"type": "ColumnSet",
"columns": [
{
"type": "Column",
"verticalContentAlignment": "Center",
"items": [
{
"type": "TextBlock",
"id": "title",
"size": "Large",
"weight": "Bolder",
"color": "Dark",
"text": "{Type} Menu"
}
],
"width": "stretch"
}
]
},
{
"type": "TextBlock",
"text": "{TimeAvailable}",
"weight": "Bolder",
"color": "Dark"
}
]
},
{
"type": "Container",
"id": "items",
"items": []
}
],
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"version": "1.0",
"speak": "{Speak}"
}
Loading