Skip to content

Commit c3bcfce

Browse files
committed
docs(chat): Add Structure article content and image placeholders And Improve content of articles
1 parent 589eafd commit c3bcfce

File tree

7 files changed

+49
-8
lines changed

7 files changed

+49
-8
lines changed

controls/chat/functionality/actions.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,15 @@ position: 0
1010

1111
# Default Actions
1212

13-
The **RadChat** control has a support for default **suggested actions**. To display the **suggestedActions** propmt, you need to call the `renderSuggestedActions` method of the control.
13+
The **RadChat** control has a support for default **suggested actions** which are rendered inside a Suggested Actions Pane. A Suggested Action is a button that the user can tap/click to provide input. That is why they can be also called Quick Actions.
14+
15+
Unlike buttons that appear within [rich cards]({%slug chat/cards%}) (which remain visible and accessible to the user even after being tapped), buttons that appear within the suggested actions pane will disappear after the user makes a selection. This prevents the user from tapping stale buttons within a conversation and simplifies bot development (since you will not need to account for that scenario).
16+
17+
To display the **suggestedActions** propmt, you need to call the `renderSuggestedActions` method of the control.
18+
19+
>caption **Figure 1**: A Chat with suggested actions.
20+
21+
![chat with suggested actions](images/suggested-actions.png)
1422

1523
````ASPX
1624
<telerik:RadChat runat="server" ID="RadChat1">

controls/chat/functionality/cards.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@ position: 1
1010

1111
# Default Cards
1212

13-
Out of the box, the **RadChat** supports the default **heroCards** which can be displayed in the chat flow when calling the `renderAttachments` method of the control.
13+
Rich cards are complex attachment messages that can contain additional message styling, templates, and images. The **RadChat** control supports the default **heroCards** template which can be displayed in the chat flow when calling the `renderAttachments` method of the control and pass `heroCard` as a value for the `contentType` property of an attachment.
14+
15+
>caption **Figure 1**: A Chat that uses the default HeroCard template.
16+
17+
![chat with heroCard template](images/herocard-template.png)
1418

1519
````ASPX
1620
<telerik:RadChat runat="server" ID="RadChat1">
@@ -34,13 +38,19 @@ function renderAttachments() {
3438
}
3539
````
3640

41+
The layout of a collection of attachments can be:
42+
* **Carousel** - displays multiple cards *horizontally*;
43+
![Carousel](images/Carousel.png)
44+
* **List** - displays multiple cards *vertically*;
45+
![deck](images/deck.png)
3746

47+
To further customize the appearance of a card, you can also use [Custom Templates]({%slug chat/functionality/templates%}) and [Custom Components]({%slug chat/functionality/components%}) articles.
3848

3949
# See Also
4050

4151
* [RadChat Structure]({%slug chat/structure%})
4252

43-
* [RadChat Server-Side Programming]({%slug diagram/server-side-programming%})
53+
* [RadChat Server-Side Programming]({%slug chat/server-side-programming%})
4454

4555
* [RadChat Client-Side Programming]({%slug chat/client-side-programming/overview%})
4656

controls/chat/functionality/components.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ The **RadChat** control supports the implementation of custom components which a
1515

1616
The following example demonstrates how to place a [Kendo UI Calendar](https://docs.telerik.com/kendo-ui/controls/scheduling/calendar/overview) in a custom RadChat component.
1717

18+
>caption **Figure 1**: A Chat renders a Kendo UI Calendar to facilitate date choosing.
19+
20+
![chat with custom components](images/custom-components.png)
21+
1822
````HTML
1923
<%-- load Kendo UI styles and scripts --%>
2024
<link rel="stylesheet" href="~/styles/kendo.common.min.css" />

controls/chat/functionality/templates.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@ position: 2
1313

1414
The **RadChat** control supports the definition of custom templates to fit any custom payload that is returned by the service.
1515

16-
The following example demonstrates how to implement a simple [Kendo UI template](https://docs.telerik.com/kendo-ui/framework/templates/overview) and to register it for the **RadChat**.
16+
The following example demonstrates how to implement a simple [Kendo UI Template](https://docs.telerik.com/kendo-ui/framework/templates/overview) and to register it for the **RadChat**.
17+
18+
>caption **Figure 1**: A chat uses custom Kendo UI Templates.
19+
20+
![chat with custom template](images/custom-templates.png)
1721

1822
````ASPX
1923
<telerik:RadChat runat="server" ID="RadChat1">

controls/chat/overview.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ This article provides a brief overview of the main features of the **RadChat** c
2424

2525
* **[Custom Components]({%slug chat/functionality/components%})** - Integration of custom components, which allows the use of JavaScript to render any content.
2626

27+
To get familiar with the UI elements of the RadChat you can check the [RadChat Structure]({%slug chat/structure%}) article.
2728

2829
# See Also
2930

controls/chat/server-side-programming/overview.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@ You can configure the settings of **RadChat** and create its elements on the cod
1616

1717
**Example 1** shows a possible application of the Server-Side API of the chat. The code in the example configures some settings of the chat, of its User and Messages settings, then assigns the event handlers of the client-side events.
1818

19-
>caption **Figure 1**: A chat that is configured from the code-behind.
20-
21-
![diagram-programmatic-creation](images/diagram-programmatic-creation.png)
22-
2319
>caption **Example 1**: Configuring a diagram on the server-side.
2420
2521
````C#

controls/chat/structure.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,31 @@ position: 2
1010

1111
# Structure Overview
1212

13+
>caption **Figure 1**: A chat structure.
1314
15+
![chat-structure](images/chat-structure.png)
1416

17+
The two main elements the **RadChat** control is built with are **Message List** and **Message Box**.
1518

19+
## The Message List can contain:
1620

21+
* **Message Bubble** - element containing a message string. Usually the current user's message bubbles are right aligned and other users/chatbots' message bubbles are left aligned.
22+
* **Message Group** - a continuous series of message bubbles by the same user.
23+
* **Avatar** - a user icon next to the message bubble indicating the sender of the message. If there are more than one continuous messages from the same user, the icon stands only next to the last message of the message group.
24+
* **Author** - a text message indicating the author of the message, if such is available. Displayed over the first message bubble of a message group.
25+
* **Message Timestamp** - date string near the message bubble showing the time when the message is sent. Clicking the message bubble toggles the timestamp visibility.
26+
* **Suggested Action** - button that the user can tap/click to provide input. Unlike buttons that appear within rich cards (which remain visible and accessible to the user even after being tapped), buttons that appear within the suggested actions pane will disappear after the user makes a selection. This prevents the user from tapping stale buttons within a conversation and simplifies bot development (since you will not need to account for that scenario).
27+
* **Suggested Actions Pane** - an element that contains one or more suggested action elements.
28+
* **Rich Card Attachment** - complex messages that can contain more that just a message string. For example, every card can contain image, custom styling and suggested actions. The default card available in **RadChat** is a "heroCard". More on cards can be found in the [Custom Templates]({%slug chat/functionality/templates%}) article.
29+
* **Deck of cards** - collection of rich cards that can be listed in two ways:
30+
* **Carousel** - displays multiple cards *horizontally*. Might be referred as **Card Deck**;
31+
* **List** - displays multiple cards *vertically*. Might be referred as **Card List**;
1732

1833

34+
## The Message Box contains
1935

36+
* **Message Input** - input where the user writes their message. When there is no message written, a placeholder message is visible.
37+
* **Send Button** - button that when clicked sends the message in the message input. When the focus is on the message input, pressing the `Enter` key is the same as clicking the send button.
2038

2139
# See Also
2240

0 commit comments

Comments
 (0)