mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-01 01:02:41 +00:00
348c7bcea8
* Expand the emoji picker to full height when the keyboard is shown The picker content is rendered with fillMaxSize, so the sheet measures itself to the full window height. That makes the partially expanded anchor available, and the modal sheet auto-shows at that anchor, half way down the screen. The sheet reserves the IME inset through its content window insets, but applies that padding at its own bottom edge, which is off-screen while it rests half way down. The band that is both on-screen and above the keyboard is then only about a tenth of the screen, which is why the matching emoji end up behind it. Expand the sheet while the keyboard is visible so its bottom edge returns to the screen edge and the inset it already reserves lands on top of the keyboard. Modifier.imePadding on the sheet content is not an option: the sheet applies the insets with windowInsetsPadding, which consumes them, so a nested imePadding reads zero. * Cover the keyboard driven sheet expansion with a test The IME reaction moves into ExpandSheetWhenImeIsVisible so a Robolectric test can drive it: dispatching window insets to the composition flips WindowInsets.isImeVisible, and the sheet state is observable from the test. Both the shown and the hidden case are asserted, which is the patch coverage this change was missing. * Do not leave a blank strip below the expanded emoji search The 10dp of bottom padding on the search bar separates the collapsed field from the category tabs underneath it. It stayed applied once the search bar expanded to fill the picker, so the picker stopped 10dp short of its own bottom edge. That strip used to sit below the visible part of a half height sheet. Now that the sheet expands against the keyboard it reads as a gap between the results and the keyboard, so only pad while collapsed.