From 6e94fa0be2e2bd2770aa43912de7a46e8b789b7b Mon Sep 17 00:00:00 2001 From: M57 <41645758+Hy4ri@users.noreply.github.com> Date: Mon, 14 Sep 2026 23:40:16 +0300 Subject: [PATCH] feat(kanban): render markdown in task description, summary, and comments --- .../ui/kanban/KanbanTaskScreen.kt | 29 +++++++++++++------ 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/app/src/main/java/com/m57/hermescontrol/ui/kanban/KanbanTaskScreen.kt b/app/src/main/java/com/m57/hermescontrol/ui/kanban/KanbanTaskScreen.kt index 52e7c4d3..8b6a1f08 100644 --- a/app/src/main/java/com/m57/hermescontrol/ui/kanban/KanbanTaskScreen.kt +++ b/app/src/main/java/com/m57/hermescontrol/ui/kanban/KanbanTaskScreen.kt @@ -16,6 +16,7 @@ import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.foundation.lazy.items import androidx.compose.foundation.shape.CircleShape import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.foundation.text.selection.SelectionContainer import androidx.compose.material.icons.Icons import androidx.compose.material.icons.automirrored.filled.Send import androidx.compose.material.icons.filled.ChatBubbleOutline @@ -56,6 +57,7 @@ import androidx.compose.ui.unit.dp import androidx.lifecycle.compose.collectAsStateWithLifecycle import androidx.lifecycle.viewmodel.compose.viewModel import com.m57.hermescontrol.theme.LocalHermesStatusColors +import com.m57.hermescontrol.ui.chat.MarkdownText import com.m57.hermescontrol.ui.common.ErrorState import com.m57.hermescontrol.ui.common.HermesScaffold import com.m57.hermescontrol.ui.common.NavIcon @@ -322,10 +324,12 @@ private fun TaskOverviewTab( } } } else { - Text( - text = task.body?.ifBlank { "No description provided." } ?: "No description provided.", - style = MaterialTheme.typography.bodyMedium, - ) + SelectionContainer { + MarkdownText( + text = task.body?.ifBlank { "No description provided." } ?: "No description provided.", + textColor = MaterialTheme.colorScheme.onSurface, + ) + } } } } @@ -348,10 +352,12 @@ private fun TaskOverviewTab( color = MaterialTheme.colorScheme.primary, ) Spacer(modifier = Modifier.height(6.dp)) - Text( - text = summary, - style = MaterialTheme.typography.bodyMedium, - ) + SelectionContainer { + MarkdownText( + text = summary, + textColor = MaterialTheme.colorScheme.onSurface, + ) + } } } } @@ -406,7 +412,12 @@ private fun TaskDiscussionTab( ) } Spacer(modifier = Modifier.height(4.dp)) - Text(text = comment.body, style = MaterialTheme.typography.bodySmall) + SelectionContainer { + MarkdownText( + text = comment.body, + textColor = MaterialTheme.colorScheme.onSurface, + ) + } } } }