Conversation
68c4502 to
b606556
Compare
There was a problem hiding this comment.
Pull Request Overview
This PR implements the SharedPrivateContactInfo feature for the share screen, adding UI components and logic to manage private contact information sharing. The implementation includes form fields for email and phone number with associated toggle switches to control sharing preferences.
- Adds data structures and view model logic to handle private contact information state
- Creates reusable UI components for editable fields with toggle switches and section titles
- Integrates the new functionality into the share screen with proper event handling
Reviewed Changes
Copilot reviewed 12 out of 15 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| ShareEvent.kt | Defines events for email/phone value and sharing state changes |
| ShareUiState.kt | Adds PrivateContactInfo data structure to share state |
| ShareViewModel.kt | Implements event handling for private contact info updates |
| ShareScreen.kt | Integrates SharePrivateContactInfo component into the main screen |
| ShareEditableField.kt | Creates reusable text field component with toggle switch |
| ShareSectionTitle.kt | Creates section header component with left/right icons |
| SharePrivateContactInfo.kt | Main component combining title and editable fields |
| strings.xml | Adds localized strings for contact info placeholders and title |
| SharePrivateContactInfoTest.kt | Roborazzi screenshot tests for the new component |
| ShareViewModelTest.kt | Unit tests for view model event handling |
.../main/kotlin/com/gravatar/app/homeUi/presentation/home/share/components/ShareSectionTitle.kt
Outdated
Show resolved
Hide resolved
| rightIcon?.let { | ||
| Icon( | ||
| painter = painterResource(id = it), | ||
| contentDescription = null |
There was a problem hiding this comment.
The right icon has contentDescription = null but no tint specified, unlike the left icon which has both. Consider adding a tint for visual consistency or providing a meaningful content description for accessibility.
| contentDescription = null | |
| contentDescription = null, // Decorative icon, no content description needed for accessibility | |
| tint = MaterialTheme.colorScheme.onSurface.copy(alpha = 0.6f) |
b606556 to
156748d
Compare
This commit will keep the info in the ViewModel. We still need to persist that info locally. # Conflicts: # homeUi/src/main/kotlin/com/gravatar/app/homeUi/presentation/home/share/ShareScreen.kt # homeUi/src/main/kotlin/com/gravatar/app/homeUi/presentation/home/share/ShareUiState.kt # homeUi/src/main/res/values/strings.xml
156748d to
4b78b23
Compare
...main/kotlin/com/gravatar/app/homeUi/presentation/home/share/components/ShareEditableField.kt
Outdated
Show resolved
Hide resolved
.../main/kotlin/com/gravatar/app/homeUi/presentation/home/share/components/ShareSectionTitle.kt
Outdated
Show resolved
Hide resolved
.../main/kotlin/com/gravatar/app/homeUi/presentation/home/share/components/ShareSectionTitle.kt
Show resolved
Hide resolved
AdamGrzybkowski
left a comment
There was a problem hiding this comment.
Left some minor comments to align with the designs.
Description
This PR adds the shared private contact info section to the share screen. For the moment, the information filled by the user is only preserved in the ViewModel, so we still need to persist it locally. To keep this PR small, that will be made in a subsequent PR.
Testing Steps