Skip to content

Conversation

@IvanDanchev
Copy link
Contributor

@IvanDanchev IvanDanchev commented Aug 21, 2025

@IvanDanchev IvanDanchev requested review from a team as code owners August 21, 2025 10:14
@IvanDanchev IvanDanchev marked this pull request as draft August 21, 2025 10:14
@IvanDanchev IvanDanchev marked this pull request as ready for review August 26, 2025 05:11
@dimodi
Copy link
Contributor

dimodi commented Aug 26, 2025

Add the Chat to the "INTERACTIVITY AND UX" category on the home page.

Comment on lines +29 to +31
TextField="Content"
AuthorIdField="UserId"
TimestampField="SentAt"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use @nameof()

};

Messages.Add(newMessage);
await InvokeAsync(StateHasChanged);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this really necessary? The component updates even without it.

SentAt = DateTime.Now.AddMinutes(-3)
}
};
private string CurrentUserId = "user1";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
private string CurrentUserId = "user1";
private readonly string CurrentUserId = "user1";


public class ChatMessage
{
public string Id { get; set; }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
public string Id { get; set; }
public string Id { get; set; } = string.Empty;

public class ChatMessage
{
public string Id { get; set; }
public string Content { get; set; }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
public string Content { get; set; }
public string Content { get; set; } = string.Empty;

{
public string Id { get; set; }
public string Content { get; set; }
public string UserId { get; set; }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
public string UserId { get; set; }
public string UserId { get; set; } = string.Empty;

public string Content { get; set; }
public string UserId { get; set; }
public DateTime SentAt { get; set; }
public List<FileSelectFileInfo> Attachments { get; set; }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
public List<FileSelectFileInfo> Attachments { get; set; }
public List<FileSelectFileInfo>? Attachments { get; set; }

Comment on lines 151 to 162
public class ChatMessage
{
public string Id { get; set; }

public string AuthorId { get; set; }

public string AuthorName { get; set; }

public string Content { get; set; }

public DateTime Timestamp { get; set; }
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
public class ChatMessage
{
public string Id { get; set; }
public string AuthorId { get; set; }
public string AuthorName { get; set; }
public string Content { get; set; }
public DateTime Timestamp { get; set; }
}
public class ChatMessage
{
public string Id { get; set; } = string.Empty;
public string AuthorId { get; set; } = string.Empty;
public string AuthorName { get; set; } = string.Empty;
public string Content { get; set; } = string.Empty;
public DateTime Timestamp { get; set; }
}

@dimodi dimodi merged commit 5bc71da into master Aug 26, 2025
@github-actions github-actions bot deleted the chat-docs branch August 26, 2025 07:41
Copy link
Contributor

@ikoevska ikoevska left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sure to add captions to your code snippets and examples. The more descriptive the better. For the most part, this PR lacks links to the API documentation. There are also issues with the amount of information that the docs provide. There are many instances of "this lets you do something" without actually explaining how to do it but resorting to the code snippet instead.

Also note that there's a very confusing API docs experience. There's documentation under Telerik.Blazor.Components which seems pretty descriptive and extensive. and then there's additional documentation under Telerik.Blazor.Components.Chat where there are absolutely no descriptions for anything. Are these supposed to be hidden or is there another reason for the lack of docs there?

image

| `Multiple` | `bool` | `true` | Allow multiple file selection |
| `OnSelect` | `EventCallback` | - | Event fired when files are selected |

>caption An exemplary Chat file upload configuration is shown below
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a sample Chat or an exemplary Chat? Double-check the definition of exemplary.


Configure file actions and handle downloads using JavaScript interop and custom event handlers.

1. Add JavaScript Interop
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a weird approach to a simple step-by-step procedure. It's as if the step text should act as a title (also indicated by the lack of ending punctuation and the title-style casing) and the line below is supposed to be the explanation text under the heading. Please, fix the entire section. Also, note that while Step 2 complies with this approach, Step 3 strays from it.

image


### Configuration

Enable speech-to-text functionality by setting `EnableSpeechToText` to `true`:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Switch the ending punctuation to a period for consistency with the remainder of the article.


This article explains:

* [AI and LLM Integration](#ai-and-llm-integration) - Connect to AI services and language models
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally, you would use colons or m-dashes as a separator here. Furthermore, You don't really need the current format of this section. You could have gone with:

This article explains how to:
* Connect to AI services and language models
* Integrate with chatbot frameworks
* Handle AI responses and user interactions

(with the respective links)


The Chat component works seamlessly with AI services and Large Language Models. You can integrate with various providers like OpenAI, Azure OpenAI, or custom AI services.

### Microsoft.Extensions.AI Integration Example
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Go with a caption or some other title style here instead. Single nested H-elements are not a good practice and it looks odd in the sidebar navigation.


You can connect the Chat component to various chatbot platforms including Microsoft Bot Framework, custom REST APIs, or third-party chatbot services. The component handles the user interface while your bot service processes messages and generates appropriate responses.

>tip The [Person to Bot demo](https://demos.telerik.com/blazor-ui/chat/person-to-bot) showcases chatbot functionality. This demo utilizes a Telerik-hosted AI service solely for illustration purposes. In production environments, you should develop your own AI service tailored to your specific business domain, requirements, and organizational needs.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Person-to-Bot

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Semantically, this is not a tip but an info box. A tip implies non-essential information that might improve your productivity or results. In this case, you're informing the reader of something they need to be aware of.


Control the width behavior of chat messages using the `MessageWidthMode` parameter:

* `MessageWidthMode.Standard` - Messages take up a portion of the available space for better readability (default behavior)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Switch to a colon or an m-dash for the separator. Add ending punctuation to the list items.

}
````

## Data Binding
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that Quick Actions are not listed among the key features.


## Message Suggestions

Message suggestions provide users with quick reply options that appear below the message input area.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section is not very helpful to be honest. I had to inspect the code and the example to figure out the feature. You need to add some explicit explanations in here. This would make the content more helpful to both readers and LLMs.


## Custom Suggestion Templates

Customize the appearance of suggestions using the Chat's `SuggestionTemplate`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note how your snippet here contains code comments. However, none of them relate to SuggestionTemplate. Improve your sample code with notes about the actual thing you're documenting. There's also no caption for the code snippet. There are no links to the APIs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants