Update the font style for placeholder messages (redacted/encrypted/unsupported). (#4927)

This commit is contained in:
Doug
2026-01-07 14:23:47 +00:00
committed by GitHub
parent 1726ee24c1
commit 0a749555a4
16 changed files with 37 additions and 48 deletions
@@ -14,19 +14,11 @@ struct UnsupportedRoomTimelineView: View {
var body: some View {
TimelineStyler(timelineItem: timelineItem) {
Label {
VStack(alignment: .leading, spacing: 0) {
Text("\(timelineItem.body): \(timelineItem.eventType)")
.fixedSize(horizontal: false, vertical: true)
Text(timelineItem.error)
.fixedSize(horizontal: false, vertical: true)
.font(.compound.bodySM)
}
} icon: {
CompoundIcon(\.warning, size: .small, relativeTo: .compound.bodyLG)
}
.labelStyle(RoomTimelineViewLabelStyle())
Label("\(timelineItem.body) (\(timelineItem.eventType)): \(timelineItem.error)",
icon: \.warning,
iconSize: .small,
relativeTo: .compound.bodyLG)
.labelStyle(RoomTimelineViewPlaceholderLabelStyle())
}
}
}
@@ -40,7 +32,7 @@ struct UnsupportedRoomTimelineView_Previews: PreviewProvider, TestablePreview {
static var body: some View {
VStack(alignment: .leading, spacing: 20.0) {
UnsupportedRoomTimelineView(timelineItem: itemWith(text: "Text",
UnsupportedRoomTimelineView(timelineItem: itemWith(text: "Unsupported",
timestamp: .mock,
isOutgoing: false,
senderId: "Bob"))
@@ -55,8 +47,8 @@ struct UnsupportedRoomTimelineView_Previews: PreviewProvider, TestablePreview {
private static func itemWith(text: String, timestamp: Date, isOutgoing: Bool, senderId: String) -> UnsupportedRoomTimelineItem {
UnsupportedRoomTimelineItem(id: .randomEvent,
body: text,
eventType: "Some Event Type",
error: "Something went wrong",
eventType: "event.type",
error: "something went wrong",
timestamp: timestamp,
isOutgoing: isOutgoing,
isEditable: false,