From b0de4fdd95c6354badd17fdcaf4f570c647e6c54 Mon Sep 17 00:00:00 2001 From: mariiapanasetskaia Date: Wed, 2 Sep 2026 15:13:46 +0200 Subject: [PATCH 1/4] use button title --- .../hedvig/android/data/contract/CrossSell.kt | 2 +- .../QueryBottomSheetCrossSells.graphql | 1 + .../sell/sheet/CrossSellSheetViewModel.kt | 1 + .../src/main/graphql/QueryHome.graphql | 1 + .../home/home/data/GetHomeDataUseCase.kt | 1 + .../home/home/data/GetHomeDataUseCaseDemo.kt | 2 + .../feature/home/home/ui/HomeDestination.kt | 3 +- .../data/GetCrossSellsUseCaseDemo.kt | 4 + .../insurance/InsuranceDestination.kt | 6 +- .../src/main/graphql/OnboardingQuery.graphql | 1 + .../feature/onboarding/data/OnboardingData.kt | 1 + .../onboarding/data/OnboardingRepository.kt | 1 + .../ui/bundle/OnboardingBundleDestination.kt | 7 +- .../hedvig/android/crosssells/CrossSells.kt | 86 +++++++++++-------- 14 files changed, 74 insertions(+), 43 deletions(-) diff --git a/app/data/data-contract/src/commonMain/kotlin/com/hedvig/android/data/contract/CrossSell.kt b/app/data/data-contract/src/commonMain/kotlin/com/hedvig/android/data/contract/CrossSell.kt index 403a7f10ab..fbae0d2c76 100644 --- a/app/data/data-contract/src/commonMain/kotlin/com/hedvig/android/data/contract/CrossSell.kt +++ b/app/data/data-contract/src/commonMain/kotlin/com/hedvig/android/data/contract/CrossSell.kt @@ -13,7 +13,7 @@ data class CrossSell( val storeUrl: String, val pillowImageSmall: ImageAsset, val pillowImageLarge: ImageAsset, - val buttonText: String? = null, // todo!! + val buttonText: String ) data class ImageAsset( diff --git a/app/feature/feature-cross-sell-sheet/src/main/graphql/QueryBottomSheetCrossSells.graphql b/app/feature/feature-cross-sell-sheet/src/main/graphql/QueryBottomSheetCrossSells.graphql index ef28cbf869..8c0a4e9e17 100644 --- a/app/feature/feature-cross-sell-sheet/src/main/graphql/QueryBottomSheetCrossSells.graphql +++ b/app/feature/feature-cross-sell-sheet/src/main/graphql/QueryBottomSheetCrossSells.graphql @@ -47,6 +47,7 @@ fragment CrossSellFragment on CrossSell { title description storeUrl + buttonTitle pillowImageSmall { src id diff --git a/app/feature/feature-cross-sell-sheet/src/main/kotlin/com/hedvig/android/feature/cross/sell/sheet/CrossSellSheetViewModel.kt b/app/feature/feature-cross-sell-sheet/src/main/kotlin/com/hedvig/android/feature/cross/sell/sheet/CrossSellSheetViewModel.kt index 025d3cfa0a..aaa2e4d530 100644 --- a/app/feature/feature-cross-sell-sheet/src/main/kotlin/com/hedvig/android/feature/cross/sell/sheet/CrossSellSheetViewModel.kt +++ b/app/feature/feature-cross-sell-sheet/src/main/kotlin/com/hedvig/android/feature/cross/sell/sheet/CrossSellSheetViewModel.kt @@ -229,6 +229,7 @@ internal fun CrossSellFragment.toCrossSell(): CrossSell { src = pillowImageLarge.src, description = pillowImageLarge.alt, ), + buttonText = this.buttonTitle, ) } } diff --git a/app/feature/feature-home/src/main/graphql/QueryHome.graphql b/app/feature/feature-home/src/main/graphql/QueryHome.graphql index 4dbed4558a..c738b8364a 100644 --- a/app/feature/feature-home/src/main/graphql/QueryHome.graphql +++ b/app/feature/feature-home/src/main/graphql/QueryHome.graphql @@ -127,6 +127,7 @@ fragment HomeCrossSellFragment on CrossSell { title description storeUrl + buttonTitle pillowImageSmall { src id diff --git a/app/feature/feature-home/src/main/kotlin/com/hedvig/android/feature/home/home/data/GetHomeDataUseCase.kt b/app/feature/feature-home/src/main/kotlin/com/hedvig/android/feature/home/home/data/GetHomeDataUseCase.kt index 1c3993b0a6..3710dc5ac8 100644 --- a/app/feature/feature-home/src/main/kotlin/com/hedvig/android/feature/home/home/data/GetHomeDataUseCase.kt +++ b/app/feature/feature-home/src/main/kotlin/com/hedvig/android/feature/home/home/data/GetHomeDataUseCase.kt @@ -312,6 +312,7 @@ internal class GetHomeDataUseCaseImpl( src = pillowImageLarge.src, description = pillowImageLarge.alt, ), + buttonText = this.buttonTitle, ) } } diff --git a/app/feature/feature-home/src/main/kotlin/com/hedvig/android/feature/home/home/data/GetHomeDataUseCaseDemo.kt b/app/feature/feature-home/src/main/kotlin/com/hedvig/android/feature/home/home/data/GetHomeDataUseCaseDemo.kt index 87a2c229be..c572e246f5 100644 --- a/app/feature/feature-home/src/main/kotlin/com/hedvig/android/feature/home/home/data/GetHomeDataUseCaseDemo.kt +++ b/app/feature/feature-home/src/main/kotlin/com/hedvig/android/feature/home/home/data/GetHomeDataUseCaseDemo.kt @@ -34,6 +34,7 @@ private val demoCarCrossSell = CrossSell( "", ImageAsset("", "", ""), ImageAsset("", "", ""), + buttonText = "See price", ) private val demoPetCrossSell = CrossSell( @@ -43,6 +44,7 @@ private val demoPetCrossSell = CrossSell( "", ImageAsset("", "", ""), ImageAsset("", "", ""), + buttonText = "See price", ) private val demoHomeData = HomeData( diff --git a/app/feature/feature-home/src/main/kotlin/com/hedvig/android/feature/home/home/ui/HomeDestination.kt b/app/feature/feature-home/src/main/kotlin/com/hedvig/android/feature/home/home/ui/HomeDestination.kt index 5f337228cc..9dc904ec75 100644 --- a/app/feature/feature-home/src/main/kotlin/com/hedvig/android/feature/home/home/ui/HomeDestination.kt +++ b/app/feature/feature-home/src/main/kotlin/com/hedvig/android/feature/home/home/ui/HomeDestination.kt @@ -1556,7 +1556,6 @@ private fun DiscoverInsurancesSection( modifier = Modifier.padding(horizontal = 16.dp), onSheetDismissed = {}, imageLoader = imageLoader, - buttonText = stringResource(string.HOME_DISCOVER_SEE_PRICE_BUTTON), buttonSize = ButtonSize.Small, buttonShape = HedvigTheme.shapes.cornerFull, ) @@ -1692,6 +1691,7 @@ private fun PreviewHomeScreen( "", ImageAsset("", "", ""), ImageAsset("", "", ""), + buttonText = "See price" ), bannerText = "50% discount the first year", discountText = "-50%", @@ -1708,6 +1708,7 @@ private fun PreviewHomeScreen( "", ImageAsset("", "", ""), ImageAsset("", "", ""), + buttonText = "See price" ), ), recommendedAddon = null, diff --git a/app/feature/feature-insurances/src/main/kotlin/com/hedvig/android/feature/insurances/data/GetCrossSellsUseCaseDemo.kt b/app/feature/feature-insurances/src/main/kotlin/com/hedvig/android/feature/insurances/data/GetCrossSellsUseCaseDemo.kt index 5410950d54..5aa65c8665 100644 --- a/app/feature/feature-insurances/src/main/kotlin/com/hedvig/android/feature/insurances/data/GetCrossSellsUseCaseDemo.kt +++ b/app/feature/feature-insurances/src/main/kotlin/com/hedvig/android/feature/insurances/data/GetCrossSellsUseCaseDemo.kt @@ -24,6 +24,7 @@ internal class GetCrossSellsUseCaseDemo : GetCrossSellsUseCase { "", ImageAsset("", "", ""), ImageAsset("", "", ""), + buttonText = "button", ), CrossSell( "2", @@ -32,6 +33,7 @@ internal class GetCrossSellsUseCaseDemo : GetCrossSellsUseCase { "", ImageAsset("", "", ""), ImageAsset("", "", ""), + buttonText = "button", ), CrossSell( "3", @@ -40,6 +42,7 @@ internal class GetCrossSellsUseCaseDemo : GetCrossSellsUseCase { "", ImageAsset("", "", ""), ImageAsset("", "", ""), + buttonText = "button", ), CrossSell( "4", @@ -48,6 +51,7 @@ internal class GetCrossSellsUseCaseDemo : GetCrossSellsUseCase { "", ImageAsset("", "", ""), ImageAsset("", "", ""), + buttonText = "button", ), ), ) diff --git a/app/feature/feature-insurances/src/main/kotlin/com/hedvig/android/feature/insurances/insurance/InsuranceDestination.kt b/app/feature/feature-insurances/src/main/kotlin/com/hedvig/android/feature/insurances/insurance/InsuranceDestination.kt index 9390b1127e..33972876f2 100644 --- a/app/feature/feature-insurances/src/main/kotlin/com/hedvig/android/feature/insurances/insurance/InsuranceDestination.kt +++ b/app/feature/feature-insurances/src/main/kotlin/com/hedvig/android/feature/insurances/insurance/InsuranceDestination.kt @@ -38,8 +38,6 @@ import androidx.compose.ui.layout.SubcomposeLayout import androidx.compose.ui.platform.LocalDensity import androidx.compose.ui.semantics.Role import androidx.compose.ui.semantics.heading -import androidx.compose.ui.semantics.onClick -import androidx.compose.ui.semantics.role import androidx.compose.ui.semantics.semantics import androidx.compose.ui.tooling.preview.PreviewParameter import androidx.compose.ui.tooling.preview.datasource.CollectionPreviewParameterProvider @@ -530,6 +528,7 @@ private fun PreviewInsuranceScreen( storeUrl = "", ImageAsset("", "", ""), ImageAsset("", "", ""), + buttonText = "button", ) }, quantityOfCancelledInsurances = 1, @@ -622,6 +621,7 @@ private class InsuranceUiStateProvider : CollectionPreviewParameterProvider "${item.title} - ${item.subtitle}" } val description = "$dataDescription; " + pluralStringResource( - Res.plurals.A11Y_NUMBER_OF_ELIGIBLE_INSURANCES, + plurals.A11Y_NUMBER_OF_ELIGIBLE_INSURANCES, recommendedCrossSell.bundleProgress.numberOfEligibleContracts, recommendedCrossSell.bundleProgress.numberOfEligibleContracts, ) @@ -504,7 +511,7 @@ private fun RecommendationSection( onCrossSellClick(recommendedCrossSell.crossSell.storeUrl) dismissSheet() }, - onClickLabel = stringResource(Res.string.TALKBACK_OPEN_EXTERNAL_LINK), + onClickLabel = stringResource(string.TALKBACK_OPEN_EXTERNAL_LINK), enabled = true, modifier = Modifier .fillMaxWidth() @@ -561,8 +568,8 @@ private fun StackedPillows(recommendedCrossSell: RecommendedCrossSell, imageLoad if (recommendedCrossSell.discountText != null) { HighlightLabel( labelText = recommendedCrossSell.discountText, - size = HighlightLabelDefaults.HighLightSize.Small, - color = HighlightLabelDefaults.HighlightColor.Green(HighlightLabelDefaults.HighlightShade.LIGHT), + size = Small, + color = Green(HighlightShade.LIGHT), modifier = Modifier .align(Alignment.TopEnd) .padding(top = 16.dp), @@ -587,16 +594,16 @@ private fun StackedPillows(recommendedCrossSell: RecommendedCrossSell, imageLoad @Composable private fun getHedvigStepProgressData(bundleProgress: BundleProgress): List { - val firstStepTitle = stringResource(Res.string.BUNDLE_DISCOUNT_PROGRESS_SEGMENT_TITLE_ONE_INSURANCE) - val firstStepSubtitle = stringResource(Res.string.BUNDLE_DISCOUNT_PROGRESS_SEGMENT_SUBTITLE_NO_DISCOUNT) + val firstStepTitle = stringResource(string.BUNDLE_DISCOUNT_PROGRESS_SEGMENT_TITLE_ONE_INSURANCE) + val firstStepSubtitle = stringResource(string.BUNDLE_DISCOUNT_PROGRESS_SEGMENT_SUBTITLE_NO_DISCOUNT) val stepOne = StepProgressItem(firstStepTitle, firstStepSubtitle) - val secondStepTitle = stringResource(Res.string.BUNDLE_DISCOUNT_PROGRESS_SEGMENT_TITLE_TWO_INSURANCES) + val secondStepTitle = stringResource(string.BUNDLE_DISCOUNT_PROGRESS_SEGMENT_TITLE_TWO_INSURANCES) val secondStepSubtitle = stringResource( - Res.string.BUNDLE_DISCOUNT_PROGRESS_SEGMENT_SUBTITLE_CURRENT_APPLIED_DISCOUNT, + string.BUNDLE_DISCOUNT_PROGRESS_SEGMENT_SUBTITLE_CURRENT_APPLIED_DISCOUNT, "${bundleProgress.discountPercent}%", ) val stepTwo = StepProgressItem(secondStepTitle, secondStepSubtitle) - val thirdStepTitle = stringResource(Res.string.BUNDLE_DISCOUNT_PROGRESS_SEGMENT_TITLE_THREE_OR_MORE) + val thirdStepTitle = stringResource(string.BUNDLE_DISCOUNT_PROGRESS_SEGMENT_TITLE_THREE_OR_MORE) val stepThree = StepProgressItem(thirdStepTitle, secondStepSubtitle) return listOf(stepOne, stepTwo, stepThree) } @@ -611,8 +618,7 @@ fun CrossSellsSection( withSubHeader: Boolean = true, hasCrossSellDiscounts: Boolean = false, title: String? = null, - buttonText: String? = null, - buttonSize: ButtonDefaults.ButtonSize = ButtonDefaults.ButtonSize.Medium, + buttonSize: ButtonSize = ButtonSize.Medium, buttonShape: Shape? = null, ) { Column(modifier) { @@ -630,7 +636,7 @@ fun CrossSellsSection( imageLoader = imageLoader, crossSellImageAsset = crossSell.pillowImageSmall, onSheetDismissed = onSheetDismissed, - buttonText = crossSell.buttonText ?: buttonText, + buttonText = crossSell.buttonText, buttonSize = buttonSize, buttonShape = buttonShape, ) @@ -640,7 +646,6 @@ fun CrossSellsSection( onCrossSellClick, onSheetDismissed = onSheetDismissed, imageLoader = imageLoader, - buttonText = buttonText, buttonSize = buttonSize, buttonShape = buttonShape, ) @@ -666,6 +671,7 @@ fun CrossSellItemPlaceholder(imageLoader: ImageLoader, modifier: Modifier = Modi isLoading = true, modifier = Modifier, onSheetDismissed = {}, + buttonText = "button" ) } } @@ -674,7 +680,7 @@ fun CrossSellItemPlaceholder(imageLoader: ImageLoader, modifier: Modifier = Modi private fun CrossSellsSubHeaderWithDivider(title: String? = null) { Column { NotificationSubheading( - text = title ?: stringResource(Res.string.insurance_tab_cross_sells_title), + text = title ?: stringResource(string.insurance_tab_cross_sells_title), modifier = Modifier.semantics { heading() }, ) Spacer(Modifier.height(16.dp)) @@ -688,8 +694,7 @@ private fun CrossSellItem( onSheetDismissed: () -> Unit, imageLoader: ImageLoader, modifier: Modifier = Modifier, - buttonText: String? = null, - buttonSize: ButtonDefaults.ButtonSize = ButtonDefaults.ButtonSize.Medium, + buttonSize: ButtonSize = ButtonSize.Medium, buttonShape: Shape? = null, ) { CrossSellItem( @@ -702,9 +707,9 @@ private fun CrossSellItem( imageLoader = imageLoader, crossSellImageAsset = crossSell.pillowImageSmall, onSheetDismissed = onSheetDismissed, - buttonText = buttonText, buttonSize = buttonSize, buttonShape = buttonShape, + buttonText = crossSell.buttonText ) } @@ -718,22 +723,22 @@ private fun CrossSellItem( isLoading: Boolean, imageLoader: ImageLoader, onSheetDismissed: () -> Unit, + buttonText: String, modifier: Modifier = Modifier, - buttonText: String? = null, - buttonSize: ButtonDefaults.ButtonSize = ButtonDefaults.ButtonSize.Medium, + buttonSize: ButtonSize = ButtonSize.Medium, buttonShape: Shape? = null, ) { PillowRow( title = crossSellTitle, subtitle = crossSellSubtitle, pillowImage = crossSellImageAsset, - buttonText = buttonText ?: stringResource(Res.string.cross_sell_get_price), + buttonText = buttonText, onButtonClick = { onCrossSellClick(storeUrl) onSheetDismissed() }, imageLoader = imageLoader, - onButtonClickLabel = stringResource(Res.string.TALKBACK_OPEN_EXTERNAL_LINK), + onButtonClickLabel = stringResource(string.TALKBACK_OPEN_EXTERNAL_LINK), isLoading = isLoading, modifier = modifier, buttonSize = buttonSize, @@ -756,9 +761,9 @@ fun PillowRow( imageLoader: ImageLoader, modifier: Modifier = Modifier, onButtonClickLabel: String? = null, - buttonStyle: ButtonDefaults.ButtonStyle = ButtonDefaults.ButtonStyle.Secondary, + buttonStyle: ButtonStyle = ButtonStyle.Secondary, isLoading: Boolean = false, - buttonSize: ButtonDefaults.ButtonSize = ButtonDefaults.ButtonSize.Medium, + buttonSize: ButtonSize = ButtonSize.Medium, buttonShape: Shape? = null, pillow: (@Composable () -> Unit)? = null, ) { @@ -846,7 +851,7 @@ private fun CrossSellItemWithDiscounts( imageLoader: ImageLoader, onSheetDismissed: () -> Unit, modifier: Modifier = Modifier, - buttonSize: ButtonDefaults.ButtonSize = ButtonDefaults.ButtonSize.Medium, + buttonSize: ButtonSize = ButtonSize.Medium, buttonShape: Shape? = null, ) { val description = "$crossSellTitle $crossSellSubtitle" @@ -900,14 +905,14 @@ private fun CrossSellItemWithDiscounts( } Spacer(Modifier.width(16.dp)) HedvigButton( - text = buttonText ?: stringResource(Res.string.cross_sell_get_price), + text = buttonText ?: stringResource(string.cross_sell_get_price), onClick = { onCrossSellClick(storeUrl) onSheetDismissed() }, - onClickLabel = stringResource(Res.string.TALKBACK_OPEN_EXTERNAL_LINK), + onClickLabel = stringResource(string.TALKBACK_OPEN_EXTERNAL_LINK), buttonSize = buttonSize, - buttonStyle = ButtonDefaults.ButtonStyle.PrimaryAlt, + buttonStyle = ButtonStyle.PrimaryAlt, shape = buttonShape, modifier = Modifier.hedvigPlaceholder( visible = isLoading, @@ -933,7 +938,7 @@ private fun NotificationSubheading(text: String, modifier: Modifier = Modifier) private fun CrossSellDragHandle( modifier: Modifier = Modifier, contentPadding: PaddingValues? = null, - text: String? = stringResource(Res.string.CROSS_SELL_BANNER_TEXT), + text: String? = stringResource(string.CROSS_SELL_BANNER_TEXT), ) { val direction = LocalLayoutDirection.current Box( @@ -994,6 +999,7 @@ private fun PreviewCrossSellsSheetContent( "", ImageAsset("", "", ""), ImageAsset("", "", ""), + buttonText = "button" ), bannerText = "50% discount the first year", buttonText = "Explore offer", @@ -1010,6 +1016,7 @@ private fun PreviewCrossSellsSheetContent( "", ImageAsset("", "", ""), ImageAsset("", "", ""), + buttonText = "button" ), ).takeIf { case != TripleCase.FIRST }.orEmpty(), onCrossSellClick = {}, @@ -1039,6 +1046,7 @@ private fun PreviewCrossSellsFloatingSheetContent( "", ImageAsset("", "", ""), ImageAsset("", "", ""), + buttonText = "button" ), bannerText = "50% discount the first year", buttonText = "Explore offer", @@ -1055,6 +1063,7 @@ private fun PreviewCrossSellsFloatingSheetContent( "", ImageAsset("", "", ""), ImageAsset("", "", ""), + buttonText = "button" ), ).takeIf { case != TripleCase.FIRST }.orEmpty(), dismissSheet = {}, @@ -1079,6 +1088,7 @@ private fun PreviewCrossSellsSection() { "storeUrl", ImageAsset("", "", ""), ImageAsset("", "", ""), + buttonText = "button", ) }, {}, From 1a97736ca2eeeb2205a34541226b1347b36ac9c9 Mon Sep 17 00:00:00 2001 From: mariiapanasetskaia Date: Wed, 2 Sep 2026 16:22:37 +0200 Subject: [PATCH 2/4] fix tests --- .../com/hedvig/android/data/contract/CrossSell.kt | 2 +- .../android/feature/home/home/ui/HomeDestination.kt | 4 ++-- .../feature/home/home/ui/HomePresenterTest.kt | 3 +++ .../insurance/presentation/InsurancePresenterTest.kt | 1 + .../ui/bundle/OnboardingBundleDestination.kt | 10 +++++----- .../feature/onboarding/FakeOnboardingRepository.kt | 1 + .../feature/onboarding/data/OnboardingPathTest.kt | 1 + .../com/hedvig/android/crosssells/CrossSells.kt | 12 ++++++------ 8 files changed, 20 insertions(+), 14 deletions(-) diff --git a/app/data/data-contract/src/commonMain/kotlin/com/hedvig/android/data/contract/CrossSell.kt b/app/data/data-contract/src/commonMain/kotlin/com/hedvig/android/data/contract/CrossSell.kt index fbae0d2c76..f3d3b38b20 100644 --- a/app/data/data-contract/src/commonMain/kotlin/com/hedvig/android/data/contract/CrossSell.kt +++ b/app/data/data-contract/src/commonMain/kotlin/com/hedvig/android/data/contract/CrossSell.kt @@ -13,7 +13,7 @@ data class CrossSell( val storeUrl: String, val pillowImageSmall: ImageAsset, val pillowImageLarge: ImageAsset, - val buttonText: String + val buttonText: String, ) data class ImageAsset( diff --git a/app/feature/feature-home/src/main/kotlin/com/hedvig/android/feature/home/home/ui/HomeDestination.kt b/app/feature/feature-home/src/main/kotlin/com/hedvig/android/feature/home/home/ui/HomeDestination.kt index 9dc904ec75..3726810de3 100644 --- a/app/feature/feature-home/src/main/kotlin/com/hedvig/android/feature/home/home/ui/HomeDestination.kt +++ b/app/feature/feature-home/src/main/kotlin/com/hedvig/android/feature/home/home/ui/HomeDestination.kt @@ -1691,7 +1691,7 @@ private fun PreviewHomeScreen( "", ImageAsset("", "", ""), ImageAsset("", "", ""), - buttonText = "See price" + buttonText = "See price", ), bannerText = "50% discount the first year", discountText = "-50%", @@ -1708,7 +1708,7 @@ private fun PreviewHomeScreen( "", ImageAsset("", "", ""), ImageAsset("", "", ""), - buttonText = "See price" + buttonText = "See price", ), ), recommendedAddon = null, diff --git a/app/feature/feature-home/src/test/kotlin/com/hedvig/android/feature/home/home/ui/HomePresenterTest.kt b/app/feature/feature-home/src/test/kotlin/com/hedvig/android/feature/home/home/ui/HomePresenterTest.kt index 37d8eb6b90..2cce60208b 100644 --- a/app/feature/feature-home/src/test/kotlin/com/hedvig/android/feature/home/home/ui/HomePresenterTest.kt +++ b/app/feature/feature-home/src/test/kotlin/com/hedvig/android/feature/home/home/ui/HomePresenterTest.kt @@ -76,6 +76,7 @@ internal class HomePresenterTest { "url", ImageAsset("", "", ""), ImageAsset("", "", ""), + buttonText = "See price", ), bannerText = "50% discount the first year", buttonText = "Explore offer", @@ -539,6 +540,7 @@ internal class HomePresenterTest { subtitle = "subt", pillowImageSmall = ImageAsset("", "", ""), pillowImageLarge = ImageAsset("", "", ""), + buttonText = "See price", ) homePresenter.test(HomeUiState.Loading) { assertThat(awaitItem()).isEqualTo(HomeUiState.Loading) @@ -709,6 +711,7 @@ internal class HomePresenterTest { storeUrl = "url", pillowImageSmall = ImageAsset("", "", ""), pillowImageLarge = ImageAsset("", "", ""), + buttonText = "See price", ) homePresenter.test(HomeUiState.Loading) { assertThat(awaitItem()).isEqualTo(HomeUiState.Loading) diff --git a/app/feature/feature-insurances/src/test/kotlin/com/hedvig/android/feature/insurances/insurance/presentation/InsurancePresenterTest.kt b/app/feature/feature-insurances/src/test/kotlin/com/hedvig/android/feature/insurances/insurance/presentation/InsurancePresenterTest.kt index 0ea7cffa3d..e7637106ae 100644 --- a/app/feature/feature-insurances/src/test/kotlin/com/hedvig/android/feature/insurances/insurance/presentation/InsurancePresenterTest.kt +++ b/app/feature/feature-insurances/src/test/kotlin/com/hedvig/android/feature/insurances/insurance/presentation/InsurancePresenterTest.kt @@ -261,6 +261,7 @@ internal class InsurancePresenterTest { storeUrl = "", pillowImageSmall = ImageAsset("", "", ""), pillowImageLarge = ImageAsset("", "", ""), + buttonText = "See price", ), ), ) diff --git a/app/feature/feature-onboarding/src/main/kotlin/com/hedvig/android/feature/onboarding/ui/bundle/OnboardingBundleDestination.kt b/app/feature/feature-onboarding/src/main/kotlin/com/hedvig/android/feature/onboarding/ui/bundle/OnboardingBundleDestination.kt index 8a846a2778..aea32eb220 100644 --- a/app/feature/feature-onboarding/src/main/kotlin/com/hedvig/android/feature/onboarding/ui/bundle/OnboardingBundleDestination.kt +++ b/app/feature/feature-onboarding/src/main/kotlin/com/hedvig/android/feature/onboarding/ui/bundle/OnboardingBundleDestination.kt @@ -317,7 +317,7 @@ private class OnboardingBundleUiStateProvider : CollectionPreviewParameterProvid description = "For you, your family and your home", storeUrl = "https://www.hedvig.com/se/forsakringar/hemforsakring", pillowImageUrl = null, - buttonTitle = "button" + buttonTitle = "button", ), OnboardingCrossSell( id = "pet", @@ -325,7 +325,7 @@ private class OnboardingBundleUiStateProvider : CollectionPreviewParameterProvid description = "For your dog or cat", storeUrl = "https://www.hedvig.com/se/forsakringar/djurforsakring", pillowImageUrl = null, - buttonTitle = "button" + buttonTitle = "button", ), OnboardingCrossSell( id = "car", @@ -333,7 +333,7 @@ private class OnboardingBundleUiStateProvider : CollectionPreviewParameterProvid description = "For you and your car", storeUrl = "https://www.hedvig.com/se/forsakringar/bilforsakring", pillowImageUrl = null, - buttonTitle = "button" + buttonTitle = "button", ), OnboardingCrossSell( id = "vacation", @@ -341,7 +341,7 @@ private class OnboardingBundleUiStateProvider : CollectionPreviewParameterProvid description = "For your cottage or cabin", storeUrl = "https://www.hedvig.com/se/forsakringar/fritidshusforsakring", pillowImageUrl = null, - buttonTitle = "button" + buttonTitle = "button", ), OnboardingCrossSell( id = "ppi", @@ -349,7 +349,7 @@ private class OnboardingBundleUiStateProvider : CollectionPreviewParameterProvid description = "For you if you get unemployed", storeUrl = "https://www.hedvig.com/se/forsakringar/inkomstforsakring", pillowImageUrl = null, - buttonTitle = "button" + buttonTitle = "button", ), ), ), diff --git a/app/feature/feature-onboarding/src/test/kotlin/com/hedvig/android/feature/onboarding/FakeOnboardingRepository.kt b/app/feature/feature-onboarding/src/test/kotlin/com/hedvig/android/feature/onboarding/FakeOnboardingRepository.kt index e72bc5878b..f21013aeb7 100644 --- a/app/feature/feature-onboarding/src/test/kotlin/com/hedvig/android/feature/onboarding/FakeOnboardingRepository.kt +++ b/app/feature/feature-onboarding/src/test/kotlin/com/hedvig/android/feature/onboarding/FakeOnboardingRepository.kt @@ -72,6 +72,7 @@ internal fun testOnboardingData( description = "For your pet", storeUrl = "https://x", pillowImageUrl = "https://x", + buttonTitle = "See price", ), ), ): OnboardingData = OnboardingData( diff --git a/app/feature/feature-onboarding/src/test/kotlin/com/hedvig/android/feature/onboarding/data/OnboardingPathTest.kt b/app/feature/feature-onboarding/src/test/kotlin/com/hedvig/android/feature/onboarding/data/OnboardingPathTest.kt index 65b6df7f70..c12dfca2f5 100644 --- a/app/feature/feature-onboarding/src/test/kotlin/com/hedvig/android/feature/onboarding/data/OnboardingPathTest.kt +++ b/app/feature/feature-onboarding/src/test/kotlin/com/hedvig/android/feature/onboarding/data/OnboardingPathTest.kt @@ -38,6 +38,7 @@ class OnboardingPathTest { description = "For your pet", storeUrl = "https://x", pillowImageUrl = "https://x", + buttonTitle = "See price", ), ), ) = OnboardingData( diff --git a/app/ui/cross-sells/src/main/kotlin/com/hedvig/android/crosssells/CrossSells.kt b/app/ui/cross-sells/src/main/kotlin/com/hedvig/android/crosssells/CrossSells.kt index 387b91b71a..992007a488 100644 --- a/app/ui/cross-sells/src/main/kotlin/com/hedvig/android/crosssells/CrossSells.kt +++ b/app/ui/cross-sells/src/main/kotlin/com/hedvig/android/crosssells/CrossSells.kt @@ -671,7 +671,7 @@ fun CrossSellItemPlaceholder(imageLoader: ImageLoader, modifier: Modifier = Modi isLoading = true, modifier = Modifier, onSheetDismissed = {}, - buttonText = "button" + buttonText = "button", ) } } @@ -709,7 +709,7 @@ private fun CrossSellItem( onSheetDismissed = onSheetDismissed, buttonSize = buttonSize, buttonShape = buttonShape, - buttonText = crossSell.buttonText + buttonText = crossSell.buttonText, ) } @@ -999,7 +999,7 @@ private fun PreviewCrossSellsSheetContent( "", ImageAsset("", "", ""), ImageAsset("", "", ""), - buttonText = "button" + buttonText = "button", ), bannerText = "50% discount the first year", buttonText = "Explore offer", @@ -1016,7 +1016,7 @@ private fun PreviewCrossSellsSheetContent( "", ImageAsset("", "", ""), ImageAsset("", "", ""), - buttonText = "button" + buttonText = "button", ), ).takeIf { case != TripleCase.FIRST }.orEmpty(), onCrossSellClick = {}, @@ -1046,7 +1046,7 @@ private fun PreviewCrossSellsFloatingSheetContent( "", ImageAsset("", "", ""), ImageAsset("", "", ""), - buttonText = "button" + buttonText = "button", ), bannerText = "50% discount the first year", buttonText = "Explore offer", @@ -1063,7 +1063,7 @@ private fun PreviewCrossSellsFloatingSheetContent( "", ImageAsset("", "", ""), ImageAsset("", "", ""), - buttonText = "button" + buttonText = "button", ), ).takeIf { case != TripleCase.FIRST }.orEmpty(), dismissSheet = {}, From 9d735d8ec860ac8cdb8a8925c3e2d7cd0743280e Mon Sep 17 00:00:00 2001 From: mariiapanasetskaia Date: Wed, 2 Sep 2026 16:27:57 +0200 Subject: [PATCH 3/4] update strings --- .../src/androidMain/res/values-sv-rSE/strings.xml | 2 -- app/core/core-resources/src/androidMain/res/values/strings.xml | 2 -- .../src/commonMain/composeResources/values-sv-rSE/strings.xml | 2 -- .../src/commonMain/composeResources/values/strings.xml | 2 -- 4 files changed, 8 deletions(-) diff --git a/app/core/core-resources/src/androidMain/res/values-sv-rSE/strings.xml b/app/core/core-resources/src/androidMain/res/values-sv-rSE/strings.xml index 68970be8b3..2f044f7c15 100644 --- a/app/core/core-resources/src/androidMain/res/values-sv-rSE/strings.xml +++ b/app/core/core-resources/src/androidMain/res/values-sv-rSE/strings.xml @@ -513,7 +513,6 @@ Hedvig Läs mer Upptäck våra försäkringar - Se pris Hur kan vi hjälpa dig? Hej %1$s Ändra adress @@ -663,7 +662,6 @@ Kunde inte spara, försök igen Så vi kan nå dig om det behövs Telefonnummer - Se pris Alltid mörkt läge Alltid ljust läge Välj hur appen ska se ut diff --git a/app/core/core-resources/src/androidMain/res/values/strings.xml b/app/core/core-resources/src/androidMain/res/values/strings.xml index 8ee6ac1426..35b62d4efc 100644 --- a/app/core/core-resources/src/androidMain/res/values/strings.xml +++ b/app/core/core-resources/src/androidMain/res/values/strings.xml @@ -513,7 +513,6 @@ Hedvig Read more Discover our insurances - See price How can we help? Hi %1$s Change address @@ -663,7 +662,6 @@ Could not save, please try again So we can reach you if we need to Phone number - See price Always dark Always light Choose how the app looks diff --git a/app/core/core-resources/src/commonMain/composeResources/values-sv-rSE/strings.xml b/app/core/core-resources/src/commonMain/composeResources/values-sv-rSE/strings.xml index 71e5c23b81..b94e0cb675 100644 --- a/app/core/core-resources/src/commonMain/composeResources/values-sv-rSE/strings.xml +++ b/app/core/core-resources/src/commonMain/composeResources/values-sv-rSE/strings.xml @@ -512,7 +512,6 @@ Hedvig Läs mer Upptäck våra försäkringar - Se pris Hur kan vi hjälpa dig? Hej %1$s Ändra adress @@ -662,7 +661,6 @@ Kunde inte spara, försök igen Så vi kan nå dig om det behövs Telefonnummer - Se pris Alltid mörkt läge Alltid ljust läge Välj hur appen ska se ut diff --git a/app/core/core-resources/src/commonMain/composeResources/values/strings.xml b/app/core/core-resources/src/commonMain/composeResources/values/strings.xml index 256355ad6d..680f424013 100644 --- a/app/core/core-resources/src/commonMain/composeResources/values/strings.xml +++ b/app/core/core-resources/src/commonMain/composeResources/values/strings.xml @@ -512,7 +512,6 @@ Hedvig Read more Discover our insurances - See price How can we help? Hi %1$s Change address @@ -662,7 +661,6 @@ Could not save, please try again So we can reach you if we need to Phone number - See price Always dark Always light Choose how the app looks From 12381bfb9cab45a4733ed07aebcc620f11903eab Mon Sep 17 00:00:00 2001 From: mariiapanasetskaia Date: Wed, 2 Sep 2026 16:28:38 +0200 Subject: [PATCH 4/4] remove imports --- .../com/hedvig/android/feature/home/home/ui/HomeDestination.kt | 1 - .../feature/onboarding/ui/bundle/OnboardingBundleDestination.kt | 1 - 2 files changed, 2 deletions(-) diff --git a/app/feature/feature-home/src/main/kotlin/com/hedvig/android/feature/home/home/ui/HomeDestination.kt b/app/feature/feature-home/src/main/kotlin/com/hedvig/android/feature/home/home/ui/HomeDestination.kt index 3726810de3..1016a91ad5 100644 --- a/app/feature/feature-home/src/main/kotlin/com/hedvig/android/feature/home/home/ui/HomeDestination.kt +++ b/app/feature/feature-home/src/main/kotlin/com/hedvig/android/feature/home/home/ui/HomeDestination.kt @@ -213,7 +213,6 @@ import hedvig.resources.HC_QUICK_ACTIONS_UPGRADE_COVERAGE_SUBTITLE import hedvig.resources.HC_QUICK_ACTIONS_UPGRADE_COVERAGE_TITLE import hedvig.resources.HOME_ADDONS_READ_MORE_BUTTON import hedvig.resources.HOME_DISCOVER_SECTION_TITLE -import hedvig.resources.HOME_DISCOVER_SEE_PRICE_BUTTON import hedvig.resources.HOME_GREETING_SUBTITLE import hedvig.resources.HOME_GREETING_TITLE import hedvig.resources.HOME_QUOTES_SECTION_TITLE diff --git a/app/feature/feature-onboarding/src/main/kotlin/com/hedvig/android/feature/onboarding/ui/bundle/OnboardingBundleDestination.kt b/app/feature/feature-onboarding/src/main/kotlin/com/hedvig/android/feature/onboarding/ui/bundle/OnboardingBundleDestination.kt index aea32eb220..221b19880a 100644 --- a/app/feature/feature-onboarding/src/main/kotlin/com/hedvig/android/feature/onboarding/ui/bundle/OnboardingBundleDestination.kt +++ b/app/feature/feature-onboarding/src/main/kotlin/com/hedvig/android/feature/onboarding/ui/bundle/OnboardingBundleDestination.kt @@ -60,7 +60,6 @@ import dev.zacsweers.metro.Inject import hedvig.resources.ONBOARDING_CONTINUE_TO_APP_BUTTON import hedvig.resources.ONBOARDING_CROSS_SELL_SUBTITLE import hedvig.resources.ONBOARDING_CROSS_SELL_TITLE -import hedvig.resources.ONBOARDING_SEE_PRICE_BUTTON import hedvig.resources.Res import kotlinx.coroutines.launch import org.jetbrains.compose.resources.stringResource