Skip to content

Commit e65fd73

Browse files
updated the docs for typing indicators
1 parent 26e2a8e commit e65fd73

File tree

3 files changed

+22
-1
lines changed

3 files changed

+22
-1
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
The SwiftUI SDK is built on top of the [StreamChat](https://getstream.io/chat/docs/ios-swift/?language=swift) framework and it's a SwiftUI alternative to the [StreamChatUI](https://getstream.io/chat/docs/sdk/ios/) SDK. It's built completely in SwiftUI, using declarative patterns, that will be familiar to developers working with SwiftUI. The SDK includes an extensive set of performant and customizable UI components which allow you to get started quickly with little to no plumbing required.
88

9+
The complete documentation and capabilities of the SwiftUI SDK can be found [here](https://getstream.io/chat/docs/sdk/ios/swiftui/).
10+
911
## Main Features
1012

1113
- **Channel list:** Browse channels and perform actions on them.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
title: Typing Indicators
3+
---
4+
5+
## Typing Indicators Overview
6+
7+
The SwiftUI SDK has support for typing indicators, shown when other participants in a conversation are typing. There are two places where the typing indicators are shown. The first one is when the user is in the channels list - when someone in a channel is typing, the indicator is shown in the corresponding channel list item. The second place, where a typing indicator is shown, is in the chat channel view. Depending on the configuration provided, the typing indicator can be shown either in the navigation bar, or above the composer, as an overlay over the message list.
8+
9+
The configuration for placing the typing indicator can be found in the `TypingIndicatorPlacement` enum, which is part of the `Utils` class. By default, the placement of the typing indicator is above the composer, which is represented by the enum value `bottomOverlay`.
10+
11+
Here's an example how to change the configuration, so that the typing indicator is shown in the navigation bar.
12+
13+
```swift
14+
let utils = Utils(typingIndicatorPlacement: .navigationBar)
15+
let streamChat = StreamChat(chatClient: chatClient, utils: utils)
16+
```
17+
18+
This setup is done when the `StreamChat` object is being created, usually at the start of the app (e.g. in the `AppDelegate`).

docusaurus/sidebars-ios.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@
6666
"swiftui/components/message-reactions",
6767
"swiftui/components/message-threads",
6868
"swiftui/components/inline-replies",
69-
"swiftui/components/composer-commands"
69+
"swiftui/components/composer-commands",
70+
"swiftui/components/typing-indicators"
7071
]
7172
}
7273
]

0 commit comments

Comments
 (0)