From 75329867e9c06b104855175ea66d199c69334074 Mon Sep 17 00:00:00 2001 From: Kayos Date: Sun, 24 May 2026 11:12:20 -0700 Subject: [PATCH] v0.1.0-Z (vc=14): VideoDetail to YT-standard order MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Under the thumbnail: title → uploader → chips → buttons → description → Recommended → More from . The Z2/W2 inverted layout shipped in Y put discovery cards before the title — bad UX, fixed back to standard. Inline player coming next. --- buildSrc/src/main/kotlin/ProjectConfig.kt | 4 +- .../straw/feature/detail/VideoDetailScreen.kt | 71 ++++++++++--------- 2 files changed, 38 insertions(+), 37 deletions(-) diff --git a/buildSrc/src/main/kotlin/ProjectConfig.kt b/buildSrc/src/main/kotlin/ProjectConfig.kt index 3462b2837..e227098d7 100644 --- a/buildSrc/src/main/kotlin/ProjectConfig.kt +++ b/buildSrc/src/main/kotlin/ProjectConfig.kt @@ -15,6 +15,6 @@ const val NEWPIPE_APPLICATION_ID_OLD = "org.schabi.newpipe" const val NEWPIPE_APPLICATION_ID_NEW = "net.newpipe.app" // Sulkta fork — Straw -const val STRAW_VERSION_CODE = 13 -const val STRAW_VERSION_NAME = "0.1.0-Y" +const val STRAW_VERSION_CODE = 14 +const val STRAW_VERSION_NAME = "0.1.0-Z" const val STRAW_APPLICATION_ID = "com.sulkta.straw" diff --git a/strawApp/src/main/kotlin/com/sulkta/straw/feature/detail/VideoDetailScreen.kt b/strawApp/src/main/kotlin/com/sulkta/straw/feature/detail/VideoDetailScreen.kt index be0fdf8c1..74a91cd06 100644 --- a/strawApp/src/main/kotlin/com/sulkta/straw/feature/detail/VideoDetailScreen.kt +++ b/strawApp/src/main/kotlin/com/sulkta/straw/feature/detail/VideoDetailScreen.kt @@ -123,40 +123,9 @@ fun VideoDetailScreen( ) } } - Spacer(modifier = Modifier.height(20.dp)) + Spacer(modifier = Modifier.height(12.dp)) - // ── Recommended ────────────────────────────────────────── - if (d.related.isNotEmpty()) { - Text( - "Recommended", - style = MaterialTheme.typography.titleSmall, - fontWeight = FontWeight.SemiBold, - ) - Spacer(modifier = Modifier.height(8.dp)) - d.related.take(20).forEach { rel -> - RelatedRow(rel) { onOpenVideo(rel.url, rel.title) } - androidx.compose.material3.HorizontalDivider() - } - Spacer(modifier = Modifier.height(20.dp)) - } - - // ── More from ───────────────────────────────── - if (d.moreFromChannel.isNotEmpty()) { - Text( - if (d.uploader.isBlank()) "More from this channel" - else "More from ${d.uploader}", - style = MaterialTheme.typography.titleSmall, - fontWeight = FontWeight.SemiBold, - ) - Spacer(modifier = Modifier.height(8.dp)) - d.moreFromChannel.take(20).forEach { item -> - RelatedRow(item) { onOpenVideo(item.url, item.title) } - androidx.compose.material3.HorizontalDivider() - } - Spacer(modifier = Modifier.height(20.dp)) - } - - // ── Video details ──────────────────────────────────────── + // ── Title + uploader ───────────────────────────────────── Text( text = d.title, style = MaterialTheme.typography.titleLarge, @@ -174,7 +143,7 @@ fun VideoDetailScreen( ) Spacer(modifier = Modifier.height(12.dp)) - // Engagement row: views + RYD likes/dislikes + // ── Engagement row: views + RYD likes/dislikes ─────────── Row( horizontalArrangement = Arrangement.spacedBy(8.dp), verticalAlignment = Alignment.CenterVertically, @@ -222,8 +191,9 @@ fun VideoDetailScreen( Text("Download") } } - Spacer(modifier = Modifier.height(16.dp)) + Spacer(modifier = Modifier.height(20.dp)) + // ── Description ────────────────────────────────────────── Text("Description", style = MaterialTheme.typography.titleSmall, fontWeight = FontWeight.SemiBold) Spacer(modifier = Modifier.height(8.dp)) // AUD-MED: cap input length before regex passes — defends @@ -233,6 +203,37 @@ fun VideoDetailScreen( style = MaterialTheme.typography.bodySmall, ) + // ── Recommended ────────────────────────────────────────── + if (d.related.isNotEmpty()) { + Spacer(modifier = Modifier.height(24.dp)) + Text( + "Recommended", + style = MaterialTheme.typography.titleSmall, + fontWeight = FontWeight.SemiBold, + ) + Spacer(modifier = Modifier.height(8.dp)) + d.related.take(20).forEach { rel -> + RelatedRow(rel) { onOpenVideo(rel.url, rel.title) } + androidx.compose.material3.HorizontalDivider() + } + } + + // ── More from ───────────────────────────────── + if (d.moreFromChannel.isNotEmpty()) { + Spacer(modifier = Modifier.height(24.dp)) + Text( + if (d.uploader.isBlank()) "More from this channel" + else "More from ${d.uploader}", + style = MaterialTheme.typography.titleSmall, + fontWeight = FontWeight.SemiBold, + ) + Spacer(modifier = Modifier.height(8.dp)) + d.moreFromChannel.take(20).forEach { item -> + RelatedRow(item) { onOpenVideo(item.url, item.title) } + androidx.compose.material3.HorizontalDivider() + } + } + if (showDownloadDialog) { val info = state.streamInfo AlertDialog(