From 2da0ddc126013d70ef902bb3b72caa6bb40ec41b Mon Sep 17 00:00:00 2001 From: Pauljd Date: Thu, 5 Nov 2026 15:19:07 +0000 Subject: [PATCH] Director's Chair: each column scrolls with the focus Worth a look holds the Premiere proposals as well as the picks now, and ran off the bottom with no way down. Each column scrolls on its own, following the focus; the footer line stays in view. Co-Authored-By: Claude Opus 5.5 (1M context) --- .../src/main/java/tv/orbit/classic/DirectorChair.kt | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/android/app/src/main/java/tv/orbit/classic/DirectorChair.kt b/android/app/src/main/java/tv/orbit/classic/DirectorChair.kt index 294d1e5..ef98aff 100644 --- a/android/app/src/main/java/tv/orbit/classic/DirectorChair.kt +++ b/android/app/src/main/java/tv/orbit/classic/DirectorChair.kt @@ -4,6 +4,8 @@ import androidx.compose.foundation.background import androidx.compose.foundation.border import androidx.compose.foundation.clickable import androidx.compose.foundation.focusable +import androidx.compose.foundation.rememberScrollState +import androidx.compose.foundation.verticalScroll import androidx.compose.foundation.layout.* import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.runtime.* @@ -340,8 +342,9 @@ internal fun DirectorChair(load: (DirectorMode) -> DeskReport?, first: FocusRequ } val r = report if (r == null) { Text("Working out this week's report. The first time takes a little while; after that the Chair opens straight away.", color = Muted, fontSize = 12.sp); return@Column } - Row(Modifier.fillMaxWidth(), horizontalArrangement = Arrangement.spacedBy(10.dp)) { - Column(Modifier.weight(.9f).background(ChairPanel, RoundedCornerShape(8.dp)).padding(10.dp), verticalArrangement = Arrangement.spacedBy(3.dp)) { + // Each column scrolls on its own, following the focus, so nothing sits below the screen out of reach. + Row(Modifier.fillMaxWidth().weight(1f), horizontalArrangement = Arrangement.spacedBy(10.dp)) { + Column(Modifier.weight(.9f).verticalScroll(rememberScrollState()).background(ChairPanel, RoundedCornerShape(8.dp)).padding(10.dp), verticalArrangement = Arrangement.spacedBy(3.dp)) { Text("THIS WEEK", color = Color.White, fontFamily = Anton, fontSize = 14.sp) Text("${r.newlyReleased} newly released", color = ChairGold, fontSize = 15.sp, fontWeight = FontWeight.SemiBold) Text("${r.newToLibrary} new to the library (14 days)", color = Color.White, fontSize = 11.sp) @@ -356,7 +359,7 @@ internal fun DirectorChair(load: (DirectorMode) -> DeskReport?, first: FocusRequ "library list still importing".takeIf { !r.catalogueComplete }) Text(if (gaps.isEmpty()) "Scan complete: ${r.scanned} read, ${r.franchises} franchise collections" else "Scan: " + gaps.joinToString("; "), color = if (gaps.isEmpty()) Muted else ChairGold, fontSize = 10.sp) } - Column(Modifier.weight(1.3f), verticalArrangement = Arrangement.spacedBy(5.dp)) { + Column(Modifier.weight(1.3f).verticalScroll(rememberScrollState()), verticalArrangement = Arrangement.spacedBy(5.dp)) { Text("WORTH A LOOK", color = Color.White, fontFamily = Anton, fontSize = 14.sp) // Orbit Premiere's proposals, at most three a week, apart from the channel picks. r.premieres.filter { it.id !in decided }.forEach { p -> @@ -372,7 +375,7 @@ internal fun DirectorChair(load: (DirectorMode) -> DeskReport?, first: FocusRequ picks.forEach { p -> ChairCard(p.tag, p.title, p.channel.uppercase(java.util.Locale.UK) + if (p.firstRun != null) " ยท PREMIERE FIRST" else "", p.line, onClick = { open = ChairChoice(p.title, p.id, p.type, p.year, p.tag, p.line, p.options, false, p.firstRun) }.takeIf { p.options.isNotEmpty() && p.id.isNotEmpty() }) } } - Column(Modifier.weight(1f), verticalArrangement = Arrangement.spacedBy(5.dp)) { + Column(Modifier.weight(1f).verticalScroll(rememberScrollState()), verticalArrangement = Arrangement.spacedBy(5.dp)) { Text("NEEDS YOUR EYE", color = Color.White, fontFamily = Anton, fontSize = 14.sp) val asks = r.asks.filter { it.id !in decided } if (asks.isEmpty()) Text("No either-or calls this week.", color = Muted, fontSize = 12.sp)