mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
Cherry pick some missed Compound/layout changes that ended up in the Xcode 15 PR. (#2120)
Fix broken Settings screen snapshots.
This commit is contained in:
@@ -589,7 +589,6 @@
|
||||
9BB91CABB10D8FE90C491BCD /* StaticLocationScreenViewModelTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C833673B334A0651AB46F30B /* StaticLocationScreenViewModelTests.swift */; };
|
||||
9BD3A773186291560DF92B62 /* RoomTimelineProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 66F2402D738694F98729A441 /* RoomTimelineProvider.swift */; };
|
||||
9BEA56957B3AF954E7321658 /* ComposerToolbarViewModelProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = E44928D844E16EE48A311FCA /* ComposerToolbarViewModelProtocol.swift */; };
|
||||
9C45CE85325CD591DADBC4CA /* ElementXTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = DBFEAC3AC691CBB84983E275 /* ElementXTests.swift */; };
|
||||
9C5A07E7C33F3F40287D7861 /* SettingsScreenUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8EC57A32ABC80D774CC663DB /* SettingsScreenUITests.swift */; };
|
||||
9CCC77C31CB399661A034739 /* UserProperties+Element.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A6C4BE591FE5C38CE9C7EF3 /* UserProperties+Element.swift */; };
|
||||
9D2E03DB175A6AB14589076D /* AnalyticsEvents in Frameworks */ = {isa = PBXBuildFile; productRef = 2A3F7BCCB18C15B30CCA39A9 /* AnalyticsEvents */; };
|
||||
@@ -1812,7 +1811,6 @@
|
||||
DA2AEC1AB349A341FE13DEC1 /* StartChatScreenUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StartChatScreenUITests.swift; sourceTree = "<group>"; };
|
||||
DAB8D7926A5684E18196B538 /* VoiceMessageCache.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VoiceMessageCache.swift; sourceTree = "<group>"; };
|
||||
DB06F22CFA34885B40976061 /* RoomDetailsEditScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomDetailsEditScreen.swift; sourceTree = "<group>"; };
|
||||
DBFEAC3AC691CBB84983E275 /* ElementXTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ElementXTests.swift; sourceTree = "<group>"; };
|
||||
DC0AEA686E425F86F6BA0404 /* UNNotification+Creator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UNNotification+Creator.swift"; sourceTree = "<group>"; };
|
||||
DC10CCC8D68B863E20660DBC /* MessageForwardingScreenViewModelProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MessageForwardingScreenViewModelProtocol.swift; sourceTree = "<group>"; };
|
||||
DCF239C619971FDE48132550 /* SecureBackupLogoutConfirmationScreenModels.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SecureBackupLogoutConfirmationScreenModels.swift; sourceTree = "<group>"; };
|
||||
@@ -3228,7 +3226,6 @@
|
||||
69D42EE0102D2857933625DD /* CreateRoomViewModelTests.swift */,
|
||||
3B5E97E9615A158C76B2AB77 /* DateTests.swift */,
|
||||
6D0A27607AB09784C8501B5C /* DeveloperOptionsScreenViewModelTests.swift */,
|
||||
DBFEAC3AC691CBB84983E275 /* ElementXTests.swift */,
|
||||
A58E93D91DE3288010390DEE /* EmojiDetectionTests.swift */,
|
||||
099F2D36C141D845A445B1E6 /* EmojiProviderTests.swift */,
|
||||
84B7A28A6606D58D1E38C55A /* ExpiringTaskRunnerTests.swift */,
|
||||
@@ -5178,7 +5175,6 @@
|
||||
D3FD96913D2B1AAA3149DAC7 /* CreateRoomViewModelTests.swift in Sources */,
|
||||
CD0088B763CD970CF1CBF8CB /* DateTests.swift in Sources */,
|
||||
864C69CF951BF36D25BE0C03 /* DeveloperOptionsScreenViewModelTests.swift in Sources */,
|
||||
9C45CE85325CD591DADBC4CA /* ElementXTests.swift in Sources */,
|
||||
F697284B9B5F2C00CFEA3B12 /* EmojiDetectionTests.swift in Sources */,
|
||||
25618589E0DE0F1E95FC7B5C /* EmojiProviderTests.swift in Sources */,
|
||||
71B62C48B8079D49F3FBC845 /* ExpiringTaskRunnerTests.swift in Sources */,
|
||||
|
||||
@@ -33,6 +33,7 @@ struct MenuSheetLabelStyle: LabelStyle {
|
||||
}
|
||||
.multilineTextAlignment(.leading)
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
.padding(16)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,6 +34,7 @@ struct MessageComposer: View {
|
||||
@FocusState private var focused: Bool
|
||||
|
||||
@State private var composerTranslation: CGFloat = 0
|
||||
private let composerShape = RoundedRectangle(cornerRadius: 21, style: .circular)
|
||||
|
||||
var body: some View {
|
||||
VStack(spacing: 0) {
|
||||
@@ -41,16 +42,14 @@ struct MessageComposer: View {
|
||||
resizeGrabber
|
||||
}
|
||||
|
||||
let borderRadius: CGFloat = 21
|
||||
mainContent
|
||||
.padding(.horizontal, 12.0)
|
||||
.clipShape(RoundedRectangle(cornerRadius: borderRadius))
|
||||
.clipShape(composerShape)
|
||||
.background {
|
||||
let roundedRectangle = RoundedRectangle(cornerRadius: borderRadius)
|
||||
ZStack {
|
||||
roundedRectangle
|
||||
composerShape
|
||||
.fill(Color.compound.bgSubtleSecondary)
|
||||
roundedRectangle
|
||||
composerShape
|
||||
.stroke(Color.compound._borderTextFieldFocused, lineWidth: 0.5)
|
||||
}
|
||||
}
|
||||
@@ -135,8 +134,7 @@ private struct MessageComposerReplyHeader: View {
|
||||
TimelineReplyView(placement: .composer, timelineItemReplyDetails: replyDetails)
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
.padding(4.0)
|
||||
.background(Color.compound.bgCanvasDefault)
|
||||
.cornerRadius(13.0)
|
||||
.background(.compound.bgCanvasDefault, in: RoundedRectangle(cornerRadius: 13, style: .circular))
|
||||
.overlay(alignment: .topTrailing) {
|
||||
Button(action: action) {
|
||||
CompoundIcon(\.close, size: .small, relativeTo: .compound.bodySMSemibold)
|
||||
|
||||
@@ -31,7 +31,7 @@ struct RoomHeaderView: View {
|
||||
}
|
||||
// Leading align whilst using the principal toolbar position.
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
// Using a button stops is from getting truncated in the navigation bar
|
||||
// Using a button stops it from getting truncated in the navigation bar
|
||||
.onTapGesture {
|
||||
context.send(viewAction: .displayRoomDetails)
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import Compound
|
||||
import SwiftUI
|
||||
|
||||
struct NoticeRoomTimelineView: View, TextBasedRoomTimelineViewProtocol {
|
||||
@@ -28,16 +28,17 @@ struct NoticeRoomTimelineView: View, TextBasedRoomTimelineViewProtocol {
|
||||
|
||||
// Spacing: 6 = label spacing - formatted text padding
|
||||
|
||||
HStack(alignment: .firstTextBaseline, spacing: 6.0) {
|
||||
Image(systemName: "info.bubble").padding(.top, 2.0)
|
||||
.foregroundColor(.compound.iconSecondary)
|
||||
|
||||
Label {
|
||||
if let attributedString = timelineItem.content.formattedBody {
|
||||
FormattedBodyText(attributedString: attributedString, additionalWhitespacesCount: timelineItem.additionalWhitespaces(timelineStyle: timelineStyle))
|
||||
} else {
|
||||
FormattedBodyText(text: timelineItem.content.body, additionalWhitespacesCount: timelineItem.additionalWhitespaces(timelineStyle: timelineStyle))
|
||||
}
|
||||
} icon: {
|
||||
CompoundIcon(\.info, size: .small, relativeTo: .compound.bodyLG)
|
||||
.foregroundColor(.compound.iconSecondary)
|
||||
}
|
||||
.labelStyle(.custom(spacing: 6.0, alignment: .top))
|
||||
.padding(.leading, 4) // Trailing padding is provided by FormattedBodyText
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
import Compound
|
||||
import SwiftUI
|
||||
|
||||
struct UnsupportedRoomTimelineView: View {
|
||||
@@ -31,7 +32,7 @@ struct UnsupportedRoomTimelineView: View {
|
||||
.font(.compound.bodySM)
|
||||
}
|
||||
} icon: {
|
||||
Image(systemName: "exclamationmark.triangle")
|
||||
CompoundIcon(\.warning, size: .small, relativeTo: .compound.bodyLG)
|
||||
}
|
||||
.labelStyle(RoomTimelineViewLabelStyle())
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:02ace5afce921d743edfac27da46baf85ab79654587a2ffba594285f63e9e7b9
|
||||
size 138755
|
||||
oid sha256:7f325518a5e8c40b114b4f17d3130c45ad3d90fc6a565ac242cdbb1a18ab4eb7
|
||||
size 131266
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:1c6bea2f3174c39d2f48c5022d08a97ab898d6746979f1f1618103e55d1904ac
|
||||
size 165440
|
||||
oid sha256:7b0fa00ad415609baa7a50da28ce46e83d7ff4d78ec61e863c1418d00e232977
|
||||
size 162508
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:0c00886a440f83e27b827f21ba56e1663c09d1de34fe4d221aaba64d8a06b5c7
|
||||
size 148328
|
||||
oid sha256:78b54082ac3918544071784378539093724e486d59a125c1a4d5fbaa189cbc6a
|
||||
size 140353
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:3b19b6ac4ff25ef69d1f7d34bfcd6fb98b5b81141e2f48fef18052898b770f2b
|
||||
size 180672
|
||||
oid sha256:a08cf3a415a04c32f52cbc6fc6cae063eb6ef4871d4bd0b7c7caff7b6466cdc6
|
||||
size 180060
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
//
|
||||
// Copyright 2022 New Vector Ltd
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
@testable import ElementX
|
||||
import XCTest
|
||||
|
||||
class ElementXTests: XCTestCase {
|
||||
override func setUpWithError() throws {
|
||||
// Put setup code here. This method is called before the invocation of each test method in the class.
|
||||
}
|
||||
|
||||
override func tearDownWithError() throws {
|
||||
// Put teardown code here. This method is called after the invocation of each test method in the class.
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:3208a7c3c00ab22881a0167236cfe47649d3700e7d5111164becada194b4d554
|
||||
size 124975
|
||||
oid sha256:98d8d0b1c9a45d0b5a2abeaa9201418bba4f78b917b32fbd8cad0fe03114b0e1
|
||||
size 124035
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:4d2f7d8badf0946cce15be49e3e1b117b10fd0c0ac138f98aaf3028dcd9e0680
|
||||
size 113232
|
||||
oid sha256:363d28ba110b873b4219c94f50120f983ed40ee7d2f45e7fad6aaf8b84f80e4c
|
||||
size 113455
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:c1a689e1ef4870cc61754c5de73abdc0625eba5d03b46eda81515fa3fca7cb68
|
||||
size 99577
|
||||
oid sha256:84cff7330a1f45546340bbf387ccb27dd3534303d005934eeb96be6e21fe716e
|
||||
size 98359
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:d60bc33e142160d6375aea7ae4ff0563d7b38b1df15c11d4d39f535a89885cff
|
||||
size 96138
|
||||
oid sha256:72a61acfcb218cadcca2789eec99a3cf91c1ce589cf6bba62b3ba9d7286346da
|
||||
size 94592
|
||||
|
||||
Reference in New Issue
Block a user