Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7aea3b42 authored by Harini Rajan's avatar Harini Rajan Committed by Android (Google) Code Review
Browse files

Merge "More UX polish Bug: 323607982 Test: Unit tests, Manual See...

Merge "More UX polish Bug: 323607982 Test: Unit tests, Manual See go/credential-selector-ui" into main
parents 764be7d2 badcbe89
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -124,7 +124,6 @@ fun WearApp(
                handleGetNavigation(
                    navController = navController,
                    state = state,
                    onCloseApp = onCloseApp,
                    selectEntry = selectEntry
                )
            }
@@ -147,7 +146,6 @@ fun WearApp(
private fun handleGetNavigation(
    navController: NavController,
    state: CredentialSelectorUiState.Get,
    onCloseApp: () -> Unit,
    selectEntry: (entry: EntryInfo, isAutoSelected: Boolean) -> Unit,
) {
    when (state) {
+1 −1
Original line number Diff line number Diff line
@@ -56,6 +56,6 @@ fun SignInHeader(
            text = title,
        )

        Spacer(modifier = Modifier.size(12.dp))
        Spacer(modifier = Modifier.size(8.dp))
    }
}
+5 −6
Original line number Diff line number Diff line
@@ -27,7 +27,7 @@ import com.android.credentialmanager.CredentialSelectorUiState.Get.MultipleEntry
import com.android.credentialmanager.FlowEngine
import com.android.credentialmanager.R
import com.android.credentialmanager.common.ui.components.WearButtonText
import com.android.credentialmanager.common.ui.components.WearDisplayNameText
import com.android.credentialmanager.common.ui.components.WearSecondaryLabel
import com.android.credentialmanager.model.get.CredentialEntryInfo
import com.android.credentialmanager.ui.components.CredentialsScreenChipSpacer
import com.google.android.horologist.annotations.ExperimentalHorologistApi
@@ -64,10 +64,9 @@ fun MultiCredentialsFlattenScreen(

        credentialSelectorUiState.accounts.forEach { userNameEntries ->
            item {
                WearDisplayNameText(
                WearSecondaryLabel(
                    text = userNameEntries.userName,
                    modifier = Modifier.padding(top = 16.dp, bottom = 8.dp, start = 14.dp,
                        end = 14.dp)
                    modifier = Modifier.padding(top = 12.dp, bottom = 4.dp)
                )
            }

@@ -86,9 +85,9 @@ fun MultiCredentialsFlattenScreen(
            }
        }
        item {
            WearDisplayNameText(
            WearSecondaryLabel(
                text = stringResource(R.string.provider_list_title),
                modifier = Modifier.padding(top = 12.dp, bottom = 8.dp, start = 14.dp, end = 14.dp)
                modifier = Modifier.padding(top = 12.dp, bottom = 4.dp)
            )
        }
        credentialSelectorUiState.actionEntryList.forEach { actionEntry ->
+18 −12
Original line number Diff line number Diff line
@@ -61,7 +61,10 @@ fun MultiCredentialsFoldScreen(
        val credentials = credentialSelectorUiState.sortedEntries
        item {
            var title = stringResource(R.string.choose_sign_in_title)
            if (credentials.all{ it.credentialType == CredentialType.PASSKEY }) {

            if (credentials.isEmpty()) {
                title = stringResource(R.string.choose_sign_in_title)
            } else if (credentials.all{ it.credentialType == CredentialType.PASSKEY }) {
                title = stringResource(R.string.choose_passkey_title)
            } else if (credentials.all { it.credentialType == CredentialType.PASSWORD }) {
                title = stringResource(R.string.choose_password_title)
@@ -93,10 +96,13 @@ fun MultiCredentialsFoldScreen(
                CredentialsScreenChipSpacer()
            }
        }

        item {
            Spacer(modifier = Modifier.size(8.dp))
        }

        item {
            Spacer(modifier = Modifier.size(12.dp))
            SignInOptionsChip { flowEngine.openSecondaryScreen() }
            CredentialsScreenChipSpacer()
        }
        item {
            DismissChip { flowEngine.cancel() }
+10 −2
Original line number Diff line number Diff line
@@ -61,10 +61,18 @@ fun SinglePasskeyScreen(
            )
        },
        accountContent = {
            val displayName = entry.displayName
            if (displayName == null ||
                entry.displayName.equals(entry.userName, ignoreCase = true)) {
                AccountRow(
                    primaryText = checkNotNull(entry.displayName),
                    primaryText = entry.userName,
                )
            } else {
                AccountRow(
                    primaryText = displayName,
                    secondaryText = entry.userName,
                )
            }
        },
        columnState = columnState,
        modifier = Modifier.padding(horizontal = 10.dp)
Loading