Modern Apps git

← Modern-Apps.git

office: preview tab chrome; appstore: fix updates version

Commit
4c092bf6988752c54d7129964ac9242a47d4b37f
Author
vayun-mathur <[email protected]>
When
2026-10-25 20:20 UTC (1 month ago)
Parents
28328e4

Diff

appstore/src/screenshotTest/kotlin/com/vayunmathur/appstore/ui/MetadataPreviews.kt
diff --git a/appstore/src/screenshotTest/kotlin/com/vayunmathur/appstore/ui/MetadataPreviews.kt b/appstore/src/screenshotTest/kotlin/com/vayunmathur/appstore/ui/MetadataPreviews.ktindex f1130d7bcf..4cc679f159 100644--- a/appstore/src/screenshotTest/kotlin/com/vayunmathur/appstore/ui/MetadataPreviews.kt+++ b/appstore/src/screenshotTest/kotlin/com/vayunmathur/appstore/ui/MetadataPreviews.kt@@ -228,7 +228,9 @@ private fun SearchContent() { private fun UpdatesContent() {     UpdatesScreen(         state = UpdatesUiState(-            updates = listOf(AEGIS),+            updates = listOf(+                AEGIS.copy(versionName = "3.4.1", versionCode = 341),+            ),             installedIcons = ICONS,             installedInfos = mapOf(                 "com.beemdevelopment.aegis" to InstalledInfo(
metadata_data/photos/appstore/phone/5.png
diff --git a/metadata_data/photos/appstore/phone/5.png b/metadata_data/photos/appstore/phone/5.pngindex c81c00602e..01a009688f 100644Binary files a/metadata_data/photos/appstore/phone/5.png and b/metadata_data/photos/appstore/phone/5.png differ
metadata_data/photos/office/phone/4.png
diff --git a/metadata_data/photos/office/phone/4.png b/metadata_data/photos/office/phone/4.pngindex 3f5ff7bbf3..929d327d30 100644Binary files a/metadata_data/photos/office/phone/4.png and b/metadata_data/photos/office/phone/4.png differ
office/src/screenshotTest/kotlin/com/vayunmathur/office/ui/MetadataPreviews.kt
diff --git a/office/src/screenshotTest/kotlin/com/vayunmathur/office/ui/MetadataPreviews.kt b/office/src/screenshotTest/kotlin/com/vayunmathur/office/ui/MetadataPreviews.ktindex 751888bde4..612a0e72d2 100644--- a/office/src/screenshotTest/kotlin/com/vayunmathur/office/ui/MetadataPreviews.kt+++ b/office/src/screenshotTest/kotlin/com/vayunmathur/office/ui/MetadataPreviews.kt@@ -1,12 +1,19 @@ package com.vayunmathur.office.ui +import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.fillMaxSize+import androidx.compose.foundation.pager.rememberPagerState import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.tooling.preview.Preview import com.android.tools.screenshot.PreviewTest import com.vayunmathur.library.ui.DynamicTheme+import com.vayunmathur.library.ui.IconDownload+import com.vayunmathur.library.ui.IconHome+import com.vayunmathur.library.ui.PagerTab+import com.vayunmathur.library.ui.TabStyle+import com.vayunmathur.library.ui.TabbedPagerScaffold import com.vayunmathur.library.ui.MaterialTheme import com.vayunmathur.library.ui.Surface import com.vayunmathur.library.ui.odf.OdfCell@@ -228,9 +235,7 @@ class MetadataPreviews {     @Preview(name = "4-home", device = PHONE, group = "phone", showSystemUi = true)     @Composable     fun Preview4Home() {-        DynamicTheme(darkTheme = true) {-            HomeScreen()-        }+        ChromePreview()     }      @PreviewTest@@ -245,3 +250,24 @@ class MetadataPreviews {         }     } }++/**+ * The app's real tab chrome around the home content: the same [TabbedPagerScaffold]+ * with the same Offline/Online tabs the home host declares. The Online tab is+ * ViewModel-coupled, so it shows an empty page (never visible — the shot stays on+ * Offline); Offline is the real stateless [HomeScreen].+ */+@Composable+private fun ChromePreview() {+    DynamicTheme(darkTheme = true) {+        val tabs = listOf(+            PagerTab("Offline", { IconHome() }) { HomeScreen() },+            PagerTab("Online", { IconDownload() }) { Box(Modifier.fillMaxSize()) },+        )+        TabbedPagerScaffold(+            tabs = tabs,+            pagerState = rememberPagerState(initialPage = 0, pageCount = { tabs.size }),+            tabStyle = TabStyle.BottomNav,+        )+    }+}