Skip to content

Commit

Permalink
PM-13937: Replace tonal buttons with outline buttons (#4147)
Browse files Browse the repository at this point in the history
  • Loading branch information
david-livefront authored Oct 24, 2024
1 parent bdb6136 commit 6f535c0
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ import com.x8bit.bitwarden.ui.platform.components.appbar.BitwardenTopAppBar
import com.x8bit.bitwarden.ui.platform.components.appbar.action.BitwardenOverflowActionItem
import com.x8bit.bitwarden.ui.platform.components.appbar.action.OverflowMenuItemData
import com.x8bit.bitwarden.ui.platform.components.button.BitwardenFilledButton
import com.x8bit.bitwarden.ui.platform.components.button.BitwardenFilledTonalButton
import com.x8bit.bitwarden.ui.platform.components.button.BitwardenOutlinedButton
import com.x8bit.bitwarden.ui.platform.components.dialog.BasicDialogState
import com.x8bit.bitwarden.ui.platform.components.dialog.BitwardenBasicDialog
import com.x8bit.bitwarden.ui.platform.components.dialog.BitwardenLoadingDialog
Expand Down Expand Up @@ -286,7 +286,7 @@ private fun TwoFactorLoginScreenContent(
if (state.authMethod == TwoFactorAuthMethod.EMAIL) {
Spacer(modifier = Modifier.height(12.dp))

BitwardenFilledTonalButton(
BitwardenOutlinedButton(
label = stringResource(id = R.string.send_verification_code_again),
onClick = onResendEmailButtonClick,
modifier = Modifier
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ import com.x8bit.bitwarden.ui.platform.base.util.LivecycleEventEffect
import com.x8bit.bitwarden.ui.platform.base.util.bottomDivider
import com.x8bit.bitwarden.ui.platform.base.util.standardHorizontalMargin
import com.x8bit.bitwarden.ui.platform.components.appbar.BitwardenTopAppBar
import com.x8bit.bitwarden.ui.platform.components.button.BitwardenFilledTonalButtonWithIcon
import com.x8bit.bitwarden.ui.platform.components.button.BitwardenOutlinedButtonWithIcon
import com.x8bit.bitwarden.ui.platform.components.content.BitwardenErrorContent
import com.x8bit.bitwarden.ui.platform.components.content.BitwardenLoadingContent
import com.x8bit.bitwarden.ui.platform.components.dialog.BitwardenTwoButtonDialog
Expand Down Expand Up @@ -212,7 +212,7 @@ private fun PendingRequestsContent(
}
Spacer(modifier = Modifier.height(16.dp))

BitwardenFilledTonalButtonWithIcon(
BitwardenOutlinedButtonWithIcon(
label = stringResource(id = R.string.decline_all_requests),
icon = rememberVectorPainter(id = R.drawable.ic_trash),
onClick = { shouldShowDeclineAllRequestsConfirm = true },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ import com.x8bit.bitwarden.R
import com.x8bit.bitwarden.ui.platform.base.util.EventsEffect
import com.x8bit.bitwarden.ui.platform.base.util.bottomDivider
import com.x8bit.bitwarden.ui.platform.components.appbar.BitwardenTopAppBar
import com.x8bit.bitwarden.ui.platform.components.button.BitwardenFilledTonalButton
import com.x8bit.bitwarden.ui.platform.components.button.BitwardenOutlinedButton
import com.x8bit.bitwarden.ui.platform.components.fab.BitwardenFloatingActionButton
import com.x8bit.bitwarden.ui.platform.components.scaffold.BitwardenScaffold
import com.x8bit.bitwarden.ui.platform.components.util.rememberVectorPainter
Expand Down Expand Up @@ -235,7 +235,7 @@ private fun BlockAutoFillNoItems(

Spacer(modifier = Modifier.height(24.dp))

BitwardenFilledTonalButton(
BitwardenOutlinedButton(
modifier = Modifier
.fillMaxWidth()
.padding(horizontal = 16.dp),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import com.x8bit.bitwarden.R
import com.x8bit.bitwarden.ui.auth.feature.completeregistration.PasswordStrengthIndicator
import com.x8bit.bitwarden.ui.platform.base.util.EventsEffect
import com.x8bit.bitwarden.ui.platform.components.appbar.BitwardenTopAppBar
import com.x8bit.bitwarden.ui.platform.components.button.BitwardenFilledTonalButton
import com.x8bit.bitwarden.ui.platform.components.button.BitwardenOutlinedButton
import com.x8bit.bitwarden.ui.platform.components.card.BitwardenInfoCalloutCard
import com.x8bit.bitwarden.ui.platform.components.dialog.BasicDialogState
import com.x8bit.bitwarden.ui.platform.components.dialog.BitwardenBasicDialog
Expand Down Expand Up @@ -290,7 +290,7 @@ private fun ExportVaultScreenContent(

Spacer(modifier = Modifier.height(8.dp))

BitwardenFilledTonalButton(
BitwardenOutlinedButton(
label = stringResource(R.string.send_code),
onClick = onSendCodeClicked,
isEnabled = !state.policyPreventsExport,
Expand Down Expand Up @@ -342,7 +342,7 @@ private fun ExportVaultScreenContent(
Spacer(modifier = Modifier.height(8.dp))
}

BitwardenFilledTonalButton(
BitwardenOutlinedButton(
label = stringResource(id = R.string.export_vault),
onClick = onExportVaultClick,
isEnabled = !state.policyPreventsExport,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import com.x8bit.bitwarden.data.platform.repository.model.ClearClipboardFrequenc
import com.x8bit.bitwarden.data.platform.repository.util.displayLabel
import com.x8bit.bitwarden.ui.platform.base.util.EventsEffect
import com.x8bit.bitwarden.ui.platform.components.appbar.BitwardenTopAppBar
import com.x8bit.bitwarden.ui.platform.components.button.BitwardenFilledTonalButton
import com.x8bit.bitwarden.ui.platform.components.button.BitwardenOutlinedButton
import com.x8bit.bitwarden.ui.platform.components.dialog.BitwardenLoadingDialog
import com.x8bit.bitwarden.ui.platform.components.dialog.BitwardenSelectionDialog
import com.x8bit.bitwarden.ui.platform.components.dialog.BitwardenTwoButtonDialog
Expand Down Expand Up @@ -115,7 +115,7 @@ fun OtherScreen(

Spacer(modifier = Modifier.height(8.dp))

BitwardenFilledTonalButton(
BitwardenOutlinedButton(
onClick = remember(viewModel) {
{ viewModel.trySendAction(OtherAction.SyncNowButtonClick) }
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import androidx.compose.ui.semantics.semantics
import androidx.compose.ui.unit.dp
import com.x8bit.bitwarden.R
import com.x8bit.bitwarden.ui.platform.base.util.scrolledContainerBottomDivider
import com.x8bit.bitwarden.ui.platform.components.button.BitwardenFilledTonalButton
import com.x8bit.bitwarden.ui.platform.components.button.BitwardenOutlinedButton
import com.x8bit.bitwarden.ui.platform.components.button.BitwardenTextButton
import com.x8bit.bitwarden.ui.platform.components.card.BitwardenInfoCalloutCard
import com.x8bit.bitwarden.ui.platform.components.field.BitwardenPasswordField
Expand Down Expand Up @@ -171,7 +171,7 @@ fun AddSendContent(
style = BitwardenTheme.typography.bodySmall,
)
Spacer(modifier = Modifier.height(8.dp))
BitwardenFilledTonalButton(
BitwardenOutlinedButton(
label = stringResource(id = R.string.choose_file),
onClick = {
@Suppress("MaxLineLength")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.testTag
import androidx.compose.ui.res.stringResource
import com.x8bit.bitwarden.R
import com.x8bit.bitwarden.ui.platform.components.button.BitwardenFilledTonalButton
import com.x8bit.bitwarden.ui.platform.components.button.BitwardenOutlinedButton
import com.x8bit.bitwarden.ui.platform.components.dialog.BitwardenSelectionDialog
import com.x8bit.bitwarden.ui.platform.components.dialog.BitwardenTextEntryDialog
import com.x8bit.bitwarden.ui.platform.components.dialog.row.BitwardenBasicDialogRow
Expand Down Expand Up @@ -72,7 +72,7 @@ fun VaultAddEditCustomFieldsButton(
)
}

BitwardenFilledTonalButton(
BitwardenOutlinedButton(
label = stringResource(id = R.string.new_custom_field),
onClick = { shouldShowChooserDialog = true },
modifier = modifier.testTag("NewCustomFieldButton"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ import androidx.compose.ui.unit.dp
import com.x8bit.bitwarden.R
import com.x8bit.bitwarden.ui.platform.base.util.Text
import com.x8bit.bitwarden.ui.platform.components.button.BitwardenFilledIconButton
import com.x8bit.bitwarden.ui.platform.components.button.BitwardenFilledTonalButton
import com.x8bit.bitwarden.ui.platform.components.button.BitwardenFilledTonalButtonWithIcon
import com.x8bit.bitwarden.ui.platform.components.button.BitwardenOutlinedButton
import com.x8bit.bitwarden.ui.platform.components.button.BitwardenOutlinedButtonWithIcon
import com.x8bit.bitwarden.ui.platform.components.button.BitwardenStandardIconButton
import com.x8bit.bitwarden.ui.platform.components.dialog.BitwardenTwoButtonDialog
import com.x8bit.bitwarden.ui.platform.components.dropdown.BitwardenMultiSelectButton
Expand Down Expand Up @@ -144,7 +144,7 @@ fun LazyListScope.vaultAddEditLoginItems(
} else {
item {
Spacer(modifier = Modifier.height(16.dp))
BitwardenFilledTonalButtonWithIcon(
BitwardenOutlinedButtonWithIcon(
label = stringResource(id = R.string.setup_totp),
icon = rememberVectorPainter(id = R.drawable.ic_light_bulb),
onClick = onTotpSetupClick,
Expand Down Expand Up @@ -177,7 +177,7 @@ fun LazyListScope.vaultAddEditLoginItems(

item {
Spacer(modifier = Modifier.height(16.dp))
BitwardenFilledTonalButton(
BitwardenOutlinedButton(
label = stringResource(id = R.string.new_uri),
onClick = loginItemTypeHandlers.onAddNewUriClick,
modifier = Modifier
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.unit.dp
import com.x8bit.bitwarden.R
import com.x8bit.bitwarden.ui.platform.base.util.bottomDivider
import com.x8bit.bitwarden.ui.platform.components.button.BitwardenFilledTonalButton
import com.x8bit.bitwarden.ui.platform.components.button.BitwardenOutlinedButton
import com.x8bit.bitwarden.ui.platform.components.button.BitwardenStandardIconButton
import com.x8bit.bitwarden.ui.platform.components.dialog.BitwardenTwoButtonDialog
import com.x8bit.bitwarden.ui.platform.components.header.BitwardenListHeaderText
Expand Down Expand Up @@ -98,7 +98,7 @@ fun AttachmentsContent(

item {
Spacer(modifier = Modifier.height(8.dp))
BitwardenFilledTonalButton(
BitwardenOutlinedButton(
label = stringResource(id = R.string.choose_file),
onClick = attachmentsHandlers.onChooseFileClick,
modifier = Modifier
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import androidx.lifecycle.compose.collectAsStateWithLifecycle
import com.x8bit.bitwarden.R
import com.x8bit.bitwarden.ui.platform.base.util.EventsEffect
import com.x8bit.bitwarden.ui.platform.components.appbar.BitwardenTopAppBar
import com.x8bit.bitwarden.ui.platform.components.button.BitwardenFilledTonalButton
import com.x8bit.bitwarden.ui.platform.components.button.BitwardenOutlinedButton
import com.x8bit.bitwarden.ui.platform.components.dialog.BitwardenTwoButtonDialog
import com.x8bit.bitwarden.ui.platform.components.field.BitwardenTextField
import com.x8bit.bitwarden.ui.platform.components.scaffold.BitwardenScaffold
Expand Down Expand Up @@ -147,7 +147,7 @@ fun ManualCodeEntryScreen(
)

Spacer(modifier = Modifier.height(16.dp))
BitwardenFilledTonalButton(
BitwardenOutlinedButton(
label = stringResource(id = R.string.add_totp),
onClick = remember(viewModel) {
{ viewModel.trySendAction(ManualCodeEntryAction.CodeSubmit) }
Expand Down

0 comments on commit 6f535c0

Please sign in to comment.