From b76328fc262b79a166b6a27fcd14cb5b5bc82fc4 Mon Sep 17 00:00:00 2001 From: austinried <4966622+austinried@users.noreply.github.com> Date: Wed, 21 Oct 2026 07:30:53 +0000 Subject: [PATCH] ui: hold the offline strip to the 48dp touch target Keep the strip's own tint and the clickable row, but give it the standard minimum interactive height now that the Surface is no longer padding it invisibly. --- app/src/main/kotlin/com/subtracks/ui/library/LibraryScreen.kt | 2 ++ app/src/test/kotlin/com/subtracks/ui/LibraryScreenTest.kt | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/main/kotlin/com/subtracks/ui/library/LibraryScreen.kt b/app/src/main/kotlin/com/subtracks/ui/library/LibraryScreen.kt index 87706a11..f1cd8648 100644 --- a/app/src/main/kotlin/com/subtracks/ui/library/LibraryScreen.kt +++ b/app/src/main/kotlin/com/subtracks/ui/library/LibraryScreen.kt @@ -17,6 +17,7 @@ import androidx.compose.foundation.layout.WindowInsets import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.heightIn import androidx.compose.foundation.layout.offset import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size @@ -1025,6 +1026,7 @@ private fun OfflineStrip( modifier .fillMaxWidth() .background(lerp(headerColor, MaterialTheme.colorScheme.primary, OFFLINE_STRIP_TINT)) + .heightIn(min = 48.dp) .clickable(role = Role.Button, onClick = onGoOnline) .padding(horizontal = 16.dp, vertical = 8.dp), verticalAlignment = Alignment.CenterVertically, diff --git a/app/src/test/kotlin/com/subtracks/ui/LibraryScreenTest.kt b/app/src/test/kotlin/com/subtracks/ui/LibraryScreenTest.kt index e8f1a5ea..646d748f 100644 --- a/app/src/test/kotlin/com/subtracks/ui/LibraryScreenTest.kt +++ b/app/src/test/kotlin/com/subtracks/ui/LibraryScreenTest.kt @@ -5,7 +5,6 @@ import androidx.compose.foundation.pager.PagerState import androidx.compose.material3.MaterialTheme import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.remember -import androidx.compose.ui.test.assertHeightIsEqualTo import androidx.compose.ui.test.assertWidthIsEqualTo import androidx.compose.ui.test.junit4.v2.createAndroidComposeRule import androidx.compose.ui.test.onAllNodesWithContentDescription @@ -534,7 +533,7 @@ class LibraryScreenTest { } composeRule.waitForIdle() - composeRule.onNodeWithText(composeRule.activity.getString(R.string.offline_mode_banner)).assertHeightIsEqualTo(36.dp).performClick() + composeRule.onNodeWithText(composeRule.activity.getString(R.string.offline_mode_banner)).performClick() assertTrue("the offline strip should leave offline mode", exited) composeRule .onNodeWithContentDescription(composeRule.activity.getString(R.string.navigation_tabs_settings))