Skip to content

Commit

Permalink
Onboarding design updates for phone.
Browse files Browse the repository at this point in the history
  • Loading branch information
flaviahandrea-vsp committed Aug 25, 2024
1 parent b1d7759 commit 84e75e6
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,46 +20,39 @@ import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Brush
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.colorResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.font.Font
import androidx.compose.ui.text.font.FontFamily
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import androidx.core.content.ContextCompat
import org.permanent.permanent.R

@Composable
fun CustomCheckbox(
isTablet: Boolean = false, text: String, checkedState: MutableState<Boolean>
) {
val context = LocalContext.current
val whiteTransparentColor =
Color(ContextCompat.getColor(context, R.color.whiteSuperExtraTransparent))
val blue900Color = Color(ContextCompat.getColor(context, R.color.blue900))
val barneyPurpleColor = Color(ContextCompat.getColor(context, R.color.barneyPurple))
val barneyPurpleLightColor = Color(ContextCompat.getColor(context, R.color.barneyPurpleLight))
val regularFont = FontFamily(Font(R.font.open_sans_regular_ttf))

Row(
modifier = Modifier
.height(if (isTablet) 116.dp else 100.dp)
.fillMaxWidth()
.border(1.dp, whiteTransparentColor, RoundedCornerShape(10.dp))
.border(
1.dp,
colorResource(id = R.color.whiteSuperExtraTransparent),
RoundedCornerShape(10.dp)
)
.background(
if (checkedState.value) Brush.horizontalGradient(
listOf(
barneyPurpleLightColor, barneyPurpleColor
)
) else if (isTablet) Brush.horizontalGradient(
listOf(
blue900Color, blue900Color
colorResource(id = R.color.barneyPurpleLight),
colorResource(id = R.color.barneyPurple)
)
)
else Brush.horizontalGradient(
) else Brush.horizontalGradient(
listOf(
Color.Transparent, Color.Transparent
colorResource(id = R.color.blue900), colorResource(id = R.color.blue900)
)
), RoundedCornerShape(10.dp)
)
Expand All @@ -76,7 +69,7 @@ fun CustomCheckbox(
colors = CheckboxDefaults.colors(
uncheckedColor = Color.White,
checkedColor = Color.White,
checkmarkColor = barneyPurpleLightColor
checkmarkColor = colorResource(id = R.color.barneyPurpleLight)
)
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ private fun CustomSmallTextAndIconButton(
modifier = Modifier.size(16.dp)
)

Spacer(modifier = Modifier.width(10.dp))
Spacer(modifier = Modifier.width(16.dp))
}

if (text != null) {
Expand All @@ -134,7 +134,7 @@ private fun CustomSmallTextAndIconButton(
}

if (iconAlignment == ButtonIconAlignment.END && icon != null) {
Spacer(modifier = Modifier.width(10.dp))
Spacer(modifier = Modifier.width(16.dp))

Image(
painter = icon,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@ class ArchiveOnboardingViewModel(application: Application) :

fun createOnboardingPriorities(context: Context): List<Pair<Int, String>> {
return listOf(
OnboardingPriorityType.SAFE.ordinal to context.getString(R.string.priorities_safe),
OnboardingPriorityType.NONPROFIT.ordinal to context.getString(R.string.priorities_nonprofit),
OnboardingPriorityType.GENEALOGY.ordinal to context.getString(R.string.priorities_genealogy),
OnboardingPriorityType.NONPROFIT.ordinal to context.getString(R.string.priorities_nonprofit),
OnboardingPriorityType.SAFE.ordinal to context.getString(R.string.priorities_safe),
OnboardingPriorityType.PROFESSIONAL.ordinal to context.getString(R.string.priorities_professional),
OnboardingPriorityType.COLLABORATE.ordinal to context.getString(R.string.priorities_collaborate),
OnboardingPriorityType.DIGIPRES.ordinal to context.getString(R.string.priorities_digipres)
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
<color name="blue400">#898DA4</color>
<color name="blue600">#5A5F80</color>
<color name="blue900">#131B4A</color>
<color name="blueLighter">#323f88</color>
<color name="colorPrimary">#131B4A</color>
<color name="blueLighter">#323f88</color>
<color name="colorPrimary200">#B8BBC9</color>
<color name="colorPrimaryDarker">#0f163b</color>
<color name="colorPrimaryLighter">#1c2451</color>
Expand Down
8 changes: 4 additions & 4 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -554,13 +554,13 @@
<string name="family_history">Family History</string>
<string name="family_history_description">Create an archive that captures my family history.</string>
<string name="community">Community</string>
<string name="community_description">Create an archive that captures a community’s life.</string>
<string name="community_description">Create an archive that captures a community life.</string>
<string name="organization">Organization</string>
<string name="organization_description">Create an archive that captures an organization’s life.</string>
<string name="organization_description">Create an archive that captures an organization life.</string>
<string name="lets_create_a_archive">Let’s create a %s archive</string>
<string name="lets_create_an_archive">Let’s create an %s archive</string>
<string name="create_your_archive_title">Create your %s archive</string>
<string name="create_your_archive_description">Name your new archive. This is the legal or official name of the person, family, group, or organization the archive is about. You can edit the name later if needed.</string>
<string name="create_your_archive_description">Name your new archive. This is the formal or official name of the person, family, group, or organization the archive is about. You can edit the name later if needed.</string>
<string name="create_the_archive">Create the archive</string>
<string name="chart_your_path_title">Chart your\npath to success</string>
<string name="chart_your_path_description">Let’s set some goals. Everyone has unique goals for preserving their legacy. We want to learn more about how we can help you achieve yours.</string>
Expand All @@ -576,7 +576,7 @@
<string name="goals_share">Share my archive with others securely</string>
<string name="goals_legacy">Create a plan for passing on my digital materials</string>
<string name="goals_organize">Organize my materials</string>
<string name="goals_undefined">Something else</string>
<string name="goals_undefined">Something else</string>
<string name="skip_this_step">Skip this step</string>
<string name="priorities_safe">Access to a safe and secure digital storage platform</string>
<string name="priorities_nonprofit">Supporting a mission-driven nonprofit</string>
Expand Down

0 comments on commit 84e75e6

Please sign in to comment.