Remove ZIP code step from onboarding, use home profile instead
ZIP code was US-only and redundant now that the suggestion engine uses home profile features (heating, pool, etc.) for personalization. Onboarding flow: Welcome → Value Props → Name → Account → Verify → Home Profile → Task Selection (was: ...Verify → ZIP → Home Profile...) Removed regionalTemplates references from task selection view. Both iOS and Compose flows updated.
This commit is contained in:
@@ -103,8 +103,7 @@ fun OnboardingScreen(
|
||||
if (userIntent == OnboardingIntent.JOIN_EXISTING) {
|
||||
viewModel.goToStep(OnboardingStep.JOIN_RESIDENCE)
|
||||
} else {
|
||||
viewModel.createResidence()
|
||||
viewModel.goToStep(OnboardingStep.RESIDENCE_LOCATION)
|
||||
viewModel.goToStep(OnboardingStep.HOME_PROFILE)
|
||||
}
|
||||
} else {
|
||||
viewModel.nextStep()
|
||||
@@ -118,8 +117,7 @@ fun OnboardingScreen(
|
||||
if (userIntent == OnboardingIntent.JOIN_EXISTING) {
|
||||
viewModel.goToStep(OnboardingStep.JOIN_RESIDENCE)
|
||||
} else {
|
||||
viewModel.createResidence()
|
||||
viewModel.goToStep(OnboardingStep.RESIDENCE_LOCATION)
|
||||
viewModel.goToStep(OnboardingStep.HOME_PROFILE)
|
||||
}
|
||||
}
|
||||
)
|
||||
@@ -129,19 +127,21 @@ fun OnboardingScreen(
|
||||
onJoined = { viewModel.completeOnboarding() }
|
||||
)
|
||||
|
||||
OnboardingStep.RESIDENCE_LOCATION -> OnboardingLocationContent(
|
||||
viewModel = viewModel,
|
||||
onLocationDetected = { zip ->
|
||||
viewModel.loadRegionalTemplates(zip)
|
||||
viewModel.nextStep()
|
||||
},
|
||||
onSkip = { viewModel.nextStep() }
|
||||
)
|
||||
OnboardingStep.RESIDENCE_LOCATION -> {
|
||||
// Location step removed — skip to home profile if we land here
|
||||
LaunchedEffect(Unit) { viewModel.goToStep(OnboardingStep.HOME_PROFILE) }
|
||||
}
|
||||
|
||||
OnboardingStep.HOME_PROFILE -> OnboardingHomeProfileContent(
|
||||
viewModel = viewModel,
|
||||
onContinue = { viewModel.nextStep() },
|
||||
onSkip = { viewModel.skipStep() }
|
||||
onContinue = {
|
||||
viewModel.createResidence()
|
||||
viewModel.nextStep()
|
||||
},
|
||||
onSkip = {
|
||||
viewModel.createResidence()
|
||||
viewModel.skipStep()
|
||||
}
|
||||
)
|
||||
|
||||
OnboardingStep.FIRST_TASK -> OnboardingFirstTaskContent(
|
||||
@@ -179,7 +179,6 @@ private fun OnboardingNavigationBar(
|
||||
val showSkipButton = when (currentStep) {
|
||||
OnboardingStep.VALUE_PROPS,
|
||||
OnboardingStep.JOIN_RESIDENCE,
|
||||
OnboardingStep.RESIDENCE_LOCATION,
|
||||
OnboardingStep.HOME_PROFILE,
|
||||
OnboardingStep.FIRST_TASK,
|
||||
OnboardingStep.SUBSCRIPTION_UPSELL -> true
|
||||
|
||||
@@ -201,14 +201,14 @@ class OnboardingViewModel : ViewModel() {
|
||||
if (_userIntent.value == OnboardingIntent.JOIN_EXISTING) {
|
||||
OnboardingStep.JOIN_RESIDENCE
|
||||
} else {
|
||||
OnboardingStep.RESIDENCE_LOCATION
|
||||
OnboardingStep.HOME_PROFILE
|
||||
}
|
||||
}
|
||||
OnboardingStep.JOIN_RESIDENCE -> {
|
||||
completeOnboarding()
|
||||
OnboardingStep.JOIN_RESIDENCE
|
||||
}
|
||||
OnboardingStep.RESIDENCE_LOCATION -> OnboardingStep.HOME_PROFILE
|
||||
OnboardingStep.RESIDENCE_LOCATION -> OnboardingStep.HOME_PROFILE // Skip past if somehow reached
|
||||
OnboardingStep.HOME_PROFILE -> OnboardingStep.FIRST_TASK
|
||||
OnboardingStep.FIRST_TASK -> {
|
||||
completeOnboarding()
|
||||
@@ -253,7 +253,6 @@ class OnboardingViewModel : ViewModel() {
|
||||
fun skipStep() {
|
||||
when (_currentStep.value) {
|
||||
OnboardingStep.VALUE_PROPS,
|
||||
OnboardingStep.RESIDENCE_LOCATION,
|
||||
OnboardingStep.HOME_PROFILE -> nextStep()
|
||||
OnboardingStep.JOIN_RESIDENCE,
|
||||
OnboardingStep.FIRST_TASK,
|
||||
|
||||
Reference in New Issue
Block a user