PM-17765 & PM-17767 Adjust spacing in vault screen and adjust account switcher icon size and minimum row height (#4661)

This commit is contained in:
Dave Severns
2025-01-31 10:23:10 -05:00
committed by GitHub
parent f141465b41
commit 2b79cc9a17
2 changed files with 19 additions and 8 deletions

View File

@@ -22,6 +22,7 @@ import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.navigationBars
import androidx.compose.foundation.layout.only
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.requiredHeightIn
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.union
import androidx.compose.foundation.layout.width
@@ -286,6 +287,7 @@ private fun AccountSummaryItem(
verticalAlignment = Alignment.CenterVertically,
modifier = Modifier
.testTag("AccountCell")
.requiredHeightIn(min = 60.dp)
.combinedClickable(
interactionSource = remember { MutableInteractionSource() },
indication = ripple(
@@ -304,14 +306,14 @@ private fun AccountSummaryItem(
painter = rememberVectorPainter(id = R.drawable.ic_account_initials_container),
contentDescription = null,
tint = accountSummary.avatarColor,
modifier = Modifier.size(40.dp),
modifier = Modifier.size(24.dp),
)
Text(
text = accountSummary.initials,
style = BitwardenTheme.typography.titleMedium
// Do not allow scaling
.copy(fontSize = 16.dp.toUnscaledTextUnit()),
.copy(fontSize = 12.dp.toUnscaledTextUnit()),
color = accountSummary.avatarColor.toSafeOverlayColor(),
modifier = Modifier.clearAndSetSemantics { },
)

View File

@@ -72,12 +72,12 @@ fun VaultContent(
.testTag("VerificationCodesFilter")
.standardHorizontalMargin(),
)
Spacer(modifier = Modifier.height(height = 16.dp))
}
}
if (state.favoriteItems.isNotEmpty()) {
item {
Spacer(modifier = Modifier.height(height = 16.dp))
BitwardenListHeaderText(
label = stringResource(id = R.string.favorites),
supportingLabel = state.favoriteItems.count().toString(),
@@ -118,11 +118,11 @@ fun VaultContent(
.testTag("CipherCell")
.standardHorizontalMargin(),
)
Spacer(modifier = Modifier.height(height = 16.dp))
}
}
item {
Spacer(modifier = Modifier.height(height = 16.dp))
BitwardenListHeaderText(
label = stringResource(id = R.string.types),
supportingLabel = state.itemTypesCount.toString(),
@@ -220,9 +220,12 @@ fun VaultContent(
}
}
item {
Spacer(modifier = Modifier.height(height = 16.dp))
}
if (state.folderItems.isNotEmpty()) {
item {
Spacer(modifier = Modifier.height(height = 16.dp))
BitwardenListHeaderText(
label = stringResource(id = R.string.folders),
supportingLabel = state.folderItems.count().toString(),
@@ -250,11 +253,13 @@ fun VaultContent(
.standardHorizontalMargin(),
)
}
item {
Spacer(modifier = Modifier.height(height = 16.dp))
}
}
if (state.noFolderItems.isNotEmpty()) {
item {
Spacer(modifier = Modifier.height(height = 16.dp))
BitwardenListHeaderText(
label = stringResource(id = R.string.folder_none),
supportingLabel = state.noFolderItems.count().toString(),
@@ -295,11 +300,13 @@ fun VaultContent(
.standardHorizontalMargin(),
)
}
item {
Spacer(modifier = Modifier.height(height = 16.dp))
}
}
if (state.collectionItems.isNotEmpty()) {
item {
Spacer(modifier = Modifier.height(height = 16.dp))
BitwardenListHeaderText(
label = stringResource(id = R.string.collections),
supportingLabel = state.collectionItems.count().toString(),
@@ -327,10 +334,12 @@ fun VaultContent(
.standardHorizontalMargin(),
)
}
item {
Spacer(modifier = Modifier.height(height = 16.dp))
}
}
item {
Spacer(modifier = Modifier.height(height = 16.dp))
BitwardenListHeaderText(
label = stringResource(id = R.string.trash),
supportingLabel = TRASH_TYPES_COUNT.toString(),