Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MBL-2030: [Phase 1] UI Updates: Copy changes on ppo screen title and empty state copy #2230

Merged
merged 5 commits into from
Feb 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import com.kickstarter.R
import com.kickstarter.features.pledgedprojectsoverview.viewmodel.PledgedProjectsOverviewViewModel
import com.kickstarter.libs.MessagePreviousScreenType
import com.kickstarter.libs.RefTag
import com.kickstarter.libs.featureflag.FlagKey
import com.kickstarter.libs.utils.TransitionUtils
import com.kickstarter.libs.utils.extensions.getEnvironment
import com.kickstarter.libs.utils.extensions.getProjectIntent
Expand Down Expand Up @@ -153,6 +154,7 @@ class PledgedProjectsOverviewActivity : AppCompatActivity() {
}
},
onSecondaryActionButtonClicked = { PPOCard -> },
v2Enabled = env.featureFlagClient()?.getBoolean(FlagKey.ANDROID_PLEDGED_PROJECTS_OVERVIEW_V2) ?: false
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ fun PledgedProjectsOverviewScreen(
showEmptyState: Boolean = false,
pullRefreshCallback: () -> Unit = {},
analyticEvents: AnalyticEvents? = null,
v2Enabled: Boolean = false,
) {
val openConfirmAddressAlertDialog = remember { mutableStateOf(false) }
var confirmedAddress by remember { mutableStateOf("") } // TODO: This is either the original shipping address or the user-edited address
Expand Down Expand Up @@ -198,7 +199,7 @@ fun PledgedProjectsOverviewScreen(
},
topBar = {
TopToolBar(
title = stringResource(id = R.string.Project_alerts),
title = if (v2Enabled) stringResource(id = R.string.fpo_backings) else stringResource(id = R.string.Project_alerts),
titleColor = colors.textPrimary,
leftOnClickAction = onBackPressed,
leftIconColor = colors.icon,
Expand All @@ -218,7 +219,7 @@ fun PledgedProjectsOverviewScreen(
if (isErrored) {
PPOScreenErrorState()
} else if (showEmptyState) {
PPOScreenEmptyState(onSeeAllBackedProjectsClick)
PPOScreenEmptyState(onSeeAllBackedProjectsClick, v2Enabled)
} else {
LazyColumn(
modifier = Modifier
Expand Down Expand Up @@ -321,7 +322,8 @@ fun PledgedProjectsOverviewScreen(

@Composable
fun PPOScreenEmptyState(
onSeeAllBackedProjectsClick: () -> Unit
onSeeAllBackedProjectsClick: () -> Unit,
v2Enabled: Boolean = false
) {
Column(
modifier = Modifier
Expand All @@ -338,15 +340,15 @@ fun PPOScreenEmptyState(
) {
Text(
color = colors.textPrimary,
text = stringResource(id = R.string.Youre_all_caught_up),
text = if (v2Enabled) stringResource(id = R.string.fpo_no_funded_backings) else stringResource(id = R.string.Youre_all_caught_up),
style = typographyV2.headingXL,
)

Spacer(modifier = Modifier.height(dimensions.paddingMediumLarge))

Text(
color = colors.textPrimary,
text = stringResource(id = R.string.When_projects_youve_backed_need_your_attention_youll_see_them_here),
text = if (v2Enabled) stringResource(id = R.string.fpo_when_projects_youve_backed_have_successfully_funded) else stringResource(id = R.string.When_projects_youve_backed_need_your_attention_youll_see_them_here),
style = typographyV2.body,
textAlign = TextAlign.Center
)
Expand Down
3 changes: 3 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@
<!-- TODO: Get translations for this and put it in i18n, then remove -->
<string name="project_status_project_was_successfully_funded_on_deadline_but_you_can_still_pledge_for_available_rewards" formatted="false">This project was successfully funded on %{deadline}, but you can still pledge for available rewards.</string>

<string name="fpo_no_funded_backings" formatted="false">No funded backings</string>
<string name="fpo_backings" formatted="false">Backings</string>
<string name="fpo_when_projects_youve_backed_have_successfully_funded" formatted="false">When projects you\'ve backed have successfully funded, you\'ll see them here.</string>


</resources>