You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/communication-services/samples/chat-hero-sample.md
+24-16Lines changed: 24 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ manager: chpalm
7
7
services: azure-communication-services
8
8
9
9
ms.author: ektrishi
10
-
ms.date: 06/30/2021
10
+
ms.date: 6/30/2021
11
11
ms.topic: overview
12
12
ms.service: azure-communication-services
13
13
ms.subservice: chat
@@ -21,7 +21,7 @@ ms.subservice: chat
21
21
22
22
The Azure Communication Services **Group Chat Hero Sample** demonstrates how the Communication Services Chat Web SDK can be used to build a group chat experience.
23
23
24
-
In this Sample quickstart, we'll learn how the sample works before we run the sample on your local machine. We'll then deploy the sample to Azure using your own Azure Communication Services resources.
24
+
In this Sample quickstart, we learn how the sample works before we run the sample on your local machine. We then deploy the sample to Azure using your own Azure Communication Services resources.
25
25
26
26
27
27
## Overview
@@ -32,41 +32,49 @@ Here's what the sample looks like:
32
32
33
33
:::image type="content" source="./media/chat/landing-page.png" alt-text="Screenshot showing the sample application's landing page.":::
34
34
35
-
When you press the "Start a Chat" button, the web application fetches a user access token from the server-side application. This token is then used to connect the client app to Azure Communication Services. Once the token is retrieved, you'll be prompted to specify your name and emoji that will represent you in chat.
35
+
When you press **Start a Chat**, the web application fetches a user access token from the server-side application. You then use this token to connect the client app to Azure Communication Services. Once the token is retrieved, the system prompts you to enter your name and choose an emoji to represent you in chat.
36
36
37
37
:::image type="content" source="./media/chat/pre-chat.png" alt-text="Screenshot showing the application's pre-chat screen.":::
38
38
39
-
Once you configure your display name and emoji, you can join the chat session. Now you will see the main chat canvas where the core chat experience lives.
39
+
Once you configure your display name and emoji, you can join the chat session. Now you see the main chat canvas where the core chat experience lives.
40
40
41
41
:::image type="content" source="./media/chat/main-app.png" alt-text="Screenshot showing the main screen of the sample application.":::
42
42
43
43
Components of the main chat screen:
44
44
45
-
-**Main Chat Area**: This is the core chat experience where users can send and receives messages. To send messages, you can use the input area and press enter (or use the send button). Chat messages received are categorized by the sender with the correct name and emoji. You will see two types of notifications in the chat area: 1) typing notifications when a user is typing and 2) sent and read notifications for messages.
46
-
-**Header**: This is where the user will see the title of the chat thread and the controls for toggling participant and settings side bars, and a leave button to exit the chat session.
47
-
-**Side Bar**: This is where participants and setting information are shown when toggled using the controls in the header. The participants side bar contains a list of participants in the chat and a link to invite participants to the chat session. The settings side bar allows you to configure the chat thread title.
45
+
-**Main Chat Area**: The core chat experience where users can send and receive messages. To send messages, you can use the input area and press enter (or use the send button). Received chat messages are organized by sender with the correct name and emoji. You see two types of notifications in the chat area: 1) typing notifications when a user is typing and 2) sent and read notifications for messages.
46
+
-**Header**: Where the user sees the title of the chat thread and the controls for toggling participant and settings side bars, and a leave button to exit the chat session.
47
+
-**Side Bar**: Where participants and setting information display when toggled using the controls in the header. The participants side bar contains a list of participants in the chat and a link to invite participants to the chat session. The settings side bar enables you to configure the chat thread title.
48
48
49
-
Below you'll find more information on prerequisites and steps to set up the sample.
49
+
Complete the following prerequisites and steps to set up the sample.
50
50
51
51
## Prerequisites
52
52
53
-
-[Visual Studio Code (Stable Build)](https://code.visualstudio.com/download)
54
-
-[Node.js (16.14.2 and above)](https://nodejs.org/en/download/)
53
+
-[Visual Studio Code (Stable Build)](https://code.visualstudio.com/download).
54
+
-[Node.js (16.14.2 and above)](https://nodejs.org/en/download/).
55
55
- Create an Azure account with an active subscription. For details, see [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
56
-
- Create an Azure Communication Services resource. For details, see [Create an Azure Communication Resource](../quickstarts/create-communication-resource.md). You'll need to record your resource **connection string** for this quickstart.
56
+
- Create an Azure Communication Services resource. For details, see [Create an Azure Communication Resource](../quickstarts/create-communication-resource.md). Record your resource **connection string** for this quickstart.
57
57
58
58
## Before running the sample for the first time
59
59
60
-
1. Open an instance of PowerShell, Windows Terminal, Command Prompt or equivalent and navigate to the directory that you'd like to clone the sample to.
3. Get the `Connection String` and `Endpoint URL` from the Azure Portal or by using the Azure CLI.
60
+
1. Open an instance of PowerShell, Windows Terminal, Command Prompt, or equivalent and navigate to the directory where you'd like to clone the sample to.
Or clone the repo using any method described in [Clone an existing Git repo](https://learn.microsoft.com/azure/devops/repos/git/clone).
66
+
67
+
3. Get the `Connection String` and `Endpoint URL` from the Azure portal or by using the Azure CLI.
63
68
64
69
```azurecli-interactive
65
70
az communication list-key --name "<acsResourceName>" --resource-group "<resourceGroup>"
66
71
```
67
72
68
73
For more information on connection strings, see [Create an Azure Communication Services resources](../quickstarts/create-communication-resource.md)
69
-
4. Once you get the `Connection String` and `Endpoint URL`, Add both values to the **Server/appsettings.json** file found under the Chat Hero Sample folder. Input your connection string in the variable: `ResourceConnectionString` and endpoint URL in the variable: `EndpointUrl`.
74
+
4. Once you get the `Connection String`, Add the connection string to the **Server/appsettings.json** file found under the Chat folder. Input your connection string in the variable: `ResourceConnectionString`.
75
+
5. Once you get the `Endpoint`, add the endpoint string to the **Server/appsetting.json** file. Input your endpoint in the variable: `EndpointUrl`.
76
+
6. Get the `identity` from the Azure portal. Select **Identities & User Access Tokens** in the Azure portal. Generate a user with `Chat` scope.
77
+
7. Once you get the `identity` string, add the identity string to the **Server/appsetting.json** file. Input your identity string in the variable: `AdminUserId`. This is the server user to add new users to the chat thread.
70
78
71
79
## Local run
72
80
@@ -103,7 +111,7 @@ For more information, see the following articles:
103
111
- Familiarize yourself with our [Chat SDK](../concepts/chat/sdk-features.md)
104
112
- Check out the chat components in the [UI Library](https://azure.github.io/communication-ui-library/)
105
113
106
-
## Additional reading
114
+
## Related topics
107
115
108
116
- [Samples](./overview.md) - Find more samples and examples on our samples overview page.
109
117
- [Redux](https://redux.js.org/) - Client-side state management
0 commit comments