From 602b5df1efcbef185980191d6006d0e567ec02ae Mon Sep 17 00:00:00 2001 From: Doug Date: Thu, 16 Nov 2023 11:12:41 +0000 Subject: [PATCH 1/6] Use Compound List in room member details, secure backup, notification settings. --- .../View/RoomMemberDetailsScreen.swift | 23 ++++++++++--------- ...otificationSettingsCustomSectionView.swift | 4 ++-- .../View/SecureBackupScreen.swift | 2 +- .../View/NotificationSettingsEditScreen.swift | 1 - ...-iPad-9th-generation.roomMemberDetails.png | 4 ++-- ...neration.roomMemberDetailsAccountOwner.png | 4 ++-- ...eneration.roomMemberDetailsIgnoredUser.png | 4 ++-- .../en-GB-iPhone-14.roomMemberDetails.png | 4 ++-- ...Phone-14.roomMemberDetailsAccountOwner.png | 4 ++-- ...iPhone-14.roomMemberDetailsIgnoredUser.png | 4 ++-- ...-iPad-9th-generation.roomMemberDetails.png | 4 ++-- ...neration.roomMemberDetailsAccountOwner.png | 4 ++-- ...eneration.roomMemberDetailsIgnoredUser.png | 4 ++-- .../pseudo-iPhone-14.roomMemberDetails.png | 4 ++-- ...Phone-14.roomMemberDetailsAccountOwner.png | 4 ++-- ...iPhone-14.roomMemberDetailsIgnoredUser.png | 4 ++-- ..._roomMemberDetailsScreen.Account-Owner.png | 4 ++-- ...t_roomMemberDetailsScreen.Ignored-User.png | 4 ++-- ...est_roomMemberDetailsScreen.Other-User.png | 4 ++-- ...ionSettingsCustomSectionView.Encrypted.png | 4 ++-- ...nSettingsCustomSectionView.Unencrypted.png | 4 ++-- ...cureBackupScreen.Only-key-backup-setup.png | 4 ++-- ...secureBackupScreen.Recovery-incomplete.png | 4 ++-- 23 files changed, 53 insertions(+), 53 deletions(-) diff --git a/ElementX/Sources/Screens/RoomMemberDetailsScreen/View/RoomMemberDetailsScreen.swift b/ElementX/Sources/Screens/RoomMemberDetailsScreen/View/RoomMemberDetailsScreen.swift index e54ba7f42d..e6fd6d783c 100644 --- a/ElementX/Sources/Screens/RoomMemberDetailsScreen/View/RoomMemberDetailsScreen.swift +++ b/ElementX/Sources/Screens/RoomMemberDetailsScreen/View/RoomMemberDetailsScreen.swift @@ -14,6 +14,7 @@ // limitations under the License. // +import Compound import SwiftUI struct RoomMemberDetailsScreen: View { @@ -27,7 +28,7 @@ struct RoomMemberDetailsScreen: View { blockUserSection } } - .compoundForm() + .compoundList() .alert(item: $context.ignoreUserAlert, actions: blockUserAlertActions, message: blockUserAlertMessage) .alert(item: $context.alertInfo) .track(screen: .user) @@ -49,7 +50,7 @@ struct RoomMemberDetailsScreen: View { if let permalink = context.viewState.details.permalink { HStack(spacing: 32) { ShareLink(item: permalink) { - Image(systemName: "square.and.arrow.up") + CompoundIcon(asset: Asset.Images.shareIos) } .buttonStyle(FormActionButtonStyle(title: L10n.actionShare)) } @@ -60,16 +61,16 @@ struct RoomMemberDetailsScreen: View { private var blockUserSection: some View { Section { - Button(role: context.viewState.details.isIgnored ? nil : .destructive) { - context.send(viewAction: blockUserButtonAction) - } label: { - Label(blockUserButtonTitle, systemImage: "slash.circle") - } - .accessibilityIdentifier(blockUserButtonAccessibilityIdentifier) - .buttonStyle(FormButtonStyle(accessory: context.viewState.isProcessingIgnoreRequest ? .progressView : nil)) - .disabled(context.viewState.isProcessingIgnoreRequest) + ListRow(label: .default(title: blockUserButtonTitle, + icon: CompoundIcon(asset: Asset.Images.block), + role: context.viewState.details.isIgnored ? nil : .destructive), + details: .isWaiting(context.viewState.isProcessingIgnoreRequest), + kind: .button { + context.send(viewAction: blockUserButtonAction) + }) + .accessibilityIdentifier(blockUserButtonAccessibilityIdentifier) + .disabled(context.viewState.isProcessingIgnoreRequest) } - .compoundFormSection() } private var blockUserButtonAction: RoomMemberDetailsScreenViewAction { diff --git a/ElementX/Sources/Screens/RoomNotificationSettingsScreen/View/RoomNotificationSettingsCustomSectionView.swift b/ElementX/Sources/Screens/RoomNotificationSettingsScreen/View/RoomNotificationSettingsCustomSectionView.swift index 8e97bba85b..1ba54a012f 100644 --- a/ElementX/Sources/Screens/RoomNotificationSettingsScreen/View/RoomNotificationSettingsCustomSectionView.swift +++ b/ElementX/Sources/Screens/RoomNotificationSettingsScreen/View/RoomNotificationSettingsCustomSectionView.swift @@ -63,13 +63,13 @@ struct RoomNotificationSettingsCustomSectionView_Previews: PreviewProvider, Test Form { RoomNotificationSettingsCustomSectionView(context: viewModel.context) } - .compoundForm() + .compoundList() .previewDisplayName("Encrypted") Form { RoomNotificationSettingsCustomSectionView(context: viewModelUnencrypted.context) } - .compoundForm() + .compoundList() .previewDisplayName("Unencrypted") } } diff --git a/ElementX/Sources/Screens/SecureBackup/SecureBackupScreen/View/SecureBackupScreen.swift b/ElementX/Sources/Screens/SecureBackup/SecureBackupScreen/View/SecureBackupScreen.swift index 239f515b95..990478c7b3 100644 --- a/ElementX/Sources/Screens/SecureBackup/SecureBackupScreen/View/SecureBackupScreen.swift +++ b/ElementX/Sources/Screens/SecureBackup/SecureBackupScreen/View/SecureBackupScreen.swift @@ -103,7 +103,7 @@ struct SecureBackupScreen: View { } } footer: { recoveryKeySectionFooter - .compoundFormSectionFooter() + .compoundListSectionFooter() } } diff --git a/ElementX/Sources/Screens/Settings/NotificationSettingsEditScreen/View/NotificationSettingsEditScreen.swift b/ElementX/Sources/Screens/Settings/NotificationSettingsEditScreen/View/NotificationSettingsEditScreen.swift index 515940282f..f10c382e3c 100644 --- a/ElementX/Sources/Screens/Settings/NotificationSettingsEditScreen/View/NotificationSettingsEditScreen.swift +++ b/ElementX/Sources/Screens/Settings/NotificationSettingsEditScreen/View/NotificationSettingsEditScreen.swift @@ -63,7 +63,6 @@ struct NotificationSettingsEditScreen: View { Text(L10n.screenNotificationSettingsEditCustomSettingsSectionTitle) .compoundListSectionHeader() } - .compoundFormSection() } } diff --git a/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.roomMemberDetails.png b/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.roomMemberDetails.png index 32a73d43fb..1cb4afa73e 100644 --- a/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.roomMemberDetails.png +++ b/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.roomMemberDetails.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:85785ef5695faad84a691a9cd56f3f44e306429ecf7405f0ad250833ac0c239f -size 75440 +oid sha256:d68f8512763c04c06f0428bb7d4b3395b3f732e52fe1e7455236c6777114e990 +size 75175 diff --git a/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.roomMemberDetailsAccountOwner.png b/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.roomMemberDetailsAccountOwner.png index 353ec126ac..b09762a5a9 100644 --- a/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.roomMemberDetailsAccountOwner.png +++ b/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.roomMemberDetailsAccountOwner.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:54e7d239c4f72f1e5c38a1e25c7e92574ab77419613627e6b3e46ccc02837d45 -size 86005 +oid sha256:da006cf0e10db7b53725b632fe1463c164a8cbf36bbbfce71f4ed967de13ef78 +size 85837 diff --git a/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.roomMemberDetailsIgnoredUser.png b/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.roomMemberDetailsIgnoredUser.png index 6719883cb9..92e2c90b02 100644 --- a/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.roomMemberDetailsIgnoredUser.png +++ b/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.roomMemberDetailsIgnoredUser.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:76da7318a4155c5618ee602900b01431a4027cf64baf4971c4e889fabac81a05 -size 76634 +oid sha256:e0589315a3cbcaefe4190942f98ef6e751d79c47dda39cfb7171fbb47fb7ce75 +size 76322 diff --git a/UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.roomMemberDetails.png b/UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.roomMemberDetails.png index 74bc3f1f2f..02f7ec8a16 100644 --- a/UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.roomMemberDetails.png +++ b/UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.roomMemberDetails.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bc305177ef9f263afb29691784f5c40961ac21b2f7c591bca405d2d76387f842 -size 85474 +oid sha256:d9597c72d2d0b30837e055fc0b33a67be32a13878f8b795f76f2735b4bafd3bc +size 85184 diff --git a/UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.roomMemberDetailsAccountOwner.png b/UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.roomMemberDetailsAccountOwner.png index 9f33625d17..95f1225e15 100644 --- a/UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.roomMemberDetailsAccountOwner.png +++ b/UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.roomMemberDetailsAccountOwner.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:df58bd2a076128681f6663f33c30c4801162a4a0f77e925e6ed04ed2b2535a70 -size 109616 +oid sha256:d7037f44b51c943a64e52f544508938b24c106b5666de258b003e0c75a9982e1 +size 109359 diff --git a/UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.roomMemberDetailsIgnoredUser.png b/UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.roomMemberDetailsIgnoredUser.png index 068ea190b0..38c9443adf 100644 --- a/UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.roomMemberDetailsIgnoredUser.png +++ b/UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.roomMemberDetailsIgnoredUser.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f3655badd3effec1b631ceee3bcd3d6f945fc17af5537694b01a619dab13007b -size 87714 +oid sha256:7dfb9758d21addcaf9440956ea6d8d152ecaf60b357315dc4c76edbe5f2cca56 +size 87288 diff --git a/UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.roomMemberDetails.png b/UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.roomMemberDetails.png index 697b6e236f..3907180b87 100644 --- a/UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.roomMemberDetails.png +++ b/UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.roomMemberDetails.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:69943d16ea3f20799f5b30197a24d712852168316a0a8aa7422f464205f06d51 -size 76422 +oid sha256:f5560586719d07b52ebed4e1aebf26bf606bb94c95f70069b376e3cacc412196 +size 76124 diff --git a/UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.roomMemberDetailsAccountOwner.png b/UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.roomMemberDetailsAccountOwner.png index 27b5b6c10a..a5c1584f8c 100644 --- a/UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.roomMemberDetailsAccountOwner.png +++ b/UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.roomMemberDetailsAccountOwner.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0289235d2236c240420c530bc27e397d848e7f6cf846b303a842734c8690d037 -size 86622 +oid sha256:79c188178407072ef3ec198d5e512c77f6798336b851a7d722da2b4e53edd1cb +size 86445 diff --git a/UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.roomMemberDetailsIgnoredUser.png b/UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.roomMemberDetailsIgnoredUser.png index 8c0d0da635..07de3998fc 100644 --- a/UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.roomMemberDetailsIgnoredUser.png +++ b/UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.roomMemberDetailsIgnoredUser.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7709f2bd95eedaa8ec4b2294bc6c99139391d6acf224de1973fc09d76225ae21 -size 77641 +oid sha256:8241d23d72f336553895d3569ad7f33b35a2a927d228cd9c205d7352ae815bdc +size 77320 diff --git a/UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.roomMemberDetails.png b/UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.roomMemberDetails.png index e15dbd6042..00452b6295 100644 --- a/UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.roomMemberDetails.png +++ b/UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.roomMemberDetails.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:da7455c147d2dca07f71ef881a1cd5c0440aae8e5b6b88c9f37bad06aa1546de -size 86726 +oid sha256:59e51d6eff27bbd070e8f61afadda7ae5382a65b1a0c803585cb50041c7ad275 +size 86474 diff --git a/UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.roomMemberDetailsAccountOwner.png b/UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.roomMemberDetailsAccountOwner.png index 55e15122e0..bdc77e8e25 100644 --- a/UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.roomMemberDetailsAccountOwner.png +++ b/UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.roomMemberDetailsAccountOwner.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f6880bb70385dd8b578b21dd2752d07a99a4bad394730f4a01795e36589de94f -size 109968 +oid sha256:8d2b2c8a18c5c45b62c6d673345a41740744e8b44b2d38b36c1b9c648b0c0d0b +size 109715 diff --git a/UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.roomMemberDetailsIgnoredUser.png b/UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.roomMemberDetailsIgnoredUser.png index cda4d1bfa7..829a193a48 100644 --- a/UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.roomMemberDetailsIgnoredUser.png +++ b/UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.roomMemberDetailsIgnoredUser.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e5ee8fbfe1abae2eceb341a3800788ff43f671adb9affd019ec4156103c33e7e -size 88844 +oid sha256:bcc23a880e72373c79c9c0d7eb7b825da66c4fb3cadff745d89007d2279f6f18 +size 88391 diff --git a/UnitTests/__Snapshots__/PreviewTests/test_roomMemberDetailsScreen.Account-Owner.png b/UnitTests/__Snapshots__/PreviewTests/test_roomMemberDetailsScreen.Account-Owner.png index 3ba99a0ea6..d8f8856bca 100644 --- a/UnitTests/__Snapshots__/PreviewTests/test_roomMemberDetailsScreen.Account-Owner.png +++ b/UnitTests/__Snapshots__/PreviewTests/test_roomMemberDetailsScreen.Account-Owner.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f4bc9d97c5f1db7319056f80d1a2c8282d4d6f0cb74813a70d13b3728b3b912f -size 127927 +oid sha256:610691a13e03beff0d88785f9ac7e80d6aa09bc68c20f6cc4ea91aec7159eb46 +size 127526 diff --git a/UnitTests/__Snapshots__/PreviewTests/test_roomMemberDetailsScreen.Ignored-User.png b/UnitTests/__Snapshots__/PreviewTests/test_roomMemberDetailsScreen.Ignored-User.png index c844a59077..0f27c4f9d8 100644 --- a/UnitTests/__Snapshots__/PreviewTests/test_roomMemberDetailsScreen.Ignored-User.png +++ b/UnitTests/__Snapshots__/PreviewTests/test_roomMemberDetailsScreen.Ignored-User.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:218609ca451f129fbefe9119d1e6a3e5b415f2da5939727f3061f0e6d2e31cce -size 100394 +oid sha256:142dee5459592cd3b21a5fa089d160c7af682f639e443172cd634e1e124b8531 +size 100514 diff --git a/UnitTests/__Snapshots__/PreviewTests/test_roomMemberDetailsScreen.Other-User.png b/UnitTests/__Snapshots__/PreviewTests/test_roomMemberDetailsScreen.Other-User.png index aa660f66b7..c99e1f3782 100644 --- a/UnitTests/__Snapshots__/PreviewTests/test_roomMemberDetailsScreen.Other-User.png +++ b/UnitTests/__Snapshots__/PreviewTests/test_roomMemberDetailsScreen.Other-User.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3109727ecc950214a27eec0fda360df2816ddb7056c3b9048914575d70595769 -size 139833 +oid sha256:eb98ad72d36f6204a0c5b80a82faa0346c7ca507393291f9983089bbab003a6e +size 140051 diff --git a/UnitTests/__Snapshots__/PreviewTests/test_roomNotificationSettingsCustomSectionView.Encrypted.png b/UnitTests/__Snapshots__/PreviewTests/test_roomNotificationSettingsCustomSectionView.Encrypted.png index dc03bf7af7..edc7a2198f 100644 --- a/UnitTests/__Snapshots__/PreviewTests/test_roomNotificationSettingsCustomSectionView.Encrypted.png +++ b/UnitTests/__Snapshots__/PreviewTests/test_roomNotificationSettingsCustomSectionView.Encrypted.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6545c6f94180cae00cde1a5851813fda9335db6b9dbdbb41132ebe2d391beaa8 -size 104199 +oid sha256:d688fd6c955d14ed7b7cd419cf6e11d7da5ff992d02b4cba884891e298822292 +size 104261 diff --git a/UnitTests/__Snapshots__/PreviewTests/test_roomNotificationSettingsCustomSectionView.Unencrypted.png b/UnitTests/__Snapshots__/PreviewTests/test_roomNotificationSettingsCustomSectionView.Unencrypted.png index dc03bf7af7..edc7a2198f 100644 --- a/UnitTests/__Snapshots__/PreviewTests/test_roomNotificationSettingsCustomSectionView.Unencrypted.png +++ b/UnitTests/__Snapshots__/PreviewTests/test_roomNotificationSettingsCustomSectionView.Unencrypted.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6545c6f94180cae00cde1a5851813fda9335db6b9dbdbb41132ebe2d391beaa8 -size 104199 +oid sha256:d688fd6c955d14ed7b7cd419cf6e11d7da5ff992d02b4cba884891e298822292 +size 104261 diff --git a/UnitTests/__Snapshots__/PreviewTests/test_secureBackupScreen.Only-key-backup-setup.png b/UnitTests/__Snapshots__/PreviewTests/test_secureBackupScreen.Only-key-backup-setup.png index 958d6a7192..e2c186a593 100644 --- a/UnitTests/__Snapshots__/PreviewTests/test_secureBackupScreen.Only-key-backup-setup.png +++ b/UnitTests/__Snapshots__/PreviewTests/test_secureBackupScreen.Only-key-backup-setup.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b99e77edc65b81c297864a460389b6b660baeb5fea85332a5b72b8cbafc58ec4 -size 123104 +oid sha256:e71d6ffeec80d6c9a416654f6a0511e296e163859e95cca411dffd7007f35237 +size 123201 diff --git a/UnitTests/__Snapshots__/PreviewTests/test_secureBackupScreen.Recovery-incomplete.png b/UnitTests/__Snapshots__/PreviewTests/test_secureBackupScreen.Recovery-incomplete.png index fde319ed2c..4e24b42c0e 100644 --- a/UnitTests/__Snapshots__/PreviewTests/test_secureBackupScreen.Recovery-incomplete.png +++ b/UnitTests/__Snapshots__/PreviewTests/test_secureBackupScreen.Recovery-incomplete.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:de37e556ac49c283bb92f363f7492b6f31862b579e4ee136677a2440bea34bd3 -size 111802 +oid sha256:d2429e552323f33b2e8feb64f8ed222752546dbacaab15c649bd0fe85900024d +size 111841 From 83a5f922fa00d3242c1a9506eb41b9f206689cfd Mon Sep 17 00:00:00 2001 From: Doug Date: Thu, 16 Nov 2023 13:20:03 +0000 Subject: [PATCH 2/6] Use ListRow in CreateRoomScreen. --- ElementX.xcodeproj/project.pbxproj | 2 +- .../xcshareddata/swiftpm/Package.resolved | 2 +- .../CreateRoom/View/CreateRoomScreen.swift | 172 ++++++++---------- ...t_createRoom.Create-Room-without-users.png | 4 +- .../test_createRoom.Create-Room.png | 4 +- project.yml | 2 +- 6 files changed, 78 insertions(+), 108 deletions(-) diff --git a/ElementX.xcodeproj/project.pbxproj b/ElementX.xcodeproj/project.pbxproj index 297f962f45..695f275c67 100644 --- a/ElementX.xcodeproj/project.pbxproj +++ b/ElementX.xcodeproj/project.pbxproj @@ -6664,7 +6664,7 @@ repositoryURL = "https://github.com/vector-im/compound-ios"; requirement = { kind = revision; - revision = 7ae8b7ef4033861d0439427d5404538243afeffd; + revision = 922c612875ca92214cc389c87f9e3e210b8d35e7; }; }; 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 e2fa51429c..a6dd549dfc 100644 --- a/ElementX.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/ElementX.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -14,7 +14,7 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/vector-im/compound-ios", "state" : { - "revision" : "7ae8b7ef4033861d0439427d5404538243afeffd" + "revision" : "922c612875ca92214cc389c87f9e3e210b8d35e7" } }, { diff --git a/ElementX/Sources/Screens/CreateRoom/View/CreateRoomScreen.swift b/ElementX/Sources/Screens/CreateRoom/View/CreateRoomScreen.swift index 063dcd2125..1461b091b2 100644 --- a/ElementX/Sources/Screens/CreateRoom/View/CreateRoomScreen.swift +++ b/ElementX/Sources/Screens/CreateRoom/View/CreateRoomScreen.swift @@ -14,6 +14,7 @@ // limitations under the License. // +import Compound import SwiftUI struct CreateRoomScreen: View { @@ -31,16 +32,12 @@ struct CreateRoomScreen: View { topicSection securitySection } - .compoundForm() + .compoundList() .track(screen: .createRoom) .scrollDismissesKeyboard(.immediately) .navigationTitle(L10n.screenCreateRoomTitle) .navigationBarTitleDisplayMode(.inline) - .toolbar { - ToolbarItem(placement: .confirmationAction) { - createButton - } - } + .toolbar { toolbar } .readFrame($frame) .alert(item: $context.alertInfo) } @@ -48,86 +45,82 @@ struct CreateRoomScreen: View { private var roomSection: some View { Section { HStack(alignment: .center, spacing: 16) { - Button { - focus = nil - context.showAttachmentConfirmationDialog = true - } label: { - if let url = context.viewState.avatarURL { - AsyncImage(url: url) { image in - image - .resizable() - .aspectRatio(contentMode: .fill) - } placeholder: { - ProgressView() - } - .scaledFrame(size: 70) - .clipShape(Circle()) - } else { - cameraImage - } - } - .buttonStyle(.plain) - .confirmationDialog("", isPresented: $context.showAttachmentConfirmationDialog) { - Button(L10n.actionTakePhoto) { - context.send(viewAction: .displayCameraPicker) - } - Button(L10n.actionChoosePhoto) { - context.send(viewAction: .displayMediaPicker) - } - if context.viewState.avatarURL != nil { - Button(L10n.actionRemove, role: .destructive) { - context.send(viewAction: .removeImage) - } - } - } + roomAvatarButton + VStack(alignment: .leading, spacing: 8) { Text(L10n.screenCreateRoomRoomNameLabel.uppercased()) - .padding(.leading, FormRow.insets.leading) - .compoundFormSectionHeader() + .padding(.leading, ListRowPadding.horizontal) + .compoundListSectionHeader() + TextField(L10n.screenCreateRoomRoomNameLabel, text: $context.roomName, prompt: Text(L10n.commonRoomNamePlaceholder).foregroundColor(.compound.textPlaceholder), axis: .horizontal) .focused($focus, equals: .name) .accessibilityIdentifier(A11yIdentifiers.createRoomScreen.roomName) - .padding(EdgeInsets(top: 10, leading: 16, bottom: 10, trailing: 16)) - .background(Color.compound.bgCanvasDefaultLevel1) - .clipShape(RoundedRectangle(cornerRadius: 8)) + .padding(.horizontal, ListRowPadding.horizontal) + .padding(.vertical, ListRowPadding.vertical) + .background(.compound.bgCanvasDefaultLevel1, in: RoundedRectangle(cornerRadius: 12)) } } .listRowInsets(.init()) .listRowBackground(Color.clear) } - .compoundFormSection() } - private var cameraImage: some View { - Image(systemName: "camera") - .font(.system(size: 28, weight: .semibold)) - .foregroundColor(.compound.iconSecondary) - .scaledFrame(size: 70) - .background(Color.compound.bgSubtlePrimary) - .clipShape(Circle()) + private var roomAvatarButton: some View { + Button { + focus = nil + context.showAttachmentConfirmationDialog = true + } label: { + if let url = context.viewState.avatarURL { + AsyncImage(url: url) { image in + image + .resizable() + .aspectRatio(contentMode: .fill) + } placeholder: { + ProgressView() + } + .scaledFrame(size: 70) + .clipShape(Circle()) + } else { + CompoundIcon(asset: Asset.Images.takePhoto, size: .custom(36), relativeTo: .title) + .foregroundColor(.compound.iconSecondary) + .scaledFrame(size: 70, relativeTo: .title) + .background(.compound.bgSubtlePrimary, in: Circle()) + } + } + .buttonStyle(.plain) + .confirmationDialog("", isPresented: $context.showAttachmentConfirmationDialog) { + Button(L10n.actionTakePhoto) { + context.send(viewAction: .displayCameraPicker) + } + Button(L10n.actionChoosePhoto) { + context.send(viewAction: .displayMediaPicker) + } + if context.viewState.avatarURL != nil { + Button(L10n.actionRemove, role: .destructive) { + context.send(viewAction: .removeImage) + } + } + } } private var topicSection: some View { Section { - TextField(L10n.screenCreateRoomTopicLabel, - text: $context.roomTopic, - prompt: Text(L10n.commonTopicPlaceholder).foregroundColor(.compound.textPlaceholder), - axis: .vertical) + ListRow(label: .plain(title: L10n.commonTopicPlaceholder), + kind: .textField(text: $context.roomTopic, axis: .vertical)) + .lineLimit(3, reservesSpace: false) .focused($focus, equals: .topic) .accessibilityIdentifier(A11yIdentifiers.createRoomScreen.roomTopic) - .lineLimit(3, reservesSpace: false) } header: { Text(L10n.screenCreateRoomTopicLabel) - .compoundFormSectionHeader() + .compoundListSectionHeader() } footer: { if !context.viewState.selectedUsers.isEmpty { selectedUsersSection } } - .compoundFormSection() } @State private var frame: CGRect = .zero @@ -143,61 +136,38 @@ struct CreateRoomScreen: View { .frame(width: invitedUserCellWidth) } } - .padding(.init(top: 22, leading: 20, bottom: 0, trailing: 32)) + .padding(.horizontal, ListRowPadding.horizontal) + .padding(.vertical, 22) } .frame(width: frame.width) } private var securitySection: some View { Section { - Picker(L10n.commonSecurity, selection: $context.isRoomPrivate) { - Label { - VStack(alignment: .leading, spacing: 2) { - Text(L10n.screenCreateRoomPrivateOptionTitle) - .font(.compound.bodyLG) - Text(L10n.screenCreateRoomPrivateOptionDescription) - .font(.compound.bodyXS) - .foregroundColor(.compound.textSecondary) - } - } icon: { - Image(systemName: "lock.shield") - } - .tag(true) - .labelStyle(FormRowLabelStyle(alignment: .top)) - - Label { - VStack(alignment: .leading, spacing: 2) { - Text(L10n.screenCreateRoomPublicOptionTitle) - .font(.compound.bodyLG) - Text(L10n.screenCreateRoomPublicOptionDescription) - .font(.compound.bodyXS) - .foregroundColor(.compound.textSecondary) - } - } icon: { - Image(systemName: "exclamationmark.shield") - } - .tag(false) - .labelStyle(FormRowLabelStyle(alignment: .top)) - } - .labelsHidden() - .pickerStyle(.inline) + ListRow(label: .default(title: L10n.screenCreateRoomPrivateOptionTitle, + description: L10n.screenCreateRoomPrivateOptionDescription, + icon: CompoundIcon(asset: Asset.Images.lock), + iconAlignment: .top), + kind: .selection(isSelected: context.isRoomPrivate) { context.isRoomPrivate = true }) + ListRow(label: .default(title: L10n.screenCreateRoomPublicOptionTitle, + description: L10n.screenCreateRoomPublicOptionDescription, + icon: \.public, + iconAlignment: .top), + kind: .selection(isSelected: !context.isRoomPrivate) { context.isRoomPrivate = false }) } header: { Text(L10n.commonSecurity.uppercased()) - .compoundFormSectionHeader() - .padding(.top, 40) + .compoundListSectionHeader() } - .listRowSeparatorTint(.compound.borderDisabled) - .listRowBackground(Color.compound.bgCanvasDefaultLevel1) } - private var createButton: some View { - Button { - focus = nil - context.send(viewAction: .createRoom) - } label: { - Text(L10n.actionCreate) + private var toolbar: some ToolbarContent { + ToolbarItem(placement: .confirmationAction) { + Button(L10n.actionCreate) { + focus = nil + context.send(viewAction: .createRoom) + } + .disabled(!context.viewState.canCreateRoom) } - .disabled(!context.viewState.canCreateRoom) } } diff --git a/UnitTests/__Snapshots__/PreviewTests/test_createRoom.Create-Room-without-users.png b/UnitTests/__Snapshots__/PreviewTests/test_createRoom.Create-Room-without-users.png index 346e3511b2..78ea2b323d 100644 --- a/UnitTests/__Snapshots__/PreviewTests/test_createRoom.Create-Room-without-users.png +++ b/UnitTests/__Snapshots__/PreviewTests/test_createRoom.Create-Room-without-users.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:96729828d82bb8f5b40173554aabdd649b8e87fb15a288686eca1574b4b96641 -size 168107 +oid sha256:e81a71656b470019d193bd0b9bc4c40339b59bc84d932dd8d58be7d1ac22251b +size 166414 diff --git a/UnitTests/__Snapshots__/PreviewTests/test_createRoom.Create-Room.png b/UnitTests/__Snapshots__/PreviewTests/test_createRoom.Create-Room.png index 1307bea34d..68b0a88df2 100644 --- a/UnitTests/__Snapshots__/PreviewTests/test_createRoom.Create-Room.png +++ b/UnitTests/__Snapshots__/PreviewTests/test_createRoom.Create-Room.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f14072e377d9015d23c45b8d810976587f66a96c563cd581d188cdb7908f54df -size 169132 +oid sha256:9de5cb03ede581f8968bc7c309962758a7eff216046863e02add1f0df63b02cf +size 193889 diff --git a/project.yml b/project.yml index d89989d1d3..b3c2f8c36f 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: 7ae8b7ef4033861d0439427d5404538243afeffd + revision: 922c612875ca92214cc389c87f9e3e210b8d35e7 # path: ../compound-ios AnalyticsEvents: url: https://github.com/matrix-org/matrix-analytics-events From f0d18d8e9d9580b37476f4da588000065fec692d Mon Sep 17 00:00:00 2001 From: Doug Date: Thu, 16 Nov 2023 17:12:31 +0000 Subject: [PATCH 3/6] More snapshots. --- ElementX/Sources/Mocks/RoomProxyMock.swift | 2 +- .../View/RoomNotificationSettingsUserDefinedScreen.swift | 2 +- UITests/Sources/AppLockUITests.swift | 1 + .../Application/en-GB-iPad-9th-generation.createRoom-1.png | 4 ++-- .../Application/en-GB-iPad-9th-generation.createRoom.png | 4 ++-- .../en-GB-iPad-9th-generation.createRoomNoUsers.png | 4 ++-- ...d-9th-generation.roomNotificationSettingsCustomSetting.png | 4 ++-- .../Application/en-GB-iPhone-14.createRoom-1.png | 4 ++-- .../__Snapshots__/Application/en-GB-iPhone-14.createRoom.png | 4 ++-- .../Application/en-GB-iPhone-14.createRoomNoUsers.png | 4 ++-- .../en-GB-iPhone-14.roomNotificationSettingsCustomSetting.png | 4 ++-- .../Application/pseudo-iPad-9th-generation.createRoom-1.png | 4 ++-- .../Application/pseudo-iPad-9th-generation.createRoom.png | 4 ++-- .../pseudo-iPad-9th-generation.createRoomNoUsers.png | 4 ++-- ...d-9th-generation.roomNotificationSettingsCustomSetting.png | 4 ++-- .../Application/pseudo-iPhone-14.createRoom-1.png | 4 ++-- .../__Snapshots__/Application/pseudo-iPhone-14.createRoom.png | 4 ++-- .../Application/pseudo-iPhone-14.createRoomNoUsers.png | 4 ++-- ...pseudo-iPhone-14.roomNotificationSettingsCustomSetting.png | 4 ++-- .../test_notificationSettingsEditScreen.Applying-change.png | 4 ++-- .../test_notificationSettingsEditScreen.Direct-Chats.png | 4 ++-- ...ationSettingsEditScreen.Group-Chats-Without-Disclaimer.png | 4 ++-- .../test_notificationSettingsEditScreen.Group-Chats.png | 4 ++-- ...st_roomNotificationSettingsCustomSectionView.Encrypted.png | 4 ++-- ..._roomNotificationSettingsCustomSectionView.Unencrypted.png | 4 ++-- ...st_roomNotificationSettingsUserDefinedScreen.Encrypted.png | 4 ++-- ..._roomNotificationSettingsUserDefinedScreen.Unencrypted.png | 4 ++-- 27 files changed, 51 insertions(+), 50 deletions(-) diff --git a/ElementX/Sources/Mocks/RoomProxyMock.swift b/ElementX/Sources/Mocks/RoomProxyMock.swift index ec47ecf9d3..f322a34a00 100644 --- a/ElementX/Sources/Mocks/RoomProxyMock.swift +++ b/ElementX/Sources/Mocks/RoomProxyMock.swift @@ -26,7 +26,7 @@ struct RoomProxyMockConfiguration { var isDirect = Bool.random() var isSpace = Bool.random() var isPublic = Bool.random() - var isEncrypted = Bool.random() + var isEncrypted = true var isTombstoned = Bool.random() var hasOngoingCall = false var canonicalAlias: String? diff --git a/ElementX/Sources/Screens/RoomNotificationSettingsScreen/View/RoomNotificationSettingsUserDefinedScreen.swift b/ElementX/Sources/Screens/RoomNotificationSettingsScreen/View/RoomNotificationSettingsUserDefinedScreen.swift index 6a3c9bd0f8..189d7aa80f 100644 --- a/ElementX/Sources/Screens/RoomNotificationSettingsScreen/View/RoomNotificationSettingsUserDefinedScreen.swift +++ b/ElementX/Sources/Screens/RoomNotificationSettingsScreen/View/RoomNotificationSettingsUserDefinedScreen.swift @@ -36,7 +36,7 @@ struct RoomNotificationSettingsUserDefinedScreen: View { private var deleteButton: some View { ListRow(label: .action(title: L10n.screenRoomNotificationSettingsEditRemoveSetting, - systemIcon: .trash, + icon: \.delete, role: .destructive), details: context.viewState.deletingCustomSetting ? .isWaiting(true) : nil, kind: .button { diff --git a/UITests/Sources/AppLockUITests.swift b/UITests/Sources/AppLockUITests.swift index 00bba9668a..9b87c75d39 100644 --- a/UITests/Sources/AppLockUITests.swift +++ b/UITests/Sources/AppLockUITests.swift @@ -87,6 +87,7 @@ class AppLockUITests: XCTestCase { try await app.assertScreenshot(.appLockFlow, step: Step.unlocked) try client.send(.notification(name: UIApplication.didEnterBackgroundNotification)) + try await Task.sleep(for: .milliseconds(500)) // Don't overwrite the previous signal immediately. try client.send(.notification(name: UIApplication.didBecomeActiveNotification)) try await app.assertScreenshot(.appLockFlow, step: Step.lockScreen) diff --git a/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.createRoom-1.png b/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.createRoom-1.png index d78b18108c..89d6f2f5f7 100644 --- a/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.createRoom-1.png +++ b/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.createRoom-1.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:165ffd65659a9656de2c121ddc796672bb7f8ecd11ba553801005668fb10deb1 -size 133345 +oid sha256:a8c1a194e0e4abbc9f60492bf18585aa73f9c915b4caf4c99f84ab7e50aafb45 +size 134080 diff --git a/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.createRoom.png b/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.createRoom.png index 2f32c7fb5b..48fc65476a 100644 --- a/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.createRoom.png +++ b/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.createRoom.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:120d645d2f85d639baea6e60e8e007889552a06ef9f387c12cfea1f70e1d5562 -size 135935 +oid sha256:df7732354aa03c0ce774f099b317e9fd51a9a629c945d9616f524feda87cc8d5 +size 136840 diff --git a/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.createRoomNoUsers.png b/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.createRoomNoUsers.png index 8d3232ea52..90852b9948 100644 --- a/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.createRoomNoUsers.png +++ b/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.createRoomNoUsers.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0c7c2f77452a6014acae01858121ccd20618da8a5ab7b38d9551c5941cd62b41 -size 115726 +oid sha256:a37d5b7bc5f0b8b61ee5cbae2f614a65c7d1586cb436d36cfcb43ef9a02c6f88 +size 115685 diff --git a/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.roomNotificationSettingsCustomSetting.png b/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.roomNotificationSettingsCustomSetting.png index b69adf9ed7..7b10ee90da 100644 --- a/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.roomNotificationSettingsCustomSetting.png +++ b/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.roomNotificationSettingsCustomSetting.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:55ce6c018bba62f121ac067f1d7f048f0c9e93cbe4f01f759adc9d052d8bb6dc -size 91307 +oid sha256:319d071ac10f52841d78b74564f240b1e7c74452853650426fee0f036e2b40eb +size 101387 diff --git a/UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.createRoom-1.png b/UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.createRoom-1.png index 6f079b0ae2..76f082e6f7 100644 --- a/UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.createRoom-1.png +++ b/UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.createRoom-1.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ab50fae5e79a4ed8ddb2a118871de9fec600c68e6fb80777c0c0856419f75bcd -size 175004 +oid sha256:031ace0b8f7992277b829af8e90fddd55841d4e883481b23ad16f0ca0dbcbd8b +size 176077 diff --git a/UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.createRoom.png b/UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.createRoom.png index a4c01bb9f5..be7d5f0d05 100644 --- a/UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.createRoom.png +++ b/UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.createRoom.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cdb8bbea4436bcf2239bc6a164d4b9a50a1feefc1f013b5c8967d925266e20c9 -size 180771 +oid sha256:c984e275f2e45e03f5173210ac520e33cdb86f7af897020aec56d488148f4241 +size 182261 diff --git a/UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.createRoomNoUsers.png b/UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.createRoomNoUsers.png index 87719e529e..069ba52722 100644 --- a/UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.createRoomNoUsers.png +++ b/UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.createRoomNoUsers.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:31adc6a54ba0d2fc04e1c76e1162cfb023f6363f4ecd0fe517bd9b373abddbd1 -size 154441 +oid sha256:0323ba76d048f24631f13da49ee36bccd97930535f3938ef68c4a264eb1a9c3e +size 155112 diff --git a/UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.roomNotificationSettingsCustomSetting.png b/UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.roomNotificationSettingsCustomSetting.png index cd556c8d4f..4d270a4d4f 100644 --- a/UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.roomNotificationSettingsCustomSetting.png +++ b/UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.roomNotificationSettingsCustomSetting.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a9eed804e596319fb87cac52da8955d2cf41c3fb11f92c0e33db65db72d84fcc -size 107614 +oid sha256:bc31e50736fb2041e79e47f3db8aa38b00cdbd4a626cb48ada7199627a8d5032 +size 127515 diff --git a/UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.createRoom-1.png b/UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.createRoom-1.png index f761575521..f495f22b1b 100644 --- a/UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.createRoom-1.png +++ b/UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.createRoom-1.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:70f59337e1f7bd561d28969a4bbb5bf847c5adec0ec3176dcde85d2e6c383ce7 -size 157210 +oid sha256:d7a5905fbea128dd703ec01515e9d5eb32626c46d293d74d6175079ee0ab9b6c +size 157409 diff --git a/UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.createRoom.png b/UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.createRoom.png index d2fabdce87..a392d2dac2 100644 --- a/UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.createRoom.png +++ b/UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.createRoom.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2b2fd8d6eec0e551760895b8f25835f64413d61e96cca3007e04cd593798f4b4 -size 160823 +oid sha256:c9412a601e3caa4f4c671b7f5dc3ed7f4c03abf1298951e83692d2632a30a81d +size 160972 diff --git a/UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.createRoomNoUsers.png b/UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.createRoomNoUsers.png index 2c79e09f2e..ff56aa3bd5 100644 --- a/UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.createRoomNoUsers.png +++ b/UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.createRoomNoUsers.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d3c681d0cb0bb8da3d8d6210b9e0433ebadacc20d106fab5f3f9676fccd948ed -size 139791 +oid sha256:7f307ebbffadfef697d0e33650e7645ac5b6bb6b93fa7199efc0915594e70d9a +size 140368 diff --git a/UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.roomNotificationSettingsCustomSetting.png b/UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.roomNotificationSettingsCustomSetting.png index e0b69e9486..510d69d218 100644 --- a/UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.roomNotificationSettingsCustomSetting.png +++ b/UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.roomNotificationSettingsCustomSetting.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6155979ba94debfdcb27a884dda577190a10c663feec56ba6ce68ccdc208709a -size 98799 +oid sha256:e75d0a6f53f3243942c30552e9dd696788f208b9e83ab5763a9000929143d9a3 +size 118699 diff --git a/UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.createRoom-1.png b/UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.createRoom-1.png index 68018f92a9..4e342335c6 100644 --- a/UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.createRoom-1.png +++ b/UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.createRoom-1.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ae5ba27daef93148115492d64964065432e93e9bfd630d21d23ac7f65ee21dee -size 221972 +oid sha256:4e9714157c467effc8d890cc6acb05de6e7e96fdfd6a5b04f8607dc4e0642e48 +size 225549 diff --git a/UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.createRoom.png b/UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.createRoom.png index 75b66b3079..8975415366 100644 --- a/UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.createRoom.png +++ b/UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.createRoom.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:47e473ef026488347442246a78f05d81fc4e71d0cb9c0df7280ae82879f3a098 -size 227044 +oid sha256:377610530c5e8a84e399e8b756f97a7aa8da429108ecfdcce65969a1492e0bd0 +size 232677 diff --git a/UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.createRoomNoUsers.png b/UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.createRoomNoUsers.png index 92803cdc34..eefb50965c 100644 --- a/UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.createRoomNoUsers.png +++ b/UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.createRoomNoUsers.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:414d283c7b93c11148f4c0173ea28d98260027fba1374bf2e0497b146bc40c74 -size 203002 +oid sha256:f03110ecbb663ee16123d572d6589c5b18146da5f8ed6283990494fbf64d4a6c +size 205095 diff --git a/UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.roomNotificationSettingsCustomSetting.png b/UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.roomNotificationSettingsCustomSetting.png index 7e6c778b47..b1e96e2df7 100644 --- a/UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.roomNotificationSettingsCustomSetting.png +++ b/UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.roomNotificationSettingsCustomSetting.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:56e470c713c4b51e58c3027c66039d191a63d81d1ec04809c6cdc087ed088c50 -size 140627 +oid sha256:e3c37fbc3ebb89a0258deb2243834f3bf1def18456ac91de7b87c440aff0ddd2 +size 175124 diff --git a/UnitTests/__Snapshots__/PreviewTests/test_notificationSettingsEditScreen.Applying-change.png b/UnitTests/__Snapshots__/PreviewTests/test_notificationSettingsEditScreen.Applying-change.png index 79c890116a..eb01d95ffe 100644 --- a/UnitTests/__Snapshots__/PreviewTests/test_notificationSettingsEditScreen.Applying-change.png +++ b/UnitTests/__Snapshots__/PreviewTests/test_notificationSettingsEditScreen.Applying-change.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ce476aa338694340df878df31e12240481afcda2531599c6636d0367356180d0 -size 103319 +oid sha256:2ffedfd2ff82cd7e8ac6d0ee0fbe3f8b2addc6a6dfc1b0e56255445d13cd48bf +size 103866 diff --git a/UnitTests/__Snapshots__/PreviewTests/test_notificationSettingsEditScreen.Direct-Chats.png b/UnitTests/__Snapshots__/PreviewTests/test_notificationSettingsEditScreen.Direct-Chats.png index cc7c0c4e1b..ddacb2fe3e 100644 --- a/UnitTests/__Snapshots__/PreviewTests/test_notificationSettingsEditScreen.Direct-Chats.png +++ b/UnitTests/__Snapshots__/PreviewTests/test_notificationSettingsEditScreen.Direct-Chats.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6f0f5853cdc2865fdf622de333e31b53acfccd945f35085990f02031c3978e05 -size 103330 +oid sha256:6c2d9f973ba79ec8e3335939bdf1b0d6bfe2e282d6c53be614c498762444cb2a +size 103430 diff --git a/UnitTests/__Snapshots__/PreviewTests/test_notificationSettingsEditScreen.Group-Chats-Without-Disclaimer.png b/UnitTests/__Snapshots__/PreviewTests/test_notificationSettingsEditScreen.Group-Chats-Without-Disclaimer.png index 6156bf2757..3803e12c2d 100644 --- a/UnitTests/__Snapshots__/PreviewTests/test_notificationSettingsEditScreen.Group-Chats-Without-Disclaimer.png +++ b/UnitTests/__Snapshots__/PreviewTests/test_notificationSettingsEditScreen.Group-Chats-Without-Disclaimer.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:16268407b37510cc9ec162e62db9789051471119d5e18dc72a49c8bbc5b09d13 -size 103672 +oid sha256:094e0f006c6109fd1f0292278caa990c638fa88b445cb993270b63110fa6b267 +size 103767 diff --git a/UnitTests/__Snapshots__/PreviewTests/test_notificationSettingsEditScreen.Group-Chats.png b/UnitTests/__Snapshots__/PreviewTests/test_notificationSettingsEditScreen.Group-Chats.png index 6156bf2757..3803e12c2d 100644 --- a/UnitTests/__Snapshots__/PreviewTests/test_notificationSettingsEditScreen.Group-Chats.png +++ b/UnitTests/__Snapshots__/PreviewTests/test_notificationSettingsEditScreen.Group-Chats.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:16268407b37510cc9ec162e62db9789051471119d5e18dc72a49c8bbc5b09d13 -size 103672 +oid sha256:094e0f006c6109fd1f0292278caa990c638fa88b445cb993270b63110fa6b267 +size 103767 diff --git a/UnitTests/__Snapshots__/PreviewTests/test_roomNotificationSettingsCustomSectionView.Encrypted.png b/UnitTests/__Snapshots__/PreviewTests/test_roomNotificationSettingsCustomSectionView.Encrypted.png index edc7a2198f..25c873b839 100644 --- a/UnitTests/__Snapshots__/PreviewTests/test_roomNotificationSettingsCustomSectionView.Encrypted.png +++ b/UnitTests/__Snapshots__/PreviewTests/test_roomNotificationSettingsCustomSectionView.Encrypted.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d688fd6c955d14ed7b7cd419cf6e11d7da5ff992d02b4cba884891e298822292 -size 104261 +oid sha256:ddaf5a24c51fd2fd095bf050cf39468915b77d40e2a2cc582135e41a5a415be9 +size 106218 diff --git a/UnitTests/__Snapshots__/PreviewTests/test_roomNotificationSettingsCustomSectionView.Unencrypted.png b/UnitTests/__Snapshots__/PreviewTests/test_roomNotificationSettingsCustomSectionView.Unencrypted.png index edc7a2198f..25c873b839 100644 --- a/UnitTests/__Snapshots__/PreviewTests/test_roomNotificationSettingsCustomSectionView.Unencrypted.png +++ b/UnitTests/__Snapshots__/PreviewTests/test_roomNotificationSettingsCustomSectionView.Unencrypted.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d688fd6c955d14ed7b7cd419cf6e11d7da5ff992d02b4cba884891e298822292 -size 104261 +oid sha256:ddaf5a24c51fd2fd095bf050cf39468915b77d40e2a2cc582135e41a5a415be9 +size 106218 diff --git a/UnitTests/__Snapshots__/PreviewTests/test_roomNotificationSettingsUserDefinedScreen.Encrypted.png b/UnitTests/__Snapshots__/PreviewTests/test_roomNotificationSettingsUserDefinedScreen.Encrypted.png index 46c307678a..68b9a1c81b 100644 --- a/UnitTests/__Snapshots__/PreviewTests/test_roomNotificationSettingsUserDefinedScreen.Encrypted.png +++ b/UnitTests/__Snapshots__/PreviewTests/test_roomNotificationSettingsUserDefinedScreen.Encrypted.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:84816004db958e01290609776f4455e95d73a24a1af223a6af21d0e818a060e2 -size 114117 +oid sha256:a8caf3fdd71e6edb2c3f0c3d2970feee108933a878759a7aad5be0f5b9224cab +size 114525 diff --git a/UnitTests/__Snapshots__/PreviewTests/test_roomNotificationSettingsUserDefinedScreen.Unencrypted.png b/UnitTests/__Snapshots__/PreviewTests/test_roomNotificationSettingsUserDefinedScreen.Unencrypted.png index 46c307678a..68b9a1c81b 100644 --- a/UnitTests/__Snapshots__/PreviewTests/test_roomNotificationSettingsUserDefinedScreen.Unencrypted.png +++ b/UnitTests/__Snapshots__/PreviewTests/test_roomNotificationSettingsUserDefinedScreen.Unencrypted.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:84816004db958e01290609776f4455e95d73a24a1af223a6af21d0e818a060e2 -size 114117 +oid sha256:a8caf3fdd71e6edb2c3f0c3d2970feee108933a878759a7aad5be0f5b9224cab +size 114525 From f30fe89d7a733a3a121d588139ce71db5b0fbf6f Mon Sep 17 00:00:00 2001 From: Doug Date: Thu, 16 Nov 2023 18:02:31 +0000 Subject: [PATCH 4/6] Changelog. --- changelog.d/pr-2099.change | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/pr-2099.change diff --git a/changelog.d/pr-2099.change b/changelog.d/pr-2099.change new file mode 100644 index 0000000000..fdd5a39bc6 --- /dev/null +++ b/changelog.d/pr-2099.change @@ -0,0 +1 @@ +Use Compound List in Start Chat and Room Member Details screens. \ No newline at end of file From 763e4a48b648abea20ea3eb054c1b669bb836eb3 Mon Sep 17 00:00:00 2001 From: Doug Date: Fri, 17 Nov 2023 15:07:06 +0000 Subject: [PATCH 5/6] Fix ListRow layout when isWaiting && !isSelected. --- ElementX.xcodeproj/project.pbxproj | 2 +- .../project.xcworkspace/xcshareddata/swiftpm/Package.resolved | 2 +- .../Screens/BugReportScreen/View/BugReportScreen.swift | 2 +- .../RoomDetailsEditScreen/View/RoomDetailsEditScreen.swift | 4 ++-- .../View/NotificationSettingsEditScreenRoomCell.swift | 2 +- .../View/NotificationSettingsScreen.swift | 4 ++-- .../Screens/Settings/SettingsScreen/View/SettingsScreen.swift | 4 +--- .../test_notificationSettingsEditScreen.Applying-change.png | 4 ++-- project.yml | 2 +- 9 files changed, 12 insertions(+), 14 deletions(-) diff --git a/ElementX.xcodeproj/project.pbxproj b/ElementX.xcodeproj/project.pbxproj index 695f275c67..fe9f016bd1 100644 --- a/ElementX.xcodeproj/project.pbxproj +++ b/ElementX.xcodeproj/project.pbxproj @@ -6664,7 +6664,7 @@ repositoryURL = "https://github.com/vector-im/compound-ios"; requirement = { kind = revision; - revision = 922c612875ca92214cc389c87f9e3e210b8d35e7; + revision = 59166acc95a775ba3b7e7d39e5605611cf0e657f; }; }; 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 a6dd549dfc..fece27e709 100644 --- a/ElementX.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/ElementX.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -14,7 +14,7 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/vector-im/compound-ios", "state" : { - "revision" : "922c612875ca92214cc389c87f9e3e210b8d35e7" + "revision" : "59166acc95a775ba3b7e7d39e5605611cf0e657f" } }, { diff --git a/ElementX/Sources/Screens/BugReportScreen/View/BugReportScreen.swift b/ElementX/Sources/Screens/BugReportScreen/View/BugReportScreen.swift index 6436288b06..f72d4e4876 100644 --- a/ElementX/Sources/Screens/BugReportScreen/View/BugReportScreen.swift +++ b/ElementX/Sources/Screens/BugReportScreen/View/BugReportScreen.swift @@ -92,7 +92,7 @@ struct BugReportScreen: View { PhotosPicker(selection: $selectedScreenshot, matching: .screenshots, photoLibrary: .shared()) { - ListLabel.plain(title: photosPickerTitle) + ListRowLabel.plain(title: photosPickerTitle) } }) .accessibilityIdentifier(A11yIdentifiers.bugReportScreen.attachScreenshot) diff --git a/ElementX/Sources/Screens/RoomDetailsEditScreen/View/RoomDetailsEditScreen.swift b/ElementX/Sources/Screens/RoomDetailsEditScreen/View/RoomDetailsEditScreen.swift index 59cd116fc6..54e0078cd9 100644 --- a/ElementX/Sources/Screens/RoomDetailsEditScreen/View/RoomDetailsEditScreen.swift +++ b/ElementX/Sources/Screens/RoomDetailsEditScreen/View/RoomDetailsEditScreen.swift @@ -92,7 +92,7 @@ struct RoomDetailsEditScreen: View { .focused($focus, equals: .name) } else { ListRow(kind: .custom { - ListLabel.plain(title: context.viewState.nameRowTitle) + ListRowLabel.plain(title: context.viewState.nameRowTitle) .listRowBackground(Color.clear) }) } @@ -111,7 +111,7 @@ struct RoomDetailsEditScreen: View { .lineLimit(3...) } else { ListRow(kind: .custom { - ListLabel.plain(title: context.viewState.topicRowTitle) + ListRowLabel.plain(title: context.viewState.topicRowTitle) .listRowBackground(Color.clear) }) } diff --git a/ElementX/Sources/Screens/Settings/NotificationSettingsEditScreen/View/NotificationSettingsEditScreenRoomCell.swift b/ElementX/Sources/Screens/Settings/NotificationSettingsEditScreen/View/NotificationSettingsEditScreenRoomCell.swift index 19a601f8bd..ef0b9590a2 100644 --- a/ElementX/Sources/Screens/Settings/NotificationSettingsEditScreen/View/NotificationSettingsEditScreenRoomCell.swift +++ b/ElementX/Sources/Screens/Settings/NotificationSettingsEditScreen/View/NotificationSettingsEditScreenRoomCell.swift @@ -50,7 +50,7 @@ struct NotificationSettingsEditScreenRoomCell: View { } @MainActor - var roomDetailsLabel: ListDetailsLabel? { + var roomDetailsLabel: ListRowDetails? { guard let mode = room.notificationMode else { return nil } return .label(title: context.viewState.strings.string(for: mode), icon: EmptyView()) diff --git a/ElementX/Sources/Screens/Settings/NotificationSettingsScreen/View/NotificationSettingsScreen.swift b/ElementX/Sources/Screens/Settings/NotificationSettingsScreen/View/NotificationSettingsScreen.swift index 8ce9a79d6b..2a5f30e2b2 100644 --- a/ElementX/Sources/Screens/Settings/NotificationSettingsScreen/View/NotificationSettingsScreen.swift +++ b/ElementX/Sources/Screens/Settings/NotificationSettingsScreen/View/NotificationSettingsScreen.swift @@ -98,7 +98,7 @@ struct NotificationSettingsScreen: View { // Group chats ListRow(label: .plain(title: L10n.screenNotificationSettingsGroupChats), details: context.viewState.settings.map { - ListDetailsLabel.title(context.viewState.strings.string(for: $0.groupChatsMode)) + .title(context.viewState.strings.string(for: $0.groupChatsMode)) } ?? .isWaiting(true), kind: .navigationLink { context.send(viewAction: .groupChatsTapped) @@ -109,7 +109,7 @@ struct NotificationSettingsScreen: View { // Direct chats ListRow(label: .plain(title: L10n.screenNotificationSettingsDirectChats), details: context.viewState.settings.map { - ListDetailsLabel.title(context.viewState.strings.string(for: $0.directChatsMode)) + .title(context.viewState.strings.string(for: $0.directChatsMode)) } ?? .isWaiting(true), kind: .navigationLink { context.send(viewAction: .directChatsTapped) diff --git a/ElementX/Sources/Screens/Settings/SettingsScreen/View/SettingsScreen.swift b/ElementX/Sources/Screens/Settings/SettingsScreen/View/SettingsScreen.swift index 8708051a5d..9b1fbf6d73 100644 --- a/ElementX/Sources/Screens/Settings/SettingsScreen/View/SettingsScreen.swift +++ b/ElementX/Sources/Screens/Settings/SettingsScreen/View/SettingsScreen.swift @@ -71,9 +71,7 @@ struct SettingsScreen: View { Spacer() - CompoundIcon(\.chevronRight) - .foregroundColor(.compound.iconTertiaryAlpha) - .flipsForRightToLeftLayoutDirection(true) + ListRowAccessory.navigationLink } .padding(.horizontal, ListRowPadding.horizontal) .padding(.vertical, 8) diff --git a/UnitTests/__Snapshots__/PreviewTests/test_notificationSettingsEditScreen.Applying-change.png b/UnitTests/__Snapshots__/PreviewTests/test_notificationSettingsEditScreen.Applying-change.png index eb01d95ffe..6f9b32a19a 100644 --- a/UnitTests/__Snapshots__/PreviewTests/test_notificationSettingsEditScreen.Applying-change.png +++ b/UnitTests/__Snapshots__/PreviewTests/test_notificationSettingsEditScreen.Applying-change.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2ffedfd2ff82cd7e8ac6d0ee0fbe3f8b2addc6a6dfc1b0e56255445d13cd48bf -size 103866 +oid sha256:19f1bf1b3a19af41a8e81d317f989bd83aa9fd3aefcbbcc8e7a7abdd940abe15 +size 103243 diff --git a/project.yml b/project.yml index b3c2f8c36f..014c118fed 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: 922c612875ca92214cc389c87f9e3e210b8d35e7 + revision: 59166acc95a775ba3b7e7d39e5605611cf0e657f # path: ../compound-ios AnalyticsEvents: url: https://github.com/matrix-org/matrix-analytics-events From 763fe6dea4be986d3a87288974ba39aae04403a5 Mon Sep 17 00:00:00 2001 From: Doug Date: Fri, 17 Nov 2023 16:38:24 +0000 Subject: [PATCH 6/6] Compile error. --- .../Screens/StartChatScreen/View/StartChatScreen.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ElementX/Sources/Screens/StartChatScreen/View/StartChatScreen.swift b/ElementX/Sources/Screens/StartChatScreen/View/StartChatScreen.swift index db50121fce..cb0d5abdd7 100644 --- a/ElementX/Sources/Screens/StartChatScreen/View/StartChatScreen.swift +++ b/ElementX/Sources/Screens/StartChatScreen/View/StartChatScreen.swift @@ -74,8 +74,8 @@ struct StartChatScreen: View { Section { ListRow(kind: .custom { MatrixUserShareLink(userID: context.viewState.userID) { - ListLabel.default(title: L10n.actionInvitePeopleToApp(InfoPlistReader.main.bundleDisplayName), - icon: CompoundIcon(asset: Asset.Images.shareIos)) + ListRowLabel.default(title: L10n.actionInvitePeopleToApp(InfoPlistReader.main.bundleDisplayName), + icon: CompoundIcon(asset: Asset.Images.shareIos)) } }) .accessibilityIdentifier(A11yIdentifiers.startChatScreen.inviteFriends)