Skip to content

Commit f01731d

Browse files
authored
Merge pull request #268889 from vac0224/vc-chat-hero-sample
Update chat-hero-sample.md
2 parents 3cda97d + 2503867 commit f01731d

File tree

1 file changed

+24
-16
lines changed

1 file changed

+24
-16
lines changed

articles/communication-services/samples/chat-hero-sample.md

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ manager: chpalm
77
services: azure-communication-services
88

99
ms.author: ektrishi
10-
ms.date: 06/30/2021
10+
ms.date: 6/30/2021
1111
ms.topic: overview
1212
ms.service: azure-communication-services
1313
ms.subservice: chat
@@ -21,7 +21,7 @@ ms.subservice: chat
2121

2222
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.
2323

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.
2525

2626

2727
## Overview
@@ -32,41 +32,49 @@ Here's what the sample looks like:
3232

3333
:::image type="content" source="./media/chat/landing-page.png" alt-text="Screenshot showing the sample application's landing page.":::
3434

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.
3636

3737
:::image type="content" source="./media/chat/pre-chat.png" alt-text="Screenshot showing the application's pre-chat screen.":::
3838

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.
4040

4141
:::image type="content" source="./media/chat/main-app.png" alt-text="Screenshot showing the main screen of the sample application.":::
4242

4343
Components of the main chat screen:
4444

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.
4848

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.
5050

5151
## Prerequisites
5252

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/).
5555
- 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.
5757

5858
## Before running the sample for the first time
5959

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.
61-
2. `git clone https://github.com/Azure-Samples/communication-services-web-chat-hero.git`
62-
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.
61+
2. Clone the repo using the following CLI string:
62+
63+
`git clone https://github.com/Azure-Samples/communication-services-web-chat-hero.git`
64+
65+
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.
6368

6469
```azurecli-interactive
6570
az communication list-key --name "<acsResourceName>" --resource-group "<resourceGroup>"
6671
```
6772
6873
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.
7078
7179
## Local run
7280
@@ -103,7 +111,7 @@ For more information, see the following articles:
103111
- Familiarize yourself with our [Chat SDK](../concepts/chat/sdk-features.md)
104112
- Check out the chat components in the [UI Library](https://azure.github.io/communication-ui-library/)
105113
106-
## Additional reading
114+
## Related topics
107115
108116
- [Samples](./overview.md) - Find more samples and examples on our samples overview page.
109117
- [Redux](https://redux.js.org/) - Client-side state management

0 commit comments

Comments
 (0)