From 6fcbecb293379f1d79099f6ee7b6c751fe8ca71c Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 13 Jun 2026 14:48:50 +0000 Subject: [PATCH] fix: make notify chip row spacing match horizontal spacing Chips render through a selectable Surface that enforces a 48dp minimum touch target, inflating each chip's measured height above its visible 32dp pill. That invisible padding dominated the gap between wrapped rows, so the previous verticalArrangement bump was imperceptible. Disable the minimum interactive size around the chips so they measure at their visible height and the row spacing matches the 6dp horizontal spacing. --- .../ui/note/creators/notify/Notifying.kt | 21 ++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/creators/notify/Notifying.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/creators/notify/Notifying.kt index e720ef6f27..64f1d09337 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/creators/notify/Notifying.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/creators/notify/Notifying.kt @@ -29,12 +29,15 @@ import androidx.compose.material3.AssistChip import androidx.compose.material3.AssistChipDefaults import androidx.compose.material3.InputChip import androidx.compose.material3.InputChipDefaults +import androidx.compose.material3.LocalMinimumInteractiveComponentSize import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text import androidx.compose.runtime.Composable +import androidx.compose.runtime.CompositionLocalProvider import androidx.compose.ui.Alignment.Companion.CenterVertically import androidx.compose.ui.Modifier import androidx.compose.ui.text.font.FontWeight +import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.dp import com.vitorpamplona.amethyst.R import com.vitorpamplona.amethyst.commons.icons.symbols.Icon @@ -72,12 +75,20 @@ fun Notifying( modifier = Modifier.align(CenterVertically), ) - mentions?.forEach { user -> - NotifyUserChip(user, accountViewModel) { onClick(user) } - } + // The chips render through a selectable Surface that enforces a 48dp minimum + // touch target, inflating each chip's measured height well above its visible + // 32dp pill. That invisible padding would dominate the gap between wrapped + // rows and make verticalArrangement barely noticeable. Disabling the minimum + // interactive size lets the chips measure at their visible height so the row + // spacing matches the horizontal spacing between chips. + CompositionLocalProvider(LocalMinimumInteractiveComponentSize provides Dp.Unspecified) { + mentions?.forEach { user -> + NotifyUserChip(user, accountViewModel) { onClick(user) } + } - if (onAddUser != null) { - AddUserChip(onAddUser) + if (onAddUser != null) { + AddUserChip(onAddUser) + } } } }