Adopt the new start chat button design. (#4013)

* Update compound and handle plain to tertiary/textLink button style updates.

* Update the start chat button to use the right icon/style.

* Update preview snapshots.

* Fix remaining snapshots.
This commit is contained in:
Doug
2025-04-11 17:09:57 +01:00
committed by GitHub
parent 511c4d7bf7
commit a5d94a0219
176 changed files with 385 additions and 363 deletions
@@ -163,8 +163,9 @@ struct HomeScreen: View {
Button {
context.send(viewAction: .startChat)
} label: {
CompoundIcon(\.compose)
CompoundIcon(\.plus)
}
.buttonStyle(.compound(.super, size: .toolbarIcon))
.accessibilityLabel(L10n.actionStartChat)
.accessibilityIdentifier(A11yIdentifiers.homeScreen.startChat)
default:
@@ -109,13 +109,19 @@ struct HomeScreenInviteCell: View {
private var buttons: some View {
HStack(spacing: 12) {
Button(L10n.actionDecline) {
Button {
context.send(viewAction: .declineInvite(roomIdentifier: room.id))
} label: {
Text(L10n.actionDecline)
.frame(maxWidth: .infinity)
}
.buttonStyle(.compound(.secondary, size: .medium))
Button(L10n.actionAccept) {
Button {
context.send(viewAction: .acceptInvite(roomIdentifier: room.id))
} label: {
Text(L10n.actionAccept)
.frame(maxWidth: .infinity)
}
.buttonStyle(.compound(.primary, size: .medium))
}
@@ -80,10 +80,12 @@ struct HomeScreenRecoveryKeyConfirmationBanner: View {
var buttons: some View {
VStack(spacing: 16) {
Button(actionTitle) {
Button {
context.send(viewAction: primaryAction)
} label: {
Text(actionTitle)
.frame(maxWidth: .infinity)
}
.frame(maxWidth: .infinity)
.buttonStyle(.compound(.primary, size: .medium))
.accessibilityIdentifier(A11yIdentifiers.homeScreen.recoveryKeyConfirmationBannerContinue)
@@ -92,10 +94,9 @@ struct HomeScreenRecoveryKeyConfirmationBanner: View {
context.send(viewAction: .resetEncryption)
} label: {
Text(L10n.confirmRecoveryKeyBannerSecondaryButtonTitle)
.padding(.vertical, 7)
.frame(maxWidth: .infinity)
}
.buttonStyle(.compound(.plain, size: .medium))
.buttonStyle(.compound(.tertiary, size: .medium))
}
}
}