mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-10-23 21:33:47 +00:00
docs: the one-hand search bar keeps keyboard space only for its own keyboard
The Kotlin chat-list spec now says the onboarding search bar's keyboard spacer follows the search field's focus, so a keyboard opened over the list leaves the onboarding cards' size alone, and why iOS has no counterpart.
This commit is contained in:
1 parent
181c92e9a4
commit
a2d6695a99
1 file changed
+1
-1
@@ -475,7 +475,7 @@ So nothing is shown twice: a result that is a chat the list shows is hidden, a c
|
||||
| [`ChatList`](../../common/src/commonMain/kotlin/chat/simplex/common/views/chatlist/ChatListView.kt#L1035-L1206) | `rows(shownChatIds)` with the ids of the shown chats ([source](../../common/src/commonMain/kotlin/chat/simplex/common/views/chatlist/ChatListView.kt#L1077)); after the local chats and before `ChatListFeatureCards`, [`directoryRows`](../../common/src/commonMain/kotlin/chat/simplex/common/views/chatlist/ChatListView.kt#L510-L523) | `NoChatsView` overlay only when no chat is shown, the model is not `searching` and `rows.isEmpty` ([source](../../common/src/commonMain/kotlin/chat/simplex/common/views/chatlist/ChatListView.kt#L1184-L1189)); the `you_have_no_chats` overlay of `ChatListWithLoadingScreen` (no chats at all) is hidden while `showResults` |
|
||||
| Onboarding branch of [`ChatListWithLoadingScreen`](../../common/src/commonMain/kotlin/chat/simplex/common/views/chatlist/ChatListView.kt#L459-L499) | A `Column` with `ChatListSearchBarWithTags` first (top bar) or last (one-hand UI), and between them a `Box(Modifier.weight(1f))` holding, while `showResults`, a `LazyColumnWithScrollBarNoAppBar` of the same rows with `shownChatIds = emptySet()` (reversed in one-hand mode, `imePadding()` in top-bar mode), otherwise `ConnectOnboardingView()` on Android | A centred "No chats found" item when not searching and `rows.isEmpty` |
|
||||
|
||||
The onboarding `Column` takes the toolbar and navigation-bar paddings and consumes the navigation-bar insets, so the results list's `imePadding()` does not count them twice. On desktop the onboarding pages are drawn in the centre pane, so the chat list pane shows only the search bar and the results. When an opened result adds a chat and the onboarding state ends, `ChatList` enters composition and its `LaunchedEffect(activeFilter.value)` ([source](../../common/src/commonMain/kotlin/chat/simplex/common/views/chatlist/ChatListView.kt#L1203-L1205)) clears the search text, which resets the model; the iOS app keeps the search there.
|
||||
The onboarding `Column` takes the toolbar and navigation-bar paddings and consumes the navigation-bar insets, so the results list's `imePadding()` does not count them twice. In one-hand mode `ChatListSearchBarWithTags` ends with a keyboard spacer (`windowInsetsBottomHeight(WindowInsets.ime)`) only while its search field has the focus (`searchFocused`, which `ChatListSearchBar` sets from `onFocusChanged`): the bar sits above its own keyboard, and a keyboard opened by a view over the list (New chat › Create group) leaves the onboarding cards' size alone. iOS has no such spacer: SwiftUI's keyboard safe area lifts its field, and Create group opens in a sheet. On desktop the onboarding pages are drawn in the centre pane, so the chat list pane shows only the search bar and the results. When an opened result adds a chat and the onboarding state ends, `ChatList` enters composition and its `LaunchedEffect(activeFilter.value)` ([source](../../common/src/commonMain/kotlin/chat/simplex/common/views/chatlist/ChatListView.kt#L1203-L1205)) clears the search text, which resets the model; the iOS app keeps the search there.
|
||||
|
||||
`directoryRows` is a `LazyListScope` builder that emits one list without headers, in this order: your chats (`rows.yourChats`, `items` keyed `remoteHostId to id`), the results (`items` keyed by `id`, the link), then the footer item. So the load or retry row is the last row of the results: at the bottom with the top bar, and at the top in the one-hand UI, the list being reversed, which puts it farthest from the field.
|
||||
|
||||
|
||||
Reference in new issue
Block a user