From 5e4250bfbce588487e6a9d2c633de2293fb95706 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 22 Jun 2026 22:26:47 +0000 Subject: [PATCH] fix(napplets): expand the "what it can access" section straight down, not from the left MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The disclosure used AnimatedVisibility's default transition and the inner servers Column didn't fill width, so the section faded/expanded while the server list also grew in horizontally from the left — an inconsistent, weird effect. Make the transition explicit (fade + expandVertically/shrinkVertically anchored at Top, so it opens/closes straight down like the card) and fill width on the servers column so nothing slides in sideways. Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_016ncMHuBBVHEf7spAoSssde --- .../amethyst/commons/ui/note/StaticWebsiteCard.kt | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/ui/note/StaticWebsiteCard.kt b/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/ui/note/StaticWebsiteCard.kt index 0680732b87..ee5be8d646 100644 --- a/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/ui/note/StaticWebsiteCard.kt +++ b/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/ui/note/StaticWebsiteCard.kt @@ -21,6 +21,10 @@ package com.vitorpamplona.amethyst.commons.ui.note import androidx.compose.animation.AnimatedVisibility +import androidx.compose.animation.expandVertically +import androidx.compose.animation.fadeIn +import androidx.compose.animation.fadeOut +import androidx.compose.animation.shrinkVertically import androidx.compose.foundation.background import androidx.compose.foundation.border import androidx.compose.foundation.clickable @@ -213,7 +217,13 @@ private fun DetailsDisclosure( ) } - AnimatedVisibility(visible = expanded) { + AnimatedVisibility( + visible = expanded, + // Expand/collapse straight down from the top (matching the card) with a fade — never a + // sideways slide. Each child fills width so nothing grows in from the left as it lays out. + enter = fadeIn() + expandVertically(expandFrom = Alignment.Top), + exit = shrinkVertically(shrinkTowards = Alignment.Top) + fadeOut(), + ) { Column( modifier = Modifier.fillMaxWidth().padding(top = 6.dp), verticalArrangement = Arrangement.spacedBy(8.dp), @@ -239,7 +249,7 @@ private fun DetailsDisclosure( } if (servers.isNotEmpty()) { - Column(verticalArrangement = Arrangement.spacedBy(2.dp)) { + Column(Modifier.fillMaxWidth(), verticalArrangement = Arrangement.spacedBy(2.dp)) { Text( text = stringResource(Res.string.nsite_servers), style = MaterialTheme.typography.labelMedium,