feat: Add ContactCard screen, editor, preview and onboarding - #822
feat: Add ContactCard screen, editor, preview and onboarding#822Elouan1411 wants to merge 12 commits into
Conversation
adb2a70 to
a3f07ae
Compare
a3f07ae to
e74afd2
Compare
a4e584a to
57ceebf
Compare
There was a problem hiding this comment.
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. |
c8077ad to
04299b9
Compare
04299b9 to
5cbc2f8
Compare
6a5dad7 to
8880bbd
Compare
8880bbd to
e8d51cf
Compare
| val lastname: String, | ||
| val email: String, | ||
| val avatar: String?, | ||
| @SerializedName("phones") @SerialName("phones") |
There was a problem hiding this comment.
This is useless if it's the same name as the variable
4ffc257 to
76d5b01
Compare
76d5b01 to
95d9334
Compare
95d9334 to
dd06c0e
Compare
| onRemoveAdditionalUrl: (String) -> Unit, | ||
| onUpdateDraft: (ContactCardEditorState) -> Unit, | ||
| modifier: Modifier = Modifier, | ||
| confirmValidationError: ((onConfirmed: () -> Unit) -> Unit)? = null, |
There was a problem hiding this comment.
It seems you never use onConfirmed: () -> Unit.
| modifier = modifier | ||
| .verticalScroll(rememberScrollState()) | ||
| .padding(vertical = Margin.Medium), | ||
| verticalArrangement = androidx.compose.foundation.layout.Arrangement.spacedBy(Margin.Medium), |
There was a problem hiding this comment.
You can add an import for this.
|
|
||
| @Composable | ||
| internal fun OnboardingContent( | ||
| userName: String, |
|
|
||
| @Composable | ||
| @OptIn(ExperimentalMaterial3Api::class) | ||
| internal fun PreviewActionsBottomSheet( |
There was a problem hiding this comment.
The navigation bar buttons background is not transparent.
| matomoInstance?.trackScreen(path = screenName, title = screenName) | ||
| } | ||
|
|
||
| const val CONTACT_CARD_CATEGORY = "contactCard" |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
I just noticed that you load this from ContactCardFragmentwhich is not great. It should be done from the viewModel.
dd06c0e to
95d9334
Compare
|



No description provided.