Skip to content

Commit 35466c0

Browse files
authored
Merge branch 'develop' into feat/extract-passwordfieldview-to-reusable-components
2 parents 98696d8 + d2f7431 commit 35466c0

File tree

6 files changed

+120
-3
lines changed

6 files changed

+120
-3
lines changed

.github/workflows/test_develop.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
trigger_tests:
1515
strategy:
1616
matrix:
17-
branch: [develop, release/cycle-3.115] # List other branches here
17+
branch: [develop, release/cycle-3.116] # List other branches here
1818
fail-fast: false # avoid to fail one job
1919
uses: ./.github/workflows/_reusable_run_tests.yml
2020
with:

WireUI/Package.swift

+13-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ let package = Package(
2121
.library(name: "WireMoveToFolderUISupport", targets: ["WireMoveToFolderUISupport"]),
2222
.library(name: "WireReusableUIComponents", targets: ["WireReusableUIComponents"]),
2323
.library(name: "WireSettingsUI", targets: ["WireSettingsUI"]),
24-
.library(name: "WireSidebarUI", targets: ["WireSidebarUI"])
24+
.library(name: "WireSidebarUI", targets: ["WireSidebarUI"]),
25+
.library(name: "WireViewsDebugUI", targets: ["WireViewsDebugUI"])
2526
],
2627
dependencies: [
2728
.package(url: "https://github.com/swiftlang/swift-docc-plugin", from: "1.1.0"),
@@ -93,7 +94,17 @@ let package = Package(
9394
dependencies: ["WireFoundation"],
9495
plugins: [.plugin(name: "SwiftGenPlugin", package: "WirePlugins")]
9596
),
96-
.testTarget(name: "WireSidebarUITests", dependencies: ["WireSidebarUI"])
97+
.testTarget(name: "WireSidebarUITests", dependencies: ["WireSidebarUI"]),
98+
99+
.target(
100+
name: "WireViewsDebugUI",
101+
dependencies: [
102+
"WireAuthenticationUI",
103+
.product(name: "WireDomainPackage", package: "WireDomainPackage"),
104+
"WireFoundation",
105+
"WireReusableUIComponents"
106+
]
107+
)
97108
]
98109
)
99110

WireUI/Sources/WireAuthenticationUI/Views/BackgroundView.swift

+2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
import SwiftUI
2020

2121
package struct BackgroundView: View {
22+
package init() {}
23+
2224
package var body: some View {
2325
Image(ImageResource(name: "background", bundle: .module))
2426
.resizable()
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
//
2+
// Wire
3+
// Copyright (C) 2025 Wire Swiss GmbH
4+
//
5+
// This program is free software: you can redistribute it and/or modify
6+
// it under the terms of the GNU General Public License as published by
7+
// the Free Software Foundation, either version 3 of the License, or
8+
// (at your option) any later version.
9+
//
10+
// This program is distributed in the hope that it will be useful,
11+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
// GNU General Public License for more details.
14+
//
15+
// You should have received a copy of the GNU General Public License
16+
// along with this program. If not, see http://www.gnu.org/licenses/.
17+
//
18+
19+
import SwiftUI
20+
import WireAuthenticationUI
21+
22+
public struct WireAuthenticationUIDebugView: View {
23+
24+
enum PresentationItem: String, Identifiable {
25+
var id: String { rawValue }
26+
27+
case background
28+
}
29+
30+
@State private var presentedItem: PresentationItem?
31+
32+
public init() {}
33+
34+
public var body: some View {
35+
List {
36+
Button(
37+
action: { presentedItem = .background },
38+
label: { Text("Background") }
39+
)
40+
}
41+
.fullScreenCover(item: $presentedItem, content: { item in
42+
switch item {
43+
case .background:
44+
fullscreenCover(content: { BackgroundView() })
45+
}
46+
})
47+
}
48+
49+
@ViewBuilder
50+
private func fullscreenCover(content: () -> some View) -> some View {
51+
content()
52+
.overlay {
53+
HStack {
54+
Spacer()
55+
VStack {
56+
Button(
57+
action: { presentedItem = nil },
58+
label: {
59+
Image(systemName: "xmark.circle.fill")
60+
.foregroundStyle(.white)
61+
.font(.largeTitle)
62+
}
63+
)
64+
.frame(width: 50, height: 50)
65+
Spacer()
66+
}
67+
}
68+
.padding(.top, 40)
69+
.padding(.trailing, 20)
70+
}
71+
}
72+
}
73+
74+
#Preview {
75+
NavigationView {
76+
WireAuthenticationUIDebugView()
77+
}
78+
}

wire-ios/Wire-iOS.xcodeproj/project.pbxproj

+7
Original file line numberDiff line numberDiff line change
@@ -685,6 +685,7 @@
685685
669105C327397E6A00324115 /* NSAttributedString+DownTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 669105C227397E6900324115 /* NSAttributedString+DownTests.swift */; };
686686
70355A7127AAD96E00F02C76 /* SecurityLevelView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 70355A7027AAD96E00F02C76 /* SecurityLevelView.swift */; };
687687
764C478D2D1B32C100227531 /* MockSelfProfileViewsMonitorImplementation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 764C478C2D1B32BE00227531 /* MockSelfProfileViewsMonitorImplementation.swift */; };
688+
76ACF8A22D4215E2001F48A1 /* WireViewsDebugUI in Frameworks */ = {isa = PBXBuildFile; productRef = 76ACF8A12D4215E2001F48A1 /* WireViewsDebugUI */; };
688689
76D15E712CEFAE8A0059215D /* WireIndividualToTeamMigrationUI in Frameworks */ = {isa = PBXBuildFile; productRef = 76D15E702CEFAE8A0059215D /* WireIndividualToTeamMigrationUI */; };
689690
7A702FB7286322D800004580 /* ConversationEncryptionProtocolCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A702FB6286322D800004580 /* ConversationEncryptionProtocolCell.swift */; };
690691
7C0BB6E61FE682A200386A19 /* AccountSelectionViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C0BB6E41FE680F200386A19 /* AccountSelectionViewController.swift */; };
@@ -3883,6 +3884,7 @@
38833884
EEE25B3B29719C370008B894 /* WireLinkPreview.framework in Frameworks */,
38843885
407831AD2AC4636F005C2978 /* DifferenceKit in Frameworks */,
38853886
EEE25B4429719C950008B894 /* WireSystem.framework in Frameworks */,
3887+
76ACF8A22D4215E2001F48A1 /* WireViewsDebugUI in Frameworks */,
38863888
591B6E172C8B095B009F8A7B /* WireNotificationEngine.framework in Frameworks */,
38873889
59537D952CFFA11A00920B59 /* WireLogging in Frameworks */,
38883890
E9FBF3A62C47C23100C65DA8 /* FLAnimatedImage in Frameworks */,
@@ -8445,6 +8447,7 @@
84458447
76D15E702CEFAE8A0059215D /* WireIndividualToTeamMigrationUI */,
84468448
594906A42D0713C000238104 /* WireAnalytics */,
84478449
594341D62D08611700A6C0B5 /* WireCountly */,
8450+
76ACF8A12D4215E2001F48A1 /* WireViewsDebugUI */,
84488451
);
84498452
productName = "ZClient iOS";
84508453
productReference = 8F42C538199244A700288E4D /* Wire.app */;
@@ -11528,6 +11531,10 @@
1152811531
isa = XCSwiftPackageProductDependency;
1152911532
productName = WireMainNavigationUI;
1153011533
};
11534+
76ACF8A12D4215E2001F48A1 /* WireViewsDebugUI */ = {
11535+
isa = XCSwiftPackageProductDependency;
11536+
productName = WireViewsDebugUI;
11537+
};
1153111538
76D15E702CEFAE8A0059215D /* WireIndividualToTeamMigrationUI */ = {
1153211539
isa = XCSwiftPackageProductDependency;
1153311540
productName = WireIndividualToTeamMigrationUI;

wire-ios/Wire-iOS/Sources/Developer/DeveloperTools/DeveloperToolsViewModel.swift

+19
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import WireDataModel
2222
import WireRequestStrategy
2323
import WireSyncEngine
2424
import WireTransport
25+
import WireViewsDebugUI
2526

2627
final class DeveloperToolsViewModel: ObservableObject {
2728

@@ -138,6 +139,8 @@ final class DeveloperToolsViewModel: ObservableObject {
138139
setupPushToken()
139140

140141
setupDatadog()
142+
143+
sections.append(debugViewSection)
141144
}
142145

143146
// MARK: - Section Builders
@@ -289,6 +292,22 @@ final class DeveloperToolsViewModel: ObservableObject {
289292
return sessionManager.canSwitchBackend() == nil
290293
}
291294

295+
private lazy var debugViewSection: Section = {
296+
let header = "Views"
297+
298+
let items: [Item] = [
299+
.destination(DestinationItem(
300+
title: "Authentication",
301+
makeView: { AnyView(WireAuthenticationUIDebugView()) }
302+
))
303+
]
304+
305+
return Section(
306+
header: header,
307+
items: items
308+
)
309+
}()
310+
292311
// MARK: - Events
293312

294313
func handleEvent(_ event: Event) {

0 commit comments

Comments
 (0)