Skip to content
This repository was archived by the owner on Aug 21, 2025. It is now read-only.

Implement SharedPrivateContactInfo#74

Merged
hamorillo merged 3 commits intotrunkfrom
hamorillo/GRA-576
Jul 23, 2025
Merged

Implement SharedPrivateContactInfo#74
hamorillo merged 3 commits intotrunkfrom
hamorillo/GRA-576

Conversation

@hamorillo
Copy link

@hamorillo hamorillo commented Jul 23, 2025

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.

image

Testing Steps

  • Launch the app
  • Navigate to Share screen
  • Verify the UI of the new section and that you can play with the switches and edit fields.

@hamorillo hamorillo force-pushed the hamorillo/GRA-576 branch from 68c4502 to b606556 Compare July 23, 2025 10:34
@hamorillo hamorillo marked this pull request as ready for review July 23, 2025 10:35
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

rightIcon?.let {
Icon(
painter = painterResource(id = it),
contentDescription = null
Copy link

Copilot AI Jul 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
contentDescription = null
contentDescription = null, // Decorative icon, no content description needed for accessibility
tint = MaterialTheme.colorScheme.onSurface.copy(alpha = 0.6f)

Copilot uses AI. Check for mistakes.
@hamorillo hamorillo force-pushed the hamorillo/GRA-576 branch from b606556 to 156748d Compare July 23, 2025 10:52
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
@hamorillo hamorillo force-pushed the hamorillo/GRA-576 branch from 156748d to 4b78b23 Compare July 23, 2025 10:57
Copy link
Contributor

@AdamGrzybkowski AdamGrzybkowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some minor comments to align with the designs.

@hamorillo hamorillo merged commit 4e14840 into trunk Jul 23, 2025
10 of 11 checks passed
@hamorillo hamorillo deleted the hamorillo/GRA-576 branch July 23, 2025 16:19
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants