Skip to content

feat(phone-app): migrate Settings screen to Jetpack Compose Material 3 (#42) - #55

Closed
hungify wants to merge 1 commit into
mainfrom
feature/issue-42-settings-screen-compose
Closed

hungify wants to merge 1 commit into
mainfrom
feature/issue-42-settings-screen-compose

Conversation

@hungify

@hungify hungify commented Aug 26, 2026

Copy link
Copy Markdown
Owner

Summary

Migrates the phone app's Settings screen from legacy XML views and ViewBinding to a declarative Jetpack Compose Material 3 UI with reactive state handling.

Key Changes

  • SettingsScreen.kt:
    • Implements modern Material 3 Scaffold, TopAppBar, and back navigation.
    • Adds SingleChoiceSegmentedButtonRow for selecting default travel mode (Motorbike / Driving vs Walking).
    • Implements OutlinedTextField inputs for driving and walking watch vibration threshold distances with real-time numeric validation and range hints (10–1000 m).
    • Connects reactive UI state to SettingsViewModel via collectAsStateWithLifecycle() and displays save/error feedback via SnackbarHost.
    • Includes @Preview composables for both Light and Dark theme modes.
  • SettingsActivity.kt: Converted from AppCompatActivity with XML ViewBinding to ComponentActivity rendering SettingsScreen within WatchNavigatorTheme.
  • SettingsViewModelTest.kt: Added boundary validation and ViewModel factory unit tests.

Verification

  • ./gradlew testDebugUnitTest: All unit tests pass cleanly.
  • ./gradlew spotlessCheck: Spotless ktlint formatting checks pass.
  • make test: Cross-module unit tests (phone & watch) pass 100%.

Closes #42

@coderabbitai

coderabbitai Bot commented Aug 26, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 57 minutes.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: a8c6d9a2-35b5-4ecf-9f5d-756a28a8750e

📥 Commits

Reviewing files that changed from the base of the PR and between 179134a and 412c13a.

📒 Files selected for processing (1)
  • phone-app/app/src/test/java/com/watchnavigator/ui/SettingsViewModelTest.kt

Warning

Your free Security trial is over. An organization admin can activate billing to continue.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@hungify
hungify force-pushed the feature/issue-42-settings-screen-compose branch from 3e49c57 to 412c13a Compare August 26, 2026 00:13
@hungify

hungify commented Aug 26, 2026

Copy link
Copy Markdown
Owner Author

Changes and additional boundary tests have been integrated into main via PR #54 and commit 76471fb.

@hungify hungify closed this Aug 26, 2026
@hungify
hungify deleted the feature/issue-42-settings-screen-compose branch August 26, 2026 00:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(phone-app): migrate Settings screen to Jetpack Compose Material 3

1 participant