diff --git a/ElementX.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/ElementX.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index dadf9a09f..bd975af1d 100644 --- a/ElementX.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/ElementX.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -6,8 +6,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/element-hq/compound-design-tokens", "state" : { - "revision" : "d55164b64a67277c62ee4e4ccebea535168ea7be", - "version" : "6.9.0" + "revision" : "a3dedba504bd1a3d04ce2a62eef00b9eef799ec4", + "version" : "6.10.1" } }, { diff --git a/ElementX/Sources/Other/SwiftUI/Views/HorizontalHighlightGradient.swift b/ElementX/Sources/Other/SwiftUI/Views/HorizontalHighlightGradient.swift index b54afc505..3fcbd51a1 100644 --- a/ElementX/Sources/Other/SwiftUI/Views/HorizontalHighlightGradient.swift +++ b/ElementX/Sources/Other/SwiftUI/Views/HorizontalHighlightGradient.swift @@ -10,15 +10,14 @@ import Compound import SwiftUI extension View { - func highlight(gradient: Gradient, borderColor: Color, backgroundColor: Color = .clear) -> some View { - modifier(HorizontalHighlightGradient(gradient: gradient, borderColor: borderColor, backgroundColor: backgroundColor)) + func highlight(gradient: Gradient, borderColor: Color) -> some View { + modifier(HorizontalHighlightGradient(gradient: gradient, borderColor: borderColor)) } } struct HorizontalHighlightGradient: ViewModifier { let gradient: Gradient let borderColor: Color - let backgroundColor: Color func body(content: Content) -> some View { ZStack(alignment: .top) { @@ -28,7 +27,6 @@ struct HorizontalHighlightGradient: ViewModifier { LinearGradient(gradient: gradient, startPoint: .top, endPoint: .bottom) - .background(backgroundColor) } content .layoutPriority(1) diff --git a/ElementX/Sources/Screens/RoomScreen/View/RoomScreen.swift b/ElementX/Sources/Screens/RoomScreen/View/RoomScreen.swift index 4067209a2..4eefe49c1 100644 --- a/ElementX/Sources/Screens/RoomScreen/View/RoomScreen.swift +++ b/ElementX/Sources/Screens/RoomScreen/View/RoomScreen.swift @@ -133,9 +133,7 @@ struct RoomScreen: View { .padding(.top, 16) .padding(.horizontal, 16) .padding(.bottom, 12) - .highlight(gradient: .compound.info, - borderColor: .compound.borderInfoSubtle, - backgroundColor: .compound.bgCanvasDefault) + .highlight(gradient: .compound.info, borderColor: .compound.borderInfoSubtle) } @ViewBuilder diff --git a/ElementX/Sources/Screens/RoomScreen/View/RoomScreenFooterView.swift b/ElementX/Sources/Screens/RoomScreen/View/RoomScreenFooterView.swift index b9574fed7..e08f63c3a 100644 --- a/ElementX/Sources/Screens/RoomScreen/View/RoomScreenFooterView.swift +++ b/ElementX/Sources/Screens/RoomScreen/View/RoomScreenFooterView.swift @@ -30,7 +30,7 @@ struct RoomScreenFooterView: View { case .pinViolation: .compound.info case .verificationViolation: - Gradient(colors: [.compound.bgCriticalSubtle, .clear]) + .compound.critical case .none: Gradient(colors: [.clear]) } @@ -39,9 +39,7 @@ struct RoomScreenFooterView: View { var body: some View { if let details { detailsView(details) - .highlight(gradient: gradient, - borderColor: borderColor, - backgroundColor: .compound.bgCanvasDefault) + .highlight(gradient: gradient, borderColor: borderColor) .padding(.top, 8) .fixedSize(horizontal: false, vertical: true) } diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/roomScreen.Tombstoned-iPad-en-GB.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/roomScreen.Tombstoned-iPad-en-GB.png index bf5b8e7a4..fdfebfe19 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/roomScreen.Tombstoned-iPad-en-GB.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/roomScreen.Tombstoned-iPad-en-GB.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4449a22b05da22796696beff6255a72558e0fa914c437ae91ece468550f561f4 -size 352422 +oid sha256:080c96766ed1113da5dd96df929f5019aca0b7f69b57d964b32f9725d5956cb5 +size 350067 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/roomScreen.Tombstoned-iPad-pseudo.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/roomScreen.Tombstoned-iPad-pseudo.png index 44f4c35ab..cc9550b2d 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/roomScreen.Tombstoned-iPad-pseudo.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/roomScreen.Tombstoned-iPad-pseudo.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7f39176850135adbef5a09b444fc6956d3d45aced1cd929510568b959cda5277 -size 367410 +oid sha256:6b6160c03a32cc3f948098f80fd690eba9c65a096ee1815d83db3c2a3ca07bbb +size 363346 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/roomScreen.Tombstoned-iPhone-en-GB.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/roomScreen.Tombstoned-iPhone-en-GB.png index 130f1d08c..79e936365 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/roomScreen.Tombstoned-iPhone-en-GB.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/roomScreen.Tombstoned-iPhone-en-GB.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b033dea011d1b5568cbd80ae32987c4c1701331f55f7a1721b92fa18230b4fcc -size 205708 +oid sha256:c16ba848f2169107e33e01929592d524707be021fcab8fdca1ddf3804c50fc07 +size 204091 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/roomScreen.Tombstoned-iPhone-pseudo.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/roomScreen.Tombstoned-iPhone-pseudo.png index 10a5e7319..06ae65c81 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/roomScreen.Tombstoned-iPhone-pseudo.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/roomScreen.Tombstoned-iPhone-pseudo.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7c9bfbae223286ba34ba1909bd475c6f317b27eaa973309cbe6c0463c2268170 -size 210859 +oid sha256:6c39806c78e6b5983361f50749c2249df5819e7af20f7cf610fc9b3e391b4ba9 +size 209362 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/roomScreenFooterView.With-displayname-iPad-en-GB.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/roomScreenFooterView.With-displayname-iPad-en-GB.png index 4f732f230..f6a19fd16 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/roomScreenFooterView.With-displayname-iPad-en-GB.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/roomScreenFooterView.With-displayname-iPad-en-GB.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:016ee0b4eb77e60c78efd864d5af4eb6500ef150f7e9c606cc6949368152f92a -size 150213 +oid sha256:a032f4be4d3ce9f22e6f57b330f83834d2414a395e191245e82bd29b6ca6fb09 +size 155249 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/roomScreenFooterView.With-displayname-iPad-pseudo.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/roomScreenFooterView.With-displayname-iPad-pseudo.png index 442567cac..766708cb8 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/roomScreenFooterView.With-displayname-iPad-pseudo.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/roomScreenFooterView.With-displayname-iPad-pseudo.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2fffc4e1ee932de48ae09e14c4c8414da423aae6062779fb8527621b61522eac -size 163050 +oid sha256:603c1b0654b6252adb63cedf8a26c5478c02dc303b0e6eb34abc6005b8f55cab +size 165263 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/roomScreenFooterView.With-displayname-iPhone-en-GB.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/roomScreenFooterView.With-displayname-iPhone-en-GB.png index b85ae715f..3df281df4 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/roomScreenFooterView.With-displayname-iPhone-en-GB.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/roomScreenFooterView.With-displayname-iPhone-en-GB.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:33889654d5af0ae1ec2ef13de6d22fbab185d9d171c247b5582ef87fa1ca9ce3 -size 75897 +oid sha256:85a14f8c2a6958e6ecf5cdb48749c2319be6389316341f9bcac43d528e1528d4 +size 76281 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/roomScreenFooterView.With-displayname-iPhone-pseudo.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/roomScreenFooterView.With-displayname-iPhone-pseudo.png index 488220203..2d29493ec 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/roomScreenFooterView.With-displayname-iPhone-pseudo.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/roomScreenFooterView.With-displayname-iPhone-pseudo.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bc6d2f6d5385bedb3ca3dd6cbe59226309e7619f838cdf0d9832ad6d024bde53 -size 93597 +oid sha256:db21e8a1c8cb22546992365a31f0f3100bb0594a7899c7c53fea98e0543fa064 +size 90980 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/roomScreenFooterView.Without-displayname-iPad-en-GB.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/roomScreenFooterView.Without-displayname-iPad-en-GB.png index c460d4a2f..3ae901cec 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/roomScreenFooterView.Without-displayname-iPad-en-GB.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/roomScreenFooterView.Without-displayname-iPad-en-GB.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:005a8d737c2f53062d372cabfe17d6ceaeb724393a245299d4e11ffc8b445b0f -size 152438 +oid sha256:7e574b67bfed862f5c6c3b5ff8a82d3533b1b60c915ae79096303f85b6c603e9 +size 157392 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/roomScreenFooterView.Without-displayname-iPad-pseudo.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/roomScreenFooterView.Without-displayname-iPad-pseudo.png index 0deb30f97..0eb2bcf8e 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/roomScreenFooterView.Without-displayname-iPad-pseudo.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/roomScreenFooterView.Without-displayname-iPad-pseudo.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:16963a8e198f0e034a77f10ad0a95855e28e61db55046e42ab021c32712f71af -size 166337 +oid sha256:f6213aac793497f7884e85e6e4f71fda331892e1a1a5acb10c43e6ef176acc16 +size 167929 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/roomScreenFooterView.Without-displayname-iPhone-en-GB.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/roomScreenFooterView.Without-displayname-iPhone-en-GB.png index 211042384..8d2f72311 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/roomScreenFooterView.Without-displayname-iPhone-en-GB.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/roomScreenFooterView.Without-displayname-iPhone-en-GB.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8165145f91e72fb6ae88b89c838664afa43266d8bf19741405dd6ddd14d45612 -size 78094 +oid sha256:6a8b52ec487a5a5b747c8e4752b35925b93665075a7e3208105dfe5221b15062 +size 78182 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/roomScreenFooterView.Without-displayname-iPhone-pseudo.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/roomScreenFooterView.Without-displayname-iPhone-pseudo.png index 0edae986c..a5b27873f 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/roomScreenFooterView.Without-displayname-iPhone-pseudo.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/roomScreenFooterView.Without-displayname-iPhone-pseudo.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8b6c5ded9efa5317aba0606b9fe602dcc911fea6ac1a3738129cb2e6db9065fc -size 106764 +oid sha256:933d8b9f6dd16cb8542b771205fca8e180e9f8f332f1c8f6fcbde30f6dd057d0 +size 101973 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/timelineStartRoomTimelineView.with-predecessor-iPad-en-GB.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/timelineStartRoomTimelineView.with-predecessor-iPad-en-GB.png index f82a35001..011661fc4 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/timelineStartRoomTimelineView.with-predecessor-iPad-en-GB.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/timelineStartRoomTimelineView.with-predecessor-iPad-en-GB.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:93129ecceb176d116bc95206f298dc36f6af97c886751770cbd7a1a71e912e6a -size 84365 +oid sha256:2307ccda4662e19fd5f0128aaa7ad039d2007f08be405f0d92a49d0e573e8529 +size 89433 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/timelineStartRoomTimelineView.with-predecessor-iPad-pseudo.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/timelineStartRoomTimelineView.with-predecessor-iPad-pseudo.png index 21fc3df16..d0eea3e9b 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/timelineStartRoomTimelineView.with-predecessor-iPad-pseudo.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/timelineStartRoomTimelineView.with-predecessor-iPad-pseudo.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:677b3d4b3fb842f7978d39c72f5bf238fb1e88f34bf776d07a3bee8a9c58d389 -size 95911 +oid sha256:a8ec121673faaae729c239e17f611c8bb3fb03154ae30efe743c6a1b64ece07e +size 98666 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/timelineStartRoomTimelineView.with-predecessor-iPhone-en-GB.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/timelineStartRoomTimelineView.with-predecessor-iPhone-en-GB.png index cadc3ed89..372214ac1 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/timelineStartRoomTimelineView.with-predecessor-iPhone-en-GB.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/timelineStartRoomTimelineView.with-predecessor-iPhone-en-GB.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f088ca407a5877c0ef393be7af83867afa4ea89ed8cc594dc1c813fed261718d -size 47960 +oid sha256:fe57bdcd32245c522d1140b833d65f1c326da0d1f81942d24b2611abcd73f3c0 +size 46522 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/timelineStartRoomTimelineView.with-predecessor-iPhone-pseudo.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/timelineStartRoomTimelineView.with-predecessor-iPhone-pseudo.png index e1d08e3f3..9cccaef58 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/timelineStartRoomTimelineView.with-predecessor-iPhone-pseudo.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/timelineStartRoomTimelineView.with-predecessor-iPhone-pseudo.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:443e81006c64cf792dd2f639660c586853641104ec7eabac0c60d2a1f1b46b06 -size 69414 +oid sha256:fec96ce4b90efe4050df902d6c74ba5856745cb4575454d63aebd24fa5df0ab0 +size 66954 diff --git a/compound-ios/Inspector/Inspector.xcworkspace/xcshareddata/swiftpm/Package.resolved b/compound-ios/Inspector/Inspector.xcworkspace/xcshareddata/swiftpm/Package.resolved index b26da8f15..9f04444b4 100644 --- a/compound-ios/Inspector/Inspector.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/compound-ios/Inspector/Inspector.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -1,12 +1,13 @@ { + "originHash" : "f1bd760161a06debbba4152a9ad83d70deae74ffe4d91dd85d4d412572c1cde9", "pins" : [ { "identity" : "compound-design-tokens", "kind" : "remoteSourceControl", "location" : "https://github.com/element-hq/compound-design-tokens.git", "state" : { - "revision" : "d55164b64a67277c62ee4e4ccebea535168ea7be", - "version" : "6.9.0" + "revision" : "a3dedba504bd1a3d04ce2a62eef00b9eef799ec4", + "version" : "6.10.1" } }, { @@ -64,5 +65,5 @@ } } ], - "version" : 2 + "version" : 3 } diff --git a/compound-ios/Inspector/Sources/Tokens/GradientsScreen.swift b/compound-ios/Inspector/Sources/Tokens/GradientsScreen.swift index f61c5bba9..3007873cc 100644 --- a/compound-ios/Inspector/Sources/Tokens/GradientsScreen.swift +++ b/compound-ios/Inspector/Sources/Tokens/GradientsScreen.swift @@ -11,7 +11,9 @@ import SwiftUI struct GradientsScreen: View { var body: some View { - ScreenContent(navigationTitle: "Colors") { + ScreenContent(navigationTitle: "Gradients") { + // allValues isn't currently working as gradients use computed properties + // in order for them to work with colour overrides. ForEach(Gradient.compound.allValues, id: \.name) { gradient in GradientItem(gradient: gradient.value, name: gradient.name) } diff --git a/compound-ios/Package.resolved b/compound-ios/Package.resolved index f9cb83ad1..d0fe33b8f 100644 --- a/compound-ios/Package.resolved +++ b/compound-ios/Package.resolved @@ -1,12 +1,13 @@ { + "originHash" : "f1bd760161a06debbba4152a9ad83d70deae74ffe4d91dd85d4d412572c1cde9", "pins" : [ { "identity" : "compound-design-tokens", "kind" : "remoteSourceControl", "location" : "https://github.com/element-hq/compound-design-tokens", "state" : { - "revision" : "d55164b64a67277c62ee4e4ccebea535168ea7be", - "version" : "6.9.0" + "revision" : "a3dedba504bd1a3d04ce2a62eef00b9eef799ec4", + "version" : "6.10.1" } }, { @@ -64,5 +65,5 @@ } } ], - "version" : 2 + "version" : 3 } diff --git a/compound-ios/Package.swift b/compound-ios/Package.swift index 94fdb87d0..64f774e53 100644 --- a/compound-ios/Package.swift +++ b/compound-ios/Package.swift @@ -9,7 +9,7 @@ let package = Package( .library(name: "Compound", targets: ["Compound"]) ], dependencies: [ - .package(url: "https://github.com/element-hq/compound-design-tokens", exact: "6.9.0"), + .package(url: "https://github.com/element-hq/compound-design-tokens", exact: "6.10.1"), // .package(path: "../compound-design-tokens"), .package(url: "https://github.com/siteline/SwiftUI-Introspect", from: "26.0.0"), .package(url: "https://github.com/SFSafeSymbols/SFSafeSymbols", from: "7.0.0"), diff --git a/compound-ios/Sources/Compound/Colors/CompoundGradients.swift b/compound-ios/Sources/Compound/Colors/CompoundGradients.swift index a58534020..3902159c1 100644 --- a/compound-ios/Sources/Compound/Colors/CompoundGradients.swift +++ b/compound-ios/Sources/Compound/Colors/CompoundGradients.swift @@ -36,11 +36,10 @@ public struct CompoundGradients { } public var info: Gradient { - .init(colors: [.compound.gradientInfoStop1, - .compound.gradientInfoStop2, - .compound.gradientInfoStop3, - .compound.gradientInfoStop4, - .compound.gradientInfoStop5, - .compound.gradientInfoStop6]) + .init(colors: [.compound.gradientInfoStop1, .compound.gradientInfoStop2]) + } + + public var critical: Gradient { + .init(colors: [.compound.gradientCriticalStop1, .compound.gradientCriticalStop2]) } }