From a0c25b0db552990d295bda818d9234d2868045fb Mon Sep 17 00:00:00 2001 From: Jacob Hagstedt Date: Sun, 18 Oct 2026 21:25:36 +0200 Subject: [PATCH] S-22 About: remove the open-source licences row (OQ-5 answered no; D-099) AboutScreen loses onOpenLicences, AboutActions its onOpenLicences, the :app call site its no-op lambda. settings_about_licences was unused in every module afterwards and is dropped from both strings.xml files and docs/ux/strings.csv. The 24 S-22 goldens are re-recorded. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01TQd3pEP9UeN2uifbHknQ7B --- .../kotlin/se/hagstedt/kvitt/nav/KvittApp.kt | 3 +- .../feature/settings/about/AboutScreen.kt | 40 ++----------------- .../src/main/res/values-sv/strings.xml | 1 - .../settings/src/main/res/values/strings.xml | 1 - docs/ux/strings.csv | 1 - 5 files changed, 5 insertions(+), 41 deletions(-) diff --git a/android/app/src/main/kotlin/se/hagstedt/kvitt/nav/KvittApp.kt b/android/app/src/main/kotlin/se/hagstedt/kvitt/nav/KvittApp.kt index bcf8e70..75578fa 100644 --- a/android/app/src/main/kotlin/se/hagstedt/kvitt/nav/KvittApp.kt +++ b/android/app/src/main/kotlin/se/hagstedt/kvitt/nav/KvittApp.kt @@ -380,8 +380,7 @@ private fun NavGraphBuilder.settings(shell: Shell, updateCheckAvailable: Boolean composable(Routes.DEVICES) { DevicesScreen(onBack = shell::back) } composable(Routes.INVITES) { InvitesScreen(onBack = shell::back) } composable(Routes.ABOUT) { - // The open-source licences screen does not exist yet (no strings for it outside :app; M8 report). - AboutScreen(onBack = shell::back, onOpenLicences = {}, updateCheckAvailable = updateCheckAvailable) + AboutScreen(onBack = shell::back, updateCheckAvailable = updateCheckAvailable) } } diff --git a/android/feature/settings/src/main/kotlin/se/hagstedt/kvitt/feature/settings/about/AboutScreen.kt b/android/feature/settings/src/main/kotlin/se/hagstedt/kvitt/feature/settings/about/AboutScreen.kt index 76ff25a..4a32642 100644 --- a/android/feature/settings/src/main/kotlin/se/hagstedt/kvitt/feature/settings/about/AboutScreen.kt +++ b/android/feature/settings/src/main/kotlin/se/hagstedt/kvitt/feature/settings/about/AboutScreen.kt @@ -1,14 +1,12 @@ package se.hagstedt.kvitt.feature.settings.about import androidx.compose.foundation.background -import androidx.compose.foundation.clickable import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth -import androidx.compose.foundation.layout.heightIn import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size import androidx.compose.foundation.rememberScrollState @@ -22,12 +20,8 @@ import androidx.compose.runtime.getValue import androidx.compose.runtime.remember import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier -import androidx.compose.ui.draw.clip import androidx.compose.ui.res.stringResource -import androidx.compose.ui.semantics.Role import androidx.compose.ui.semantics.clearAndSetSemantics -import androidx.compose.ui.semantics.contentDescription -import androidx.compose.ui.semantics.role import androidx.compose.ui.text.style.TextAlign import androidx.hilt.lifecycle.viewmodel.compose.hiltViewModel import androidx.lifecycle.compose.collectAsStateWithLifecycle @@ -41,7 +35,6 @@ import se.hagstedt.kvitt.design.component.KvittScaffold import se.hagstedt.kvitt.design.component.KvittTopAppBar import se.hagstedt.kvitt.design.component.NeedsConnectionHint import se.hagstedt.kvitt.design.component.SegmentedGroup -import se.hagstedt.kvitt.design.component.SegmentedItemScope import se.hagstedt.kvitt.design.component.TopBarNavigation import se.hagstedt.kvitt.design.component.UpdateBanner import se.hagstedt.kvitt.design.icon.KvittIcon @@ -53,23 +46,21 @@ import se.hagstedt.kvitt.core.design.R as DesignR /** * S-22 About. [updateCheckAvailable] false hides "Sök efter uppdatering" (debug builds never check, AC-16.5; `:app` - * passes its build type). [onOpenLicences] opens the open-source licences screen (`:app`). + * passes its build type). No open-source licences row (OQ-5 answered "no", D-099). */ @Composable fun AboutScreen( onBack: () -> Unit, - onOpenLicences: () -> Unit, updateCheckAvailable: Boolean, modifier: Modifier = Modifier, viewModel: AboutViewModel = hiltViewModel(), ) { val state by viewModel.state.collectAsStateWithLifecycle() - AboutContent(state, AboutActions(onBack, onOpenLicences, viewModel::check, viewModel::install, viewModel::later, viewModel::onMessageShown), updateCheckAvailable, modifier) + AboutContent(state, AboutActions(onBack, viewModel::check, viewModel::install, viewModel::later, viewModel::onMessageShown), updateCheckAvailable, modifier) } class AboutActions( val onBack: () -> Unit = {}, - val onOpenLicences: () -> Unit = {}, val onCheck: () -> Unit = {}, val onInstall: () -> Unit = {}, val onLater: () -> Unit = {}, @@ -106,11 +97,10 @@ fun AboutContent(state: AboutScreenState?, actions: AboutActions, updateCheckAva if (!state.bannerHidden && state.update !is UpdateState.None) { UpdateBanner(state.update, state.online, actions.onInstall, actions.onLater, actions.onInstall) } - SegmentedGroup(3) { item -> + SegmentedGroup(2) { item -> when (item.index) { 0 -> FactRow(item, KvittIcon.Dns, stringResource(R.string.settings_about_server), about.serverUrl) - 1 -> FactRow(item, KvittIcon.Memory, stringResource(R.string.settings_about_server_version), about.serverVersion ?: stringResource(R.string.settings_about_server_version_unknown)) - else -> LicencesRow(item, actions.onOpenLicences) + else -> FactRow(item, KvittIcon.Memory, stringResource(R.string.settings_about_server_version), about.serverVersion ?: stringResource(R.string.settings_about_server_version_unknown)) } } if (updateCheckAvailable) { @@ -132,25 +122,3 @@ fun AboutContent(state: AboutScreenState?, actions: AboutActions, updateCheckAva } } } - -/** "Licenser för öppen källkod" as a fact row with a chevron (design-spec S-22). */ -@Composable -private fun LicencesRow(item: SegmentedItemScope, onClick: () -> Unit) { - val label = stringResource(R.string.settings_about_licences) - Row( - Modifier - .fillMaxWidth() - .clip(item.shape) - .background(item.fill) - .clickable(onClick = onClick) - .clearAndSetSemantics { contentDescription = label; role = Role.Button } - .heightIn(min = KvittTheme.spacing.rowMin) - .padding(horizontal = KvittTheme.spacing.rowHorizontal, vertical = KvittTheme.spacing.rowVertical), - verticalAlignment = Alignment.CenterVertically, - horizontalArrangement = Arrangement.spacedBy(KvittTheme.spacing.rowTileGap), - ) { - KvittIconImage(KvittIcon.Description, null, tint = MaterialTheme.colorScheme.onSurfaceVariant) - Text(label, Modifier.weight(1f), style = MaterialTheme.typography.bodyLarge) - KvittIconImage(KvittIcon.ChevronRight, null, tint = MaterialTheme.colorScheme.onSurfaceVariant) - } -} diff --git a/android/feature/settings/src/main/res/values-sv/strings.xml b/android/feature/settings/src/main/res/values-sv/strings.xml index 1cdd712..8a96b1d 100644 --- a/android/feature/settings/src/main/res/values-sv/strings.xml +++ b/android/feature/settings/src/main/res/values-sv/strings.xml @@ -178,7 +178,6 @@ Serverversion Okänd - Licenser för öppen källkod %1$s arkiverades %1$s återställdes Inga diff --git a/android/feature/settings/src/main/res/values/strings.xml b/android/feature/settings/src/main/res/values/strings.xml index 4f8659d..3c4851d 100644 --- a/android/feature/settings/src/main/res/values/strings.xml +++ b/android/feature/settings/src/main/res/values/strings.xml @@ -178,7 +178,6 @@ Server version Unknown - Open-source licences %1$s was archived %1$s was restored None diff --git a/docs/ux/strings.csv b/docs/ux/strings.csv index dcc1511..569a9b7 100644 --- a/docs/ux/strings.csv +++ b/docs/ux/strings.csv @@ -569,7 +569,6 @@ settings_about_version,Kvitt %1$s (%2$d),Kvitt %1$s (%2$d),module=settings; vers settings_about_server,Server,Server,module=settings settings_about_server_version,Server version,Serverversion,module=settings; label; value from /health settings_about_server_version_unknown,Unknown,Okänd,module=settings -settings_about_licences,Open-source licences,Licenser för öppen källkod,module=settings settings_category_archived_snackbar,%1$s was archived,%1$s arkiverades,module=settings; S-15 snackbar after Arkivera; %1$s category name; M7f settings_category_unarchived_snackbar,%1$s was restored,%1$s återställdes,module=settings; S-15 snackbar after Återställ från arkiv; %1$s category name; M7f settings_recurring_summary_none,None,Inga,module=settings; S-13 recurring row subtitle without templates; M7f