Modern Apps git

← Modern-Apps.git

maps: lift the search sheet above the keyboard

Commit
bcfa1146f48eb12714163ceb5d105b04d0d7ff72
Author
Vayun Mathur <[email protected]>
When
2026-11-08 02:27 UTC (28 days ago)
Parents
a852a5b
The search field sat under the keyboard: imePadding was inside the
sheet content, which only moved the field within a sheet the keyboard
still covered.

Apply imePadding to the scaffold modifier so the sheet's whole layout
area rides above the IME. Kept in maps, not library/ui, which bans
imePadding.

Verified: :maps:testDevUnitTest green.

Diff

maps/src/main/java/com/vayunmathur/maps/ui/MapSheets.kt
diff --git a/maps/src/main/java/com/vayunmathur/maps/ui/MapSheets.kt b/maps/src/main/java/com/vayunmathur/maps/ui/MapSheets.ktindex 06b1cfc6f7..586ba078e6 100644--- a/maps/src/main/java/com/vayunmathur/maps/ui/MapSheets.kt+++ b/maps/src/main/java/com/vayunmathur/maps/ui/MapSheets.kt@@ -36,13 +36,16 @@ internal fun MapPageScope.MapSheets(             SearchSheet(                 searchState,                 searchActions,-                // Ride above the keyboard: the field keeps focus while typing, so-                // without IME padding the keys cover the results being typed for.-                Modifier.padding(top = Spacing.sm).imePadding(),+                Modifier.padding(top = Spacing.sm),             )         }     },-        Modifier,+        // Ride above the keyboard: the scaffold anchors its sheet to the+        // bottom of its own layout area, so IME padding has to shrink that+        // area (here) rather than pad inside the sheet content — padding+        // inside only moved the field up within a sheet the keyboard still+        // covered. Applied in maps, not library/ui (which bans imePadding).+        Modifier.imePadding(),         sheet,         // Roughly a third of the room the sheet has: enough to open on the field, the chips and         // the first result or two, and no more. This is a floor as much as an opening height —