Skip to content

Commit 4431862

Browse files
committed
Document paneTitle behavior on title @param of public screen composables
ChannelsScreen, ChatsScreen, and ThreadsScreen route their title parameter into Modifier.semantics { paneTitle = ... } on the screen root. The @param title KDoc now states that contract so integrators know the value is announced by TalkBack when the screen appears as a pane.
1 parent 97395ef commit 4431862

3 files changed

Lines changed: 6 additions & 2 deletions

File tree

stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/channels/ChannelsScreen.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ import io.getstream.chat.android.ui.common.state.channels.actions.ViewInfo
6969
* You can use the default implementation by not passing in an instance yourself, or you
7070
* can customize the behavior using its parameters.
7171
* @param viewModelKey Key to differentiate between instances of [ChannelListViewModel].
72-
* @param title Header title.
72+
* @param title Header title. Also drives the screen's `paneTitle` semantic, announced by TalkBack
73+
* when the screen appears as a pane (e.g. an adaptive-layout pane or a Compose Navigation route).
7374
* @param isShowingHeader If we show the header or hide it.
7475
* @param searchMode The search mode for the screen.
7576
* @param onHeaderActionClick Handler for the default header action.

stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/chats/ChatsScreen.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ import kotlin.math.abs
108108
* When the initial [ChannelViewModelFactory] is requested (before a channel is selected),
109109
* `channelId`, `messageId`, and `parentMessageId` are `null`.
110110
* @param title The title displayed in the list pane top bar. Default is `"Stream Chat"`.
111+
* Also drives the list pane's `paneTitle` semantic, announced by TalkBack when the list pane
112+
* appears or becomes active (e.g. switching between panes in the adaptive layout).
111113
* @param searchMode The current search mode. Default is [SearchMode.None].
112114
* @param listContentMode The mode for displaying the list content. Default is [ChatListContentMode.Channels].
113115
* @param onBackPress Callback invoked when the user presses the back button.

stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/threads/ThreadsScreen.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ import io.getstream.chat.android.models.Thread
4040
* It can be used without most parameters for default behavior, that can be tweaked if necessary.
4141
*
4242
* @param viewModelFactory The factory used to build the [ThreadListViewModel].
43-
* @param title Header title.
43+
* @param title Header title. Also drives the screen's `paneTitle` semantic, announced by TalkBack
44+
* when the screen appears as a pane (e.g. an adaptive-layout pane or a Compose Navigation route).
4445
* @param onHeaderAvatarClick Handle for when the user clicks on the header avatar.
4546
* @param onThreadClick Handler for Thread item clicks.
4647
*/

0 commit comments

Comments
 (0)