From f502b09b55a3e952eaaff9145a1028c3d8ca8719 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 28 Jun 2026 15:57:52 +0000 Subject: [PATCH] feat: rename See more/less to Show/Hide Event and make JSON scrollable The raw event JSON toggle in the signer consent dialog is now labeled "Show Event" / "Hide Event" instead of the generic "See more" / "See less". The expanded JSON block also gains horizontal scroll (softWrap=false + horizontalScroll) so wide event JSON doesn't get clipped on narrow screens. Co-Authored-By: Claude Sonnet 4.6 Claude-Session: https://claude.ai/code/session_013hTFpoExYYLYEGGtXBx6ZT --- .../napplet/NappletSignerConsentActivity.kt | 27 +++++++++++-------- amethyst/src/main/res/values/strings.xml | 4 +-- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/napplet/NappletSignerConsentActivity.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/napplet/NappletSignerConsentActivity.kt index 8dd8ed0e88..6fa8bad403 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/napplet/NappletSignerConsentActivity.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/napplet/NappletSignerConsentActivity.kt @@ -23,7 +23,9 @@ package com.vitorpamplona.amethyst.napplet import android.os.Bundle import androidx.activity.ComponentActivity import androidx.activity.compose.setContent +import androidx.compose.foundation.horizontalScroll import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.PaddingValues import androidx.compose.foundation.layout.Row @@ -194,15 +196,18 @@ private fun NappletSignerConsentDialog( if (info.rawData.isNotBlank()) { if (showRawData) { Spacer(Modifier.height(8.dp)) - SelectionContainer { - Text( - info.rawData, - style = - MaterialTheme.typography.labelSmall.copy( - fontFamily = FontFamily.Monospace, - ), - color = MaterialTheme.colorScheme.onSurfaceVariant, - ) + Box(modifier = Modifier.horizontalScroll(rememberScrollState())) { + SelectionContainer { + Text( + info.rawData, + style = + MaterialTheme.typography.labelSmall.copy( + fontFamily = FontFamily.Monospace, + ), + color = MaterialTheme.colorScheme.onSurfaceVariant, + softWrap = false, + ) + } } } TextButton( @@ -211,9 +216,9 @@ private fun NappletSignerConsentDialog( ) { Text( if (showRawData) { - stringResource(R.string.napplet_consent_see_less) + stringResource(R.string.napplet_consent_hide_event) } else { - stringResource(R.string.napplet_consent_see_more) + stringResource(R.string.napplet_consent_show_event) }, style = MaterialTheme.typography.labelSmall, ) diff --git a/amethyst/src/main/res/values/strings.xml b/amethyst/src/main/res/values/strings.xml index 550b192ae1..b562d09f2e 100644 --- a/amethyst/src/main/res/values/strings.xml +++ b/amethyst/src/main/res/values/strings.xml @@ -769,8 +769,8 @@ wants to %1$s - See more - See less + Show Event + Hide Event More options Fewer options Allow once