Skip to content

feat(wearos): Add onboarding flow, state hoisting, and navigation wiring#507

Merged
marlonlom merged 10 commits into
mainfrom
feature/implement-wearos-onboarding
Jun 21, 2026
Merged

feat(wearos): Add onboarding flow, state hoisting, and navigation wiring#507
marlonlom merged 10 commits into
mainfrom
feature/implement-wearos-onboarding

Conversation

@marlonlom

Copy link
Copy Markdown
Owner

🔀 Pull Request Information

Title

feat(wearos): Add onboarding flow, state hoisting, and navigation wiring

Description

This Pull Request introduces the complete Wear OS onboarding experience, optimizes state-hoisting for related feature screens, and rewires the application navigation to utilize the onboarding screen as the new application home entry point.

🛠️ What's Changed

🚀 New Features & UI

  • Onboarding Screen Module: Included the :features:wearos:onboarding module in the project structure.
  • Component Extraction: Developed explicit StartCalculationButton and ViewFeesButton components utilizing Material3 for Wear OS.
  • Navigation Destinations: Updated NavigationHost to feature the new welcome user flow (Home, Calculator, and ViewFees routes).
  • Internationalization: Added localized string resources for Spanish (values-es) and default English (values).

⚙️ Refactoring & Optimizations

  • State Hoisting: Refactored both OnboardingScreen and CalculatorFeesListScreen to hoist ScalingLazyListState to their parameters. This aligns with Jetpack Compose best practices and simplifies parent-level state coordination.
  • App Integration: Connected these features cleanly inside WearAppContent using a shared layout list state.

🧪 Quality Assurance

  • Added comprehensive UI instrumentation tests for the individual components and the primary onboarding container:
    • OnboardingScreenUiTest
    • StartCalculationButtonUiTest
    • ViewFeesButtonUiTest
    • Updated CalculatorFeesListScreenUiTest to match new constructor states.

📝 Reviewer Checklist

  • Application builds successfully and module dependencies are correctly defined.
  • Onboarding screen renders correctly as the start destination on a Wear OS emulator/device.
  • State-hoisting handles screen orientation changes or lazy list scroll preservation without issues.
  • UI tests pass successfully.

- Update OnboardingScreen to accept click actions for calculating and viewing fees.
- Extract StartCalculationButton and ViewFeesButton into dedicated Wear OS components.
- Add string resources for both English and Spanish localizations.
- Implement comprehensive UI tests for the onboarding screen and individual components using Compose HTML/JUnit4 rules.
…stScreen

Hoists the ScalingLazyListState to CalculatorFeesListScreen parameters to improve testability and state management from the parent level. Updates the associated UI test to pass a remembered state.
Hoists the ScalingLazyListState parameter to OnboardingScreen to match the project's state-hoisting patterns and align with recent UI changes. Updates the corresponding instrumentation tests to provide a remembered list state.
Refactors NavigationHost to incorporate the new onboarding user flow. Reassigns the Home route destination to a new welcome screen and introduces explicit destinations and route definitions for Calculator and ViewFees.
…nto app navigation

Connects the :features:wearos:onboarding module to the application build file. Updates WearAppContent to wire up the new OnboardingScreen and CalculatorFeesListScreen destinations within the NavigationHost, utilizing a shared scalingLazyListState.
@marlonlom marlonlom self-assigned this Jun 21, 2026
@marlonlom marlonlom added documentation Improvements or additions to documentation enhancement New feature or request dependencies Pull requests that update a dependency file labels Jun 21, 2026
@marlonlom marlonlom added kotlin Pull requests that update kotlin code jetpack-compose Pull request that update android code made with jetpack compose labels Jun 21, 2026
Updates the documentation for the NavigationHost composable to accurately reflect the current parameters (home, calculatorInput, calculatorOutput, viewFees, and navController) and clarify its overall purpose.
…fix UI tests

Refactors WearAppContent to accept isRound and scalingLazyListState as composable parameters with default values, improving testability and separation of concerns. Updates the corresponding KDoc documentation.

Fixes SmartwatchActivityTest UI tests by ensuring the initial onboarding interaction (start_calculation_action_button click) is explicitly performed before validating the input screen contents.
- Fix Home.route assertion to match the updated "welcome" destination.
- Add ViewFees.route assertion for "calculator_fees".
- Add Calculator.route assertion for "calculator_input".
@marlonlom marlonlom merged commit 479c93c into main Jun 21, 2026
2 checks passed
@marlonlom marlonlom deleted the feature/implement-wearos-onboarding branch June 21, 2026 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation enhancement New feature or request jetpack-compose Pull request that update android code made with jetpack compose kotlin Pull requests that update kotlin code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(wearos): Implement user onboarding flow and navigation integration

1 participant