NTP-24839 | Divyesh | arc text changes (#14925)

Co-authored-by: Sidharth Bamba <sidharth.bamba@navi.com>
This commit is contained in:
Divyesh Shinde
2025-02-11 13:41:13 +05:30
committed by GitHub
parent 5af70ede84
commit ebcd5c106c
6 changed files with 82 additions and 30 deletions

View File

@@ -32,6 +32,10 @@ import androidx.compose.ui.draw.paint
import androidx.compose.ui.layout.ContentScale
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.AnnotatedString
import androidx.compose.ui.text.SpanStyle
import androidx.compose.ui.text.buildAnnotatedString
import androidx.compose.ui.text.withStyle
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import com.navi.bbps.R
@@ -41,6 +45,7 @@ import com.navi.bbps.common.ui.ThemeRoundedButton
import com.navi.common.R as CommonR
import com.navi.common.lottie.LottieRepository
import com.navi.common.model.NaviLottieCompositionSpecType
import com.navi.common.utils.SPACE
import com.navi.design.font.FontWeightEnum
import com.navi.design.font.getFontWeight
import com.navi.design.font.naviFontFamily
@@ -147,7 +152,7 @@ private fun ArcCampaignInfoSection(
id = R.string.bbps_arc_info_bottom_sheet_campaign_title,
thresholdInDays,
),
fontSize = 12.sp,
fontSize = 14.sp,
fontFamily = naviFontFamily,
fontWeight = getFontWeight(FontWeightEnum.NAVI_BODY_REGULAR),
color = NaviBbpsColor.textTertiary,
@@ -161,18 +166,7 @@ private fun ArcCampaignInfoSection(
verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.Center,
) {
NaviText(
text =
stringResource(
id = R.string.bbps_arc_info_bottom_sheet_campaign_subtitle,
thresholdInDays,
),
fontSize = 12.sp,
fontFamily = naviFontFamily,
fontWeight = getFontWeight(FontWeightEnum.NAVI_BODY_REGULAR),
color = NaviBbpsColor.textTertiary,
lineHeight = 16.sp,
)
NaviText(text = arcCampaignInfoSectionText(thresholdInDays = thresholdInDays))
Spacer(modifier = Modifier.width(4.dp))
@@ -254,3 +248,50 @@ fun ArcExplanatoryWidget(modifier: Modifier = Modifier) {
)
}
}
@Composable
fun arcCampaignInfoSectionText(thresholdInDays: String): AnnotatedString {
val descriptionText = buildAnnotatedString {
withStyle(
style =
SpanStyle(
fontFamily = naviFontFamily,
fontWeight = getFontWeight(FontWeightEnum.NAVI_BODY_REGULAR),
fontSize = 14.sp,
color = NaviBbpsColor.textTertiary,
)
) {
append(
stringResource(
id = R.string.bbps_arc_info_bottom_sheet_campaign_subtitle,
thresholdInDays,
) + SPACE
)
}
withStyle(
style =
SpanStyle(
fontFamily = naviFontFamily,
fontWeight = getFontWeight(FontWeightEnum.NAVI_HEADLINE_REGULAR),
fontSize = 14.sp,
color = NaviBbpsColor.textTertiary,
)
) {
append(stringResource(id = R.string.bbps_arc_hundred_percentage) + SPACE)
}
withStyle(
style =
SpanStyle(
fontFamily = naviFontFamily,
fontWeight = getFontWeight(FontWeightEnum.NAVI_BODY_REGULAR),
fontSize = 14.sp,
color = NaviBbpsColor.textTertiary,
)
) {
append(stringResource(id = R.string.bbps_arc_extra_up_to))
}
}
return descriptionText
}

View File

@@ -292,9 +292,11 @@
<string name="bbps_animatable_unpaid_count">"(%1$s) "</string>
<string name="bbps_upto">upto</string>
<string name="bbps_arc_info_bottom_sheet_title">Protects bill payments</string>
<string name="bbps_arc_info_bottom_sheet_subtitle">even in pending state*</string>
<string name="bbps_arc_info_bottom_sheet_subtitle">Stress-free payments, always!</string>
<string name="bbps_arc_info_bottom_sheet_campaign_title">If bill / recharge paid via Navi UPI is pending</string>
<string name="bbps_arc_info_bottom_sheet_campaign_subtitle">for %s+ days, get extra up to</string>
<string name="bbps_arc_info_bottom_sheet_campaign_subtitle">for %s+ days, get</string>
<string name="bbps_arc_hundred_percentage">100%</string>
<string name="bbps_arc_extra_up_to">extra up to</string>
<string name="bbps_arc_local_counter_title">Navi protected %s payments</string>
<string name="bbps_arc_local_counter_subtitle">of yours till date</string>
<string name="bbps_get">Get</string>

View File

@@ -213,6 +213,6 @@
<string name="navi_app_is_locked">Navi app is locked</string>
<string name = "note" >"Note: "</string>
<string name="arc_info_bbps_bottom_sheet_title">Protects bill payments</string>
<string name="arc_info_bbps_bottom_sheet_campaign_title">If bill / recharge paid via Navi UPI is pending for %s+ days, get extra up to</string>
<string name="arc_info_bbps_bottom_sheet_campaign_title">If bill / recharge paid via Navi UPI is pending for %s+ days, get 100%% extra up to</string>
</resources>

View File

@@ -361,11 +361,11 @@ private fun ArcBbpsInfoWidget(state: ArcHomeScreenContract.State) {
descriptionSubTextComposable = { modifier ->
NaviText(
text = stringResource(R.string.np_arc_landing_screen_bbps_info_subtitle1),
fontSize = 12.sp,
fontSize = 14.sp,
fontFamily = naviFontFamily,
fontWeight = getFontWeight(FontWeightEnum.NAVI_BODY_REGULAR),
color = NaviPayColor.textTertiary,
lineHeight = 16.sp,
lineHeight = 22.sp,
modifier = modifier,
)
},
@@ -522,11 +522,11 @@ private fun ArcClientCoinRewardInfoWidget(modifier: Modifier = Modifier, coinAmo
Row(modifier = modifier.fillMaxWidth(), verticalAlignment = Alignment.CenterVertically) {
NaviText(
text = stringResource(R.string.np_arc_landing_screen_coin_reward_info_text),
fontSize = 12.sp,
fontSize = 14.sp,
fontFamily = naviFontFamily,
fontWeight = getFontWeight(FontWeightEnum.NAVI_BODY_REGULAR),
color = NaviPayColor.textTertiary,
lineHeight = 16.sp,
lineHeight = 22.sp,
)
Spacer(modifier = Modifier.width(4.dp))
@@ -541,11 +541,11 @@ private fun ArcClientCoinRewardInfoWidget(modifier: Modifier = Modifier, coinAmo
NaviText(
text = coinAmount,
fontSize = 12.sp,
fontSize = 14.sp,
fontFamily = naviFontFamily,
fontWeight = getFontWeight(FontWeightEnum.NAVI_BODY_REGULAR),
color = NaviPayColor.textTertiary,
lineHeight = 16.sp,
lineHeight = 22.sp,
)
}
}

View File

@@ -29,8 +29,10 @@ import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.Placeholder
import androidx.compose.ui.text.PlaceholderVerticalAlign
import androidx.compose.ui.text.SpanStyle
import androidx.compose.ui.text.buildAnnotatedString
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.text.withStyle
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import com.navi.common.R as CommonR
@@ -141,12 +143,19 @@ private fun ArcCampaignInfoSection(
) {
Row(
modifier = modifier.fillMaxWidth().padding(horizontal = 80.dp),
modifier = modifier.fillMaxWidth().padding(horizontal = 64.dp),
verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.Center,
) {
val annotatedString = buildAnnotatedString {
append("$arcInfoBottomSheetCampaignTitle ")
val campaignTitle = arcInfoBottomSheetCampaignTitle.split("100%")
append(campaignTitle[0])
withStyle(
style = SpanStyle(fontWeight = getFontWeight(FontWeightEnum.NAVI_HEADLINE_REGULAR))
) {
append("100%")
}
append("${campaignTitle[1]} ")
appendInlineContent(id = "imageId")
append(" ${maxCoins}.")
}
@@ -167,8 +176,8 @@ private fun ArcCampaignInfoSection(
NaviText(
text = annotatedString,
textAlign = TextAlign.Center,
fontSize = 12.sp,
lineHeight = 20.sp,
fontSize = 14.sp,
lineHeight = 22.sp,
fontFamily = naviFontFamily,
fontWeight = getFontWeight(FontWeightEnum.NAVI_BODY_REGULAR),
inlineContent = inlineContentMap,

View File

@@ -802,16 +802,16 @@
<string name="np_merchant_fees_subText1">This fees is charged by merchants to process credit transactions</string>
<string name="np_merchant_fees_note">Note: Navi does not charge this fees.</string>
<string name="np_arc_info_bottom_sheet_title">Protects UPI payments</string>
<string name="np_arc_info_bottom_sheet_subtitle">even in pending state</string>
<string name="np_arc_info_bottom_sheet_campaign_title">If payment is pending for %s+ days, get extra up to</string>
<string name="np_arc_info_bottom_sheet_subtitle">Stress-free payments, always!</string>
<string name="np_arc_info_bottom_sheet_campaign_title">If payment is pending for %s+ days, get 100%% extra up to</string>
<string name="np_arc_local_counter_title">Navi protected %s payments</string>
<string name="np_arc_local_counter_subtitle">of yours till date</string>
<string name="np_arc_landing_screen_title">Protects UPI &amp; bill payments</string>
<string name="np_arc_landing_screen_subtitle">even in pending state</string>
<string name="np_arc_landing_screen_subtitle">Stress-free payments, always!</string>
<string name="np_arc_landing_screen_info_widget_title">About Navi Protect+</string>
<string name="np_arc_landing_screen_global_counter_text">%s payments protected till date</string>
<string name="np_arc_landing_screen_upi_info_title">For payments pending for %s+ days</string>
<string name="np_arc_landing_screen_coin_reward_info_text">get extra up to</string>
<string name="np_arc_landing_screen_coin_reward_info_text">get 100% extra up to</string>
<string name="np_arc_landing_screen_bbps_info_title1">Bills &amp; recharges paid via Navi UPI</string>
<string name="np_arc_landing_screen_bbps_info_subtitle1">are covered under Navi Protect+</string>
<string name="np_arc_landing_screen_bbps_info_title2">For settlement pending for %s+ days</string>