diff options
| author | 2023-03-07 03:28:09 +0000 | |
|---|---|---|
| committer | 2023-03-07 05:06:33 +0000 | |
| commit | 48f4a730f6ecb4058392ea8312940796fc67b7dd (patch) | |
| tree | 0ede492441add113b6162140d6c20bba304a43fd | |
| parent | 5b1b82c3f22cc6dd8afa48141d7a77e1f72670ac (diff) | |
[CredManUi] Do not truncate password values.
Also a few other minor fixes:
- Typos identified from previous changes.
- Remove the divider before the action chips
Bug: 269365202
Test: manual (see bug for screenshots)
Change-Id: I4a2117738cec904272ee4a938ee6f056c04babc9
3 files changed, 9 insertions, 11 deletions
diff --git a/packages/CredentialManager/src/com/android/credentialmanager/CredentialSelectorViewModel.kt b/packages/CredentialManager/src/com/android/credentialmanager/CredentialSelectorViewModel.kt index ca30c53a6d83..ce18335769a8 100644 --- a/packages/CredentialManager/src/com/android/credentialmanager/CredentialSelectorViewModel.kt +++ b/packages/CredentialManager/src/com/android/credentialmanager/CredentialSelectorViewModel.kt @@ -44,7 +44,7 @@ data class UiState( val selectedEntry: BaseEntry? = null, val providerActivityState: ProviderActivityState = ProviderActivityState.NOT_APPLICABLE, val dialogState: DialogState = DialogState.ACTIVE, - // True if the UI has one and onely one auto selectable entry. Its provider activiey will be + // True if the UI has one and only one auto selectable entry. Its provider activity will be // launched immediately, and canceling it will cancel the whole UI flow. val isAutoSelectFlow: Boolean = false, ) diff --git a/packages/CredentialManager/src/com/android/credentialmanager/common/ui/Entry.kt b/packages/CredentialManager/src/com/android/credentialmanager/common/ui/Entry.kt index c0c29bb021d0..192354258fb2 100644 --- a/packages/CredentialManager/src/com/android/credentialmanager/common/ui/Entry.kt +++ b/packages/CredentialManager/src/com/android/credentialmanager/common/ui/Entry.kt @@ -102,8 +102,9 @@ fun Entry( SmallTitleText(text = entryHeadlineText, enforceOneLine = enforceOneLine) if (passwordValue != null) { Row( - modifier = Modifier.fillMaxWidth(), + modifier = Modifier.fillMaxWidth().padding(top = 4.dp), verticalAlignment = Alignment.CenterVertically, + horizontalArrangement = Arrangement.Start, ) { val visualTransformation = remember { PasswordVisualTransformation() } val originalPassword by remember { @@ -117,9 +118,13 @@ fun Entry( ) } BodySmallText( - text = displayedPassword.value, enforceOneLine = enforceOneLine) + text = displayedPassword.value, + // Apply weight to allow visibility button to render first so that + // it doesn't get squeezed out by a super long password. + modifier = Modifier.wrapContentSize().weight(1f, fill = false), + ) ToggleVisibilityButton( - modifier = Modifier.padding(start = 12.dp, top = 5.dp).size(24.dp), + modifier = Modifier.padding(start = 12.dp).size(24.dp), onToggle = { if (it) { displayedPassword.value = originalPassword diff --git a/packages/CredentialManager/src/com/android/credentialmanager/getflow/GetCredentialComponents.kt b/packages/CredentialManager/src/com/android/credentialmanager/getflow/GetCredentialComponents.kt index ab947aef8e01..a9f994db430a 100644 --- a/packages/CredentialManager/src/com/android/credentialmanager/getflow/GetCredentialComponents.kt +++ b/packages/CredentialManager/src/com/android/credentialmanager/getflow/GetCredentialComponents.kt @@ -295,13 +295,6 @@ fun AllSignInOptionCard( ) } } - item { - Divider( - thickness = 1.dp, - color = Color.LightGray, - modifier = Modifier.padding(top = 16.dp) - ) - } // Manage sign-ins (action chips) item { ActionChips( |