diff --git a/ElementX.xcodeproj/project.pbxproj b/ElementX.xcodeproj/project.pbxproj
index 3715c0d460..ccf8c1d363 100644
--- a/ElementX.xcodeproj/project.pbxproj
+++ b/ElementX.xcodeproj/project.pbxproj
@@ -6628,7 +6628,7 @@
repositoryURL = "https://github.com/vector-im/compound-ios";
requirement = {
kind = revision;
- revision = eba9d995974fcedd55549395d56e336e5ff70cdf;
+ revision = 34dcd1e2960f3b0b7f50d6e7d020c108d5acf604;
};
};
9A472EE0218FE7DCF5283429 /* XCRemoteSwiftPackageReference "SwiftUI-Introspect" */ = {
diff --git a/ElementX.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/ElementX.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
index 6879f47cf7..1f5e1128ef 100644
--- a/ElementX.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
+++ b/ElementX.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
@@ -5,7 +5,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/vector-im/compound-design-tokens.git",
"state" : {
- "revision" : "387d2b7211f07761c67e849c59414a1bb803defa"
+ "revision" : "b603371c5e4ac798f4613a7388d2305100b31911",
+ "version" : "0.0.7"
}
},
{
@@ -13,7 +14,7 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/vector-im/compound-ios",
"state" : {
- "revision" : "eba9d995974fcedd55549395d56e336e5ff70cdf"
+ "revision" : "34dcd1e2960f3b0b7f50d6e7d020c108d5acf604"
}
},
{
diff --git a/ElementX/Resources/Assets.xcassets/images/composer/mic-fill.imageset/Contents.json b/ElementX/Resources/Assets.xcassets/images/composer/mic-fill.imageset/Contents.json
deleted file mode 100644
index 11ad3f3af3..0000000000
--- a/ElementX/Resources/Assets.xcassets/images/composer/mic-fill.imageset/Contents.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- "images" : [
- {
- "filename" : "mic-fill.svg",
- "idiom" : "universal"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- },
- "properties" : {
- "preserves-vector-representation" : true,
- "template-rendering-intent" : "template"
- }
-}
diff --git a/ElementX/Resources/Assets.xcassets/images/composer/mic-fill.imageset/mic-fill.svg b/ElementX/Resources/Assets.xcassets/images/composer/mic-fill.imageset/mic-fill.svg
deleted file mode 100644
index 7808332fcd..0000000000
--- a/ElementX/Resources/Assets.xcassets/images/composer/mic-fill.imageset/mic-fill.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-
diff --git a/ElementX/Resources/Assets.xcassets/images/composer/mic.imageset/Contents.json b/ElementX/Resources/Assets.xcassets/images/composer/mic.imageset/Contents.json
deleted file mode 100644
index 03a8f82745..0000000000
--- a/ElementX/Resources/Assets.xcassets/images/composer/mic.imageset/Contents.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- "images" : [
- {
- "filename" : "mic.svg",
- "idiom" : "universal"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- },
- "properties" : {
- "preserves-vector-representation" : true,
- "template-rendering-intent" : "template"
- }
-}
diff --git a/ElementX/Resources/Assets.xcassets/images/composer/mic.imageset/mic.svg b/ElementX/Resources/Assets.xcassets/images/composer/mic.imageset/mic.svg
deleted file mode 100644
index a0a78f3a8a..0000000000
--- a/ElementX/Resources/Assets.xcassets/images/composer/mic.imageset/mic.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-
diff --git a/ElementX/Sources/Generated/Assets.swift b/ElementX/Sources/Generated/Assets.swift
index dc72a70eaa..18fe14afb6 100644
--- a/ElementX/Sources/Generated/Assets.swift
+++ b/ElementX/Sources/Generated/Assets.swift
@@ -49,8 +49,6 @@ internal enum Asset {
internal static let inlineCode = ImageAsset(name: "images/inline-code")
internal static let italic = ImageAsset(name: "images/italic")
internal static let link = ImageAsset(name: "images/link")
- internal static let micFill = ImageAsset(name: "images/mic-fill")
- internal static let mic = ImageAsset(name: "images/mic")
internal static let numberedList = ImageAsset(name: "images/numbered-list")
internal static let quote = ImageAsset(name: "images/quote")
internal static let sendMessage = ImageAsset(name: "images/send-message")
diff --git a/ElementX/Sources/Other/VoiceMessage/VoiceMessageButton.swift b/ElementX/Sources/Other/VoiceMessage/VoiceMessageButton.swift
index 8ac7cb81d8..6ff3d41ae4 100644
--- a/ElementX/Sources/Other/VoiceMessage/VoiceMessageButton.swift
+++ b/ElementX/Sources/Other/VoiceMessage/VoiceMessageButton.swift
@@ -53,7 +53,7 @@ struct VoiceMessageButton: View {
.frame(width: buttonSize, height: buttonSize)
}
.animation(nil, value: state)
- .buttonStyle(.plain)
+ .buttonStyle(VoiceMessageButtonStyle())
.disabled(state == .loading)
.background(Circle().foregroundColor(.compound.bgCanvasDefault))
}
@@ -73,12 +73,20 @@ struct VoiceMessageButton: View {
.scaledToFit()
.frame(width: imageWidth, height: imageHeight)
.offset(x: offset)
- .foregroundColor(.compound.iconSecondary)
.accessibilityLabel(accessibilityLabel)
}
}
}
+private struct VoiceMessageButtonStyle: ButtonStyle {
+ @Environment(\.isEnabled) var isEnabled: Bool
+
+ func makeBody(configuration: Configuration) -> some View {
+ configuration.label
+ .foregroundColor(isEnabled ? .compound.textSecondary.opacity(configuration.isPressed ? 0.6 : 1) : .compound.iconDisabled)
+ }
+}
+
extension VoiceMessageButton.State {
init(state: AudioPlayerPlaybackState) {
switch state {
diff --git a/ElementX/Sources/Screens/ComposerToolbar/View/ComposerToolbar.swift b/ElementX/Sources/Screens/ComposerToolbar/View/ComposerToolbar.swift
index 46b2e8af39..5702112066 100644
--- a/ElementX/Sources/Screens/ComposerToolbar/View/ComposerToolbar.swift
+++ b/ElementX/Sources/Screens/ComposerToolbar/View/ComposerToolbar.swift
@@ -25,7 +25,6 @@ struct ComposerToolbar: View {
@FocusState private var composerFocused: Bool
@ScaledMetric private var sendButtonIconSize = 16
- @ScaledMetric private var trashButtonIconSize = 24
@ScaledMetric(relativeTo: .title) private var spinnerSize = 44
@ScaledMetric(relativeTo: .title) private var closeRTEButtonSize = 30
@@ -288,18 +287,14 @@ struct ComposerToolbar: View {
}
private var voiceMessageTrashButton: some View {
- Button {
+ Button(role: .destructive) {
context.send(viewAction: .deleteVoiceMessageRecording)
} label: {
CompoundIcon(\.delete)
- .font(.compound.bodyLG)
- .foregroundColor(.compound.textCriticalPrimary)
- .frame(width: trashButtonIconSize, height: trashButtonIconSize)
.padding(EdgeInsets(top: 10, leading: 11, bottom: 10, trailing: 11))
- .fixedSize()
- .accessibilityLabel(L10n.a11yDelete)
}
- .buttonStyle(.plain)
+ .buttonStyle(.compound(.plain))
+ .accessibilityLabel(L10n.a11yDelete)
}
private var voiceMessageRecordingButtonTooltipView: some View {
diff --git a/ElementX/Sources/Screens/ComposerToolbar/View/VoiceMessageRecordingButton.swift b/ElementX/Sources/Screens/ComposerToolbar/View/VoiceMessageRecordingButton.swift
index ce901f859e..4fac4a8f3b 100644
--- a/ElementX/Sources/Screens/ComposerToolbar/View/VoiceMessageRecordingButton.swift
+++ b/ElementX/Sources/Screens/ComposerToolbar/View/VoiceMessageRecordingButton.swift
@@ -18,7 +18,6 @@ import Compound
import SwiftUI
struct VoiceMessageRecordingButton: View {
- @ScaledMetric private var buttonIconSize = 24
@State private var buttonPressed = false
var startRecording: (() -> Void)?
@@ -38,14 +37,11 @@ struct VoiceMessageRecordingButton: View {
stopRecording?()
}
}
- .fixedSize()
}
@ViewBuilder
private var voiceMessageButtonImage: some View {
- (buttonPressed ? Image(asset: Asset.Images.micFill) : Image(asset: Asset.Images.mic))
- .resizable()
- .frame(width: buttonIconSize, height: buttonIconSize)
+ CompoundIcon(buttonPressed ? \.micOnSolid : \.micOnOutline)
.foregroundColor(.compound.iconSecondary)
.padding(EdgeInsets(top: 6, leading: 6, bottom: 6, trailing: 6))
.accessibilityLabel(L10n.a11yVoiceMessageRecord)
diff --git a/ElementX/Sources/Screens/CreatePollScreen/View/CreatePollScreen.swift b/ElementX/Sources/Screens/CreatePollScreen/View/CreatePollScreen.swift
index b413b4d92f..9e102ff8d9 100644
--- a/ElementX/Sources/Screens/CreatePollScreen/View/CreatePollScreen.swift
+++ b/ElementX/Sources/Screens/CreatePollScreen/View/CreatePollScreen.swift
@@ -139,12 +139,11 @@ private struct CreatePollOptionView: View {
var body: some View {
HStack {
if editMode?.wrappedValue == .active {
- Button(action: deleteAction) {
+ Button(role: .destructive, action: deleteAction) {
CompoundIcon(\.delete)
- .foregroundColor(.compound.iconCriticalPrimary)
}
.disabled(!canDeleteItem)
- .buttonStyle(.plain)
+ .buttonStyle(.compound(.plain))
.accessibilityLabel(L10n.actionRemove)
}
TextField(text: $text) {
diff --git a/ElementX/Sources/Screens/RoomScreen/View/RoomScreen.swift b/ElementX/Sources/Screens/RoomScreen/View/RoomScreen.swift
index dbcdc8e931..f148433c38 100644
--- a/ElementX/Sources/Screens/RoomScreen/View/RoomScreen.swift
+++ b/ElementX/Sources/Screens/RoomScreen/View/RoomScreen.swift
@@ -167,7 +167,7 @@ struct RoomScreen: View {
Button {
context.send(viewAction: .presentCall)
} label: {
- Label(L10n.actionJoin, icon: \.videoCall)
+ Label(L10n.actionJoin, icon: \.videoCallSolid)
.labelStyle(.titleAndIcon)
}
.buttonStyle(ElementCallButtonStyle())
@@ -175,7 +175,7 @@ struct RoomScreen: View {
Button {
context.send(viewAction: .presentCall)
} label: {
- CompoundIcon(\.videoCall)
+ CompoundIcon(\.videoCallSolid)
}
}
}
diff --git a/ElementX/Sources/Screens/RoomScreen/View/Timeline/EncryptedHistoryRoomTimelineView.swift b/ElementX/Sources/Screens/RoomScreen/View/Timeline/EncryptedHistoryRoomTimelineView.swift
index 82c64e5413..f376401f86 100644
--- a/ElementX/Sources/Screens/RoomScreen/View/Timeline/EncryptedHistoryRoomTimelineView.swift
+++ b/ElementX/Sources/Screens/RoomScreen/View/Timeline/EncryptedHistoryRoomTimelineView.swift
@@ -28,7 +28,7 @@ struct EncryptedHistoryRoomTimelineView: View {
.font(.compound.bodyMDSemibold)
.foregroundColor(.compound.textInfoPrimary)
} icon: {
- CompoundIcon(\.info, size: .small, relativeTo: .compound.bodyMDSemibold)
+ CompoundIcon(\.infoSolid, size: .small, relativeTo: .compound.bodyMDSemibold)
.foregroundColor(.compound.iconInfoPrimary)
}
.labelStyle(EncryptedHistoryLabelStyle())
diff --git a/ElementX/Sources/Screens/RoomScreen/View/TimelineItemMenu.swift b/ElementX/Sources/Screens/RoomScreen/View/TimelineItemMenu.swift
index ab6d283396..543516ef7e 100644
--- a/ElementX/Sources/Screens/RoomScreen/View/TimelineItemMenu.swift
+++ b/ElementX/Sources/Screens/RoomScreen/View/TimelineItemMenu.swift
@@ -193,7 +193,7 @@ public struct TimelineItemMenu: View {
.font(.compound.bodySMSemibold)
.foregroundColor(.compound.textPrimary)
- Text(item.body.trimmingCharacters(in: .whitespacesAndNewlines))
+ Text(item.timelineMenuDescription)
.font(.compound.bodyMD)
.foregroundColor(.compound.textSecondary)
.lineLimit(1)
diff --git a/ElementX/Sources/Screens/SecureBackup/SecureBackupRecoveryKeyScreen/View/SecureBackupRecoveryKeyScreen.swift b/ElementX/Sources/Screens/SecureBackup/SecureBackupRecoveryKeyScreen/View/SecureBackupRecoveryKeyScreen.swift
index 295accb137..eae072416e 100644
--- a/ElementX/Sources/Screens/SecureBackup/SecureBackupRecoveryKeyScreen/View/SecureBackupRecoveryKeyScreen.swift
+++ b/ElementX/Sources/Screens/SecureBackup/SecureBackupRecoveryKeyScreen/View/SecureBackupRecoveryKeyScreen.swift
@@ -134,7 +134,7 @@ struct SecureBackupRecoveryKeyScreen: View {
HStack(alignment: .top) {
if context.viewState.recoveryKey == nil {
- CompoundIcon(\.info, size: .small, relativeTo: .compound.bodySM)
+ CompoundIcon(\.infoSolid, size: .small, relativeTo: .compound.bodySM)
}
Text(context.viewState.recoveryKeySubtitle)
diff --git a/ElementX/Sources/Services/Timeline/TimelineItems/EventBasedTimelineItemProtocol.swift b/ElementX/Sources/Services/Timeline/TimelineItems/EventBasedTimelineItemProtocol.swift
index 4c8fc18310..221c3c3a0a 100644
--- a/ElementX/Sources/Services/Timeline/TimelineItems/EventBasedTimelineItemProtocol.swift
+++ b/ElementX/Sources/Services/Timeline/TimelineItems/EventBasedTimelineItemProtocol.swift
@@ -59,6 +59,15 @@ extension EventBasedTimelineItemProtocol {
self is EncryptedRoomTimelineItem
}
+ var timelineMenuDescription: String {
+ switch self {
+ case is VoiceMessageRoomTimelineItem:
+ return L10n.commonVoiceMessage
+ default:
+ return body.trimmingCharacters(in: .whitespacesAndNewlines)
+ }
+ }
+
func additionalWhitespaces(timelineStyle: TimelineStyle) -> Int {
guard timelineStyle == .bubbles else {
return 0
diff --git a/UnitTests/__Snapshots__/PreviewTests/test_composerToolbar.1.png b/UnitTests/__Snapshots__/PreviewTests/test_composerToolbar.1.png
index ec2484d116..c763fbaebf 100644
--- a/UnitTests/__Snapshots__/PreviewTests/test_composerToolbar.1.png
+++ b/UnitTests/__Snapshots__/PreviewTests/test_composerToolbar.1.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:2879ff2216ecdbd3b9afc2189c84ad892f154b852a873cfcb3108c2f8ee900a5
-size 66093
+oid sha256:c1e6e18b515a424aa91b552323bb5cba4d01914b51dc47e8ec3b5e9f81a57225
+size 66446
diff --git a/UnitTests/__Snapshots__/PreviewTests/test_composerToolbar.Voice-Message.png b/UnitTests/__Snapshots__/PreviewTests/test_composerToolbar.Voice-Message.png
index 793475ae67..fa71cf8754 100644
--- a/UnitTests/__Snapshots__/PreviewTests/test_composerToolbar.Voice-Message.png
+++ b/UnitTests/__Snapshots__/PreviewTests/test_composerToolbar.Voice-Message.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:6387ef1c9d6ba711f20718a3bf9c3f32d5af688dbdb078481301d4a5ccc88a69
-size 93719
+oid sha256:866e24b28ef3ad776461af85ee96abaf83275d17c4e7c2047691479028fe0f06
+size 94382
diff --git a/UnitTests/__Snapshots__/PreviewTests/test_composerToolbar.With-Suggestions.png b/UnitTests/__Snapshots__/PreviewTests/test_composerToolbar.With-Suggestions.png
index 01a4bb446f..3a097e528c 100644
--- a/UnitTests/__Snapshots__/PreviewTests/test_composerToolbar.With-Suggestions.png
+++ b/UnitTests/__Snapshots__/PreviewTests/test_composerToolbar.With-Suggestions.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:0aa957098a18ecea76387910e75fb3c192bb40624211411c60a8cc25ffa81f2b
-size 95496
+oid sha256:225ba3d11602f2bd92ba2bb50c01c855d134945f1bbb6abedf5ff0cd549220bd
+size 95840
diff --git a/UnitTests/__Snapshots__/PreviewTests/test_createPollScreen.1.png b/UnitTests/__Snapshots__/PreviewTests/test_createPollScreen.1.png
index 938eab059f..f7f14fad24 100644
--- a/UnitTests/__Snapshots__/PreviewTests/test_createPollScreen.1.png
+++ b/UnitTests/__Snapshots__/PreviewTests/test_createPollScreen.1.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:c3d9ade7c89cd250b94a8538212569c322bb86d607c6c41837c0f6520f2db222
-size 123004
+oid sha256:c8a37f2e525c24464f4a99e7110abad6bff7923429d5de27f25167c2b62b7241
+size 122848
diff --git a/UnitTests/__Snapshots__/PreviewTests/test_roomScreen.1.png b/UnitTests/__Snapshots__/PreviewTests/test_roomScreen.1.png
index 7a1df20945..516fb1cd66 100644
--- a/UnitTests/__Snapshots__/PreviewTests/test_roomScreen.1.png
+++ b/UnitTests/__Snapshots__/PreviewTests/test_roomScreen.1.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:bd3dd80a72c692d2b326a598bb013fe2d0bdf57d3a802d31804b16f1c7d19b75
-size 318206
+oid sha256:12c2540041f1a2739e015b962f1490cb7d78201ab5c488d7b0edab06e304e127
+size 318511
diff --git a/UnitTests/__Snapshots__/PreviewTests/test_timelineView.1.png b/UnitTests/__Snapshots__/PreviewTests/test_timelineView.1.png
index 7e795dfa7b..2ba17a1af5 100644
--- a/UnitTests/__Snapshots__/PreviewTests/test_timelineView.1.png
+++ b/UnitTests/__Snapshots__/PreviewTests/test_timelineView.1.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:d6d0c6241d39a889ecaa9c5471857d5e7e63f9998682e04f4e51150dbee96e12
-size 314691
+oid sha256:720eccf0e4e600da78abe5772d78e871866c3fc3b48da404079dd7285f34ecc6
+size 314996
diff --git a/UnitTests/__Snapshots__/PreviewTests/test_uITimelineView.1.png b/UnitTests/__Snapshots__/PreviewTests/test_uITimelineView.1.png
index 7e795dfa7b..2ba17a1af5 100644
--- a/UnitTests/__Snapshots__/PreviewTests/test_uITimelineView.1.png
+++ b/UnitTests/__Snapshots__/PreviewTests/test_uITimelineView.1.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:d6d0c6241d39a889ecaa9c5471857d5e7e63f9998682e04f4e51150dbee96e12
-size 314691
+oid sha256:720eccf0e4e600da78abe5772d78e871866c3fc3b48da404079dd7285f34ecc6
+size 314996
diff --git a/UnitTests/__Snapshots__/PreviewTests/test_voiceMessageRecordingButton.1.png b/UnitTests/__Snapshots__/PreviewTests/test_voiceMessageRecordingButton.1.png
index 1df5c8c871..1c919113d6 100644
--- a/UnitTests/__Snapshots__/PreviewTests/test_voiceMessageRecordingButton.1.png
+++ b/UnitTests/__Snapshots__/PreviewTests/test_voiceMessageRecordingButton.1.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:f148b17af2dea5529eaa8a234966d6c5a907c24f47379f392bcbc6098ca6d26d
-size 56402
+oid sha256:454f1594e4f0eee33f53dcc3d45653087fbf1254324396b65723918af8a44536
+size 56462
diff --git a/project.yml b/project.yml
index 0078810a3d..a93450fa98 100644
--- a/project.yml
+++ b/project.yml
@@ -49,7 +49,7 @@ packages:
# path: ../matrix-rust-sdk
Compound:
url: https://github.com/vector-im/compound-ios
- revision: eba9d995974fcedd55549395d56e336e5ff70cdf
+ revision: 34dcd1e2960f3b0b7f50d6e7d020c108d5acf604
# path: ../compound-ios
AnalyticsEvents:
url: https://github.com/matrix-org/matrix-analytics-events