Skip to content

feat: Add ContactCard screen, editor, preview and onboarding - #822

Open
Elouan1411 wants to merge 12 commits into
vcard-4-viewmodel-headersfrom
vcard-5-screen-content
Open

feat: Add ContactCard screen, editor, preview and onboarding#822
Elouan1411 wants to merge 12 commits into
vcard-4-viewmodel-headersfrom
vcard-5-screen-content

Conversation

@Elouan1411

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds the Contact Card Compose flow for onboarding, editing, previewing, sharing, and deletion.

Changes:

  • Introduces state-driven Contact Card screen navigation.
  • Adds onboarding and editor interfaces.
  • Adds preview content and edit/delete actions.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
ContactCardScreen.kt Coordinates screen states, actions, dialogs, and top bars.
PreviewContent.kt Displays the contact card and share action.
PreviewActionsBottomSheet.kt Provides edit and delete actions.
OnboardingContent.kt Adds onboarding content and creation action.
EditorContent.kt Adds contact fields, URL management, and validation.

@tevincent tevincent left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot changes

@Elouan1411
Elouan1411 force-pushed the vcard-5-screen-content branch 2 times, most recently from c8077ad to 04299b9 Compare August 3, 2026 15:05
@Elouan1411
Elouan1411 force-pushed the vcard-5-screen-content branch from 04299b9 to 5cbc2f8 Compare August 11, 2026 10:38
@Elouan1411
Elouan1411 force-pushed the vcard-5-screen-content branch 3 times, most recently from 6a5dad7 to 8880bbd Compare August 12, 2026 11:38
Comment thread Ui/Compose/ContactCard/src/main/AndroidManifest.xml Fixed
Comment thread Ui/Compose/ContactCard/src/main/AndroidManifest.xml Fixed
@Elouan1411
Elouan1411 force-pushed the vcard-5-screen-content branch from 8880bbd to e8d51cf Compare August 12, 2026 12:32
val lastname: String,
val email: String,
val avatar: String?,
@SerializedName("phones") @SerialName("phones")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is useless if it's the same name as the variable

@Elouan1411
Elouan1411 force-pushed the vcard-5-screen-content branch from 4ffc257 to 76d5b01 Compare August 13, 2026 06:54
@Elouan1411
Elouan1411 force-pushed the vcard-5-screen-content branch from 76d5b01 to 95d9334 Compare August 13, 2026 06:57
@Elouan1411
Elouan1411 force-pushed the vcard-5-screen-content branch from 95d9334 to dd06c0e Compare August 13, 2026 07:26
onRemoveAdditionalUrl: (String) -> Unit,
onUpdateDraft: (ContactCardEditorState) -> Unit,
modifier: Modifier = Modifier,
confirmValidationError: ((onConfirmed: () -> Unit) -> Unit)? = null,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It seems you never use onConfirmed: () -> Unit.

modifier = modifier
.verticalScroll(rememberScrollState())
.padding(vertical = Margin.Medium),
verticalArrangement = androidx.compose.foundation.layout.Arrangement.spacedBy(Margin.Medium),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You can add an import for this.


@Composable
internal fun OnboardingContent(
userName: String,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is used ?


@Composable
@OptIn(ExperimentalMaterial3Api::class)
internal fun PreviewActionsBottomSheet(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The navigation bar buttons background is not transparent.

matomoInstance?.trackScreen(path = screenName, title = screenName)
}

const val CONTACT_CARD_CATEGORY = "contactCard"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You have to put that at the top and in private since it's only used here.

//region Previews

@Composable
private fun DefaultTopBar(state: ContactCardTopBarState) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think you can put this in its own file.


HttpClient.okHttpClient.newCall(request).await().use { response ->
val body = response.body ?: return@runCatching null to null
val body = response.body

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I just noticed that you load this from ContactCardFragmentwhich is not great. It should be done from the viewModel.

@Elouan1411
Elouan1411 force-pushed the vcard-5-screen-content branch from dd06c0e to 95d9334 Compare August 13, 2026 16:09
@sonarqubecloud

Copy link
Copy Markdown

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.

5 participants