A group could be named on Android and never created
Tapping New opened the form, the name field took text, and then nothing: no member checkboxes, no Create group button, Cancel the only thing that worked. The controls were there all along, below the fold on a screen that could not scroll. The scroll exemption was deliberate and its reason had expired. It read "only the screens WITHOUT a lazy list may scroll — Contacts owns a LazyColumn, and a lazy list inside a vertically scrolling Column is measured with infinite height and crashes outright." True of an UNBOUNDED list; the buddy list has carried heightIn(max = 320.dp) since it was moved into its own card. Groups sits below it, so everything the form added fell off the bottom. Measured on a 1080x2400 emulator: the name field at y~1879, Create group past the tab bar at y~2280, and a uiautomator dump finding no scrollable container and no Create group node at all. Checked every lazy list on the screen before changing it — the buddy list is bounded, Stories is a LazyRow. Driven on the emulator afterwards: the checkbox and button are reachable, a group was created, and it arrived on iOS as "Demo Group, 2 members". Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -104,20 +104,34 @@ private fun Root(model: MessengerViewModel = viewModel()) {
|
||||
// sign-out explanation was unreadable and there was no
|
||||
// way back to another tab.
|
||||
//
|
||||
// ⚠️ Only the screens WITHOUT a lazy list may scroll.
|
||||
// Contacts owns a LazyColumn, and a lazy list inside a
|
||||
// vertically scrolling Column is measured with infinite
|
||||
// height and crashes outright.
|
||||
// 🔴 **Every screen scrolls, Contacts included.**
|
||||
//
|
||||
// This used to exempt Contacts, because "a lazy list
|
||||
// inside a vertically scrolling Column is measured with
|
||||
// infinite height and crashes outright". True — but
|
||||
// only for an UNBOUNDED lazy list, and the buddy list
|
||||
// has carried `heightIn(max = 320.dp)` since it was put
|
||||
// in its own card. The exemption outlived its reason.
|
||||
//
|
||||
// ⚠️ What it cost: Groups sits below the buddy list on
|
||||
// this screen, so opening **New group** pushed the
|
||||
// member checkboxes and the **Create group** button past
|
||||
// the bottom of a screen that could not scroll. The
|
||||
// name field was reachable and nothing else was — you
|
||||
// could type a group name and then only Cancel.
|
||||
// Measured on a 1080×2400 emulator: the field landed at
|
||||
// y≈1879, the button past the tab bar at y≈2280, and a
|
||||
// `uiautomator dump` found no scrollable container and
|
||||
// no "Create group" node at all.
|
||||
//
|
||||
// ⚠️ Before exempting a screen here again, check what is
|
||||
// BELOW the lazy list, not just the list itself. And
|
||||
// keep the buddy list bounded — remove that height and
|
||||
// this does crash.
|
||||
Column(
|
||||
modifier = Modifier
|
||||
.weight(1f)
|
||||
.then(
|
||||
if (current.screen == MessengerViewModel.Phase.Screen.CONTACTS) {
|
||||
Modifier
|
||||
} else {
|
||||
Modifier.verticalScroll(rememberScrollState())
|
||||
}
|
||||
),
|
||||
.verticalScroll(rememberScrollState()),
|
||||
verticalArrangement = Arrangement.spacedBy(12.dp),
|
||||
) {
|
||||
when (current.screen) {
|
||||
|
||||
Reference in New Issue
Block a user