From f5e91470840ab7673bcf07a8d691fdf7bdc00ad5 Mon Sep 17 00:00:00 2001 From: Nelson Osacky Date: Tue, 30 Sep 2025 08:23:59 +0200 Subject: [PATCH 1/2] Enable text selection in iOS comments MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add .textSelection(.enabled) modifier to comment text to allow users to select and copy comment content in the iOS app. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- ios/HackerNews/Comments/CommentRow.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/ios/HackerNews/Comments/CommentRow.swift b/ios/HackerNews/Comments/CommentRow.swift index d15f87eb..50c04f96 100644 --- a/ios/HackerNews/Comments/CommentRow.swift +++ b/ios/HackerNews/Comments/CommentRow.swift @@ -88,6 +88,7 @@ struct CommentRow: View { Text(state.text.formattedHTML()) .font(theme.commentTextFont) .tint(.accentColor) + .textSelection(.enabled) } .frame(maxWidth: .infinity, alignment: .leading) .padding(EdgeInsets(top: -3, leading: 8, bottom: 8, trailing: 8)) From eb0feac5250dba9f43dda21dd53f3f40b3f1039d Mon Sep 17 00:00:00 2001 From: Nelson Osacky Date: Tue, 30 Sep 2025 10:03:09 +0200 Subject: [PATCH 2/2] Enable text selection in Android comments MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .../features/comments/components/CommentRow.kt | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/android/app/src/main/java/com/emergetools/hackernews/features/comments/components/CommentRow.kt b/android/app/src/main/java/com/emergetools/hackernews/features/comments/components/CommentRow.kt index 49d14b43..174d6f16 100644 --- a/android/app/src/main/java/com/emergetools/hackernews/features/comments/components/CommentRow.kt +++ b/android/app/src/main/java/com/emergetools/hackernews/features/comments/components/CommentRow.kt @@ -9,6 +9,7 @@ import androidx.compose.animation.core.tween import androidx.compose.foundation.background import androidx.compose.foundation.clickable import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.text.selection.SelectionContainer import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Row @@ -126,12 +127,14 @@ fun CommentRow( } } if (state.hidden == HiddenStatus.Displayed) { - Text( - text = state.content.parseAsHtml(), - style = MaterialTheme.typography.labelSmall, - fontWeight = FontWeight.Normal, - color = MaterialTheme.colorScheme.onSurface, - ) + SelectionContainer { + Text( + text = state.content.parseAsHtml(), + style = MaterialTheme.typography.labelSmall, + fontWeight = FontWeight.Normal, + color = MaterialTheme.colorScheme.onSurface, + ) + } } } }