From 0fbb41d88a50be3bdfca39aa43e02e895059b093 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 13 May 2026 11:36:50 +0000 Subject: [PATCH 1/2] Add option to show full content in EventSection Tapping the displayed value now toggles between truncated and full content. A new showFullContent parameter controls the initial state. https://claude.ai/code/session_012o3stPCRDek8YpPhEo8y6z --- .../nostrsigner/ui/components/EventSection.kt | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/com/greenart7c3/nostrsigner/ui/components/EventSection.kt b/app/src/main/java/com/greenart7c3/nostrsigner/ui/components/EventSection.kt index 69b7eaba..197b3304 100644 --- a/app/src/main/java/com/greenart7c3/nostrsigner/ui/components/EventSection.kt +++ b/app/src/main/java/com/greenart7c3/nostrsigner/ui/components/EventSection.kt @@ -13,6 +13,10 @@ import androidx.compose.material3.Icon import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text import androidx.compose.runtime.Composable +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.remember +import androidx.compose.runtime.setValue import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.res.stringResource @@ -29,7 +33,9 @@ fun EventSection( displayValue: String, onCopy: () -> Unit, padding: Dp = 16.dp, + showFullContent: Boolean = false, ) { + var expanded by remember { mutableStateOf(showFullContent) } Row( modifier = Modifier .fillMaxWidth() @@ -45,13 +51,15 @@ fun EventSection( color = MaterialTheme.colorScheme.onSurface, ) Text( - modifier = Modifier.padding(top = 12.dp), + modifier = Modifier + .padding(top = 12.dp) + .clickable { expanded = !expanded }, text = displayValue, style = MaterialTheme.typography.bodyMedium.copy( lineHeight = 24.sp, ), - maxLines = 1, - overflow = TextOverflow.Ellipsis, + maxLines = if (expanded) Int.MAX_VALUE else 1, + overflow = if (expanded) TextOverflow.Clip else TextOverflow.Ellipsis, fontWeight = FontWeight.Bold, ) } From d3d018d1f859647e2d43801df96d64b4df078b7a Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 13 May 2026 11:51:47 +0000 Subject: [PATCH 2/2] Add option to show full content in TagsSection Tapping the tags list now toggles between the truncated 10-tag preview and the full list with all lines expanded. A new showFullContent parameter controls the initial state. https://claude.ai/code/session_012o3stPCRDek8YpPhEo8y6z --- .../nostrsigner/ui/components/TagsSection.kt | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/com/greenart7c3/nostrsigner/ui/components/TagsSection.kt b/app/src/main/java/com/greenart7c3/nostrsigner/ui/components/TagsSection.kt index 80d5cb6c..c4cd0ee7 100644 --- a/app/src/main/java/com/greenart7c3/nostrsigner/ui/components/TagsSection.kt +++ b/app/src/main/java/com/greenart7c3/nostrsigner/ui/components/TagsSection.kt @@ -13,6 +13,10 @@ import androidx.compose.material3.Icon import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text import androidx.compose.runtime.Composable +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.remember +import androidx.compose.runtime.setValue import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.res.stringResource @@ -29,9 +33,11 @@ fun TagsSection( onCopy: () -> Unit, horizontalPadding: Int = 16, verticalPadding: Int = 12, + showFullContent: Boolean = false, ) { - val tagsToShow = tags.take(10) - val moreCount = tags.size - 10 + var expanded by remember { mutableStateOf(showFullContent) } + val tagsToShow = if (expanded) tags.toList() else tags.take(10) + val moreCount = if (expanded) 0 else tags.size - 10 Row( modifier = Modifier @@ -49,7 +55,9 @@ fun TagsSection( ) if (tags.isNotEmpty()) { Column( - modifier = Modifier.padding(top = 12.dp), + modifier = Modifier + .padding(top = 12.dp) + .clickable { expanded = !expanded }, verticalArrangement = Arrangement.spacedBy(6.dp), ) { tagsToShow.forEach { tag -> @@ -61,8 +69,8 @@ fun TagsSection( style = MaterialTheme.typography.bodyMedium.copy( lineHeight = 24.sp, ), - maxLines = 1, - overflow = TextOverflow.Ellipsis, + maxLines = if (expanded) Int.MAX_VALUE else 1, + overflow = if (expanded) TextOverflow.Clip else TextOverflow.Ellipsis, fontWeight = FontWeight.Bold, ) }