Skip to content

Commit a5cfd86

Browse files
authored
Merge pull request #184 from IBM/development
Version 3.0.2 Build 107 to Prod
2 parents 33a46a2 + 7193af7 commit a5cfd86

File tree

13 files changed

+1067
-97
lines changed

13 files changed

+1067
-97
lines changed

.sonarcloud.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Python version (for python projects only)
22
sonar.python.version=3
33
# Project Version to be used as Code Definition
4-
sonar.projectVersion=3.0.0.104
4+
sonar.projectVersion=3.0.2.107
55
# Folders excluded from the scan
66
sonar.exclusions=**/Notification Agent Core Tests/**,**/Notification Agent Alert Tests/**,**/Notification Agent Banner Tests/**,**/Notification Agent Popup Tests/**,**/Notification Agent Onboarding Tests/**,**/Notification Agent Popup UI Tests/**,**/Notification Agent Onboarding UI Tests/**,**/Notification Agent Core/Controllers/HelpBuilder.swift**

ATTRIBUTIONS.md

Lines changed: 431 additions & 0 deletions
Large diffs are not rendered by default.

Notification Agent Core/Resources/ATTRIBUTIONS.md

Lines changed: 431 additions & 0 deletions
Large diffs are not rendered by default.

Notification Agent Onboarding/Views/OnboardingView.swift

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,7 @@ struct OnboardingView: View {
2727
currentPage
2828
.accessibilityElement(children: .contain)
2929
Spacer()
30-
Rectangle()
31-
.frame(height: 0.5)
32-
.foregroundColor(Color(.darkGray))
30+
Divider()
3331
HStack {
3432
HStack {
3533
if let infoSection = viewModel.currentPage.infoSection {
@@ -87,6 +85,7 @@ struct OnboardingView: View {
8785
}
8886
.padding()
8987
}
88+
.frame(maxWidth: 832, maxHeight: 600)
9089
}
9190

9291
var currentPage: some View {
@@ -95,7 +94,7 @@ struct OnboardingView: View {
9594
outp: $viewModel.pageOutputs,
9695
primaryButtonState: $viewModel.primaryButtonState,
9796
secondaryButtonState: $viewModel.secondaryButtonState))
98-
.padding()
97+
.padding([.trailing, .leading, .top], 8)
9998
}
10099
}
101100

Notification Agent Onboarding/Views/OnboardingViewModel.swift

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class OnboardingViewModel: NSObject, ObservableObject {
5151
if let page = onboardingData.pages[safe: currentIndex] {
5252
primaryButtonState = .enabled
5353
secondaryButtonState = .enabled
54-
primaryButtonLabel = page.primaryButtonLabel ?? (isLastPage ? "onboarding_page_close_button".localized : "onboarding_page_continue_button".localized)
54+
primaryButtonLabel = page.primaryButtonLabel ?? (isLastPage ? "onboarding_page_close_button".localized : "onboarding_page_continue_button".localized)
5555
secondaryButtonLabel = page.secondaryButtonLabel ?? "onboarding_page_back_button".localized
5656
currentPage = page
5757
guard currentIndex < outputsStore.count && currentIndex < inputsStore.count else { return }
@@ -86,7 +86,7 @@ class OnboardingViewModel: NSObject, ObservableObject {
8686
self.currentPage = firstPage
8787
self.isLastPage = onboardingData.pages.count == 1
8888
self.hideBackButton = true
89-
self.primaryButtonLabel = firstPage.primaryButtonLabel ?? "onboarding_page_continue_button".localized
89+
self.primaryButtonLabel = firstPage.primaryButtonLabel ?? (onboardingData.pages.count == 1 ? "onboarding_page_close_button".localized : "onboarding_page_continue_button".localized)
9090
self.secondaryButtonLabel = firstPage.secondaryButtonLabel ?? "onboarding_page_back_button".localized
9191
let tempMatrixArray: [[[String]]] = onboardingData.pages.map { page in
9292
guard page.isValidPage() else {
@@ -111,7 +111,7 @@ class OnboardingViewModel: NSObject, ObservableObject {
111111
self.setTimeout(timeout)
112112
}
113113
NotificationCenter.default.addObserver(self, selector: #selector(repositionWindow), name: NSApplication.didChangeScreenParametersNotification, object: nil)
114-
if let progressBarPayload = onboardingData.progressBarPayload {
114+
if let progressBarPayload = onboardingData.progressBarPayload, onboardingData.pages.count > 1 {
115115
var payload: String = "/percent 0 /user_interaction_enabled true"
116116
if progressBarPayload.lowercased() == "automatic" {
117117
automaticProgressBar = true
@@ -141,12 +141,14 @@ class OnboardingViewModel: NSObject, ObservableObject {
141141
resetTimers()
142142
switch type {
143143
case .main:
144-
writeStoreOnDevice()
145144
if currentIndex >= (onboardingData.pages.count - 1) {
145+
outputsStore[currentIndex] = self.pageOutputs
146+
writeStoreOnDevice()
146147
Utils.applicationExit(withReason: .userFinishedOnboarding)
147148
} else {
148149
currentIndex += 1
149150
}
151+
writeStoreOnDevice()
150152
updateProgressBarIfNeeded()
151153
case .secondary:
152154
guard currentIndex > 0 else { return }

Notification Agent Onboarding/Views/PageView.swift

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ struct PageView: View {
5353
Text(title)
5454
.font(.bold(.title)())
5555
.multilineTextAlignment(.center)
56-
.padding(.top, 6)
56+
.padding(.top, 12)
5757
.padding(.bottom, 4)
5858
.accessibilityAddTraits(.isHeader)
5959
.accessibilityIdentifier("onboarding_title")
@@ -62,7 +62,6 @@ struct PageView: View {
6262
if let subtitle = viewModel.page.subtitle {
6363
Text(AttributedString(markdownText(subtitle).attributedString()))
6464
.multilineTextAlignment(.center)
65-
.font(.title3)
6665
.accessibilityAddTraits(.isHeader)
6766
.accessibilityIdentifier("onboarding_subtitle")
6867
}
@@ -76,7 +75,7 @@ struct PageView: View {
7675
if let subtitle = viewModel.page.subtitle {
7776
Text(subtitle)
7877
.multilineTextAlignment(.center)
79-
.font(.title3)
78+
.font(.title2)
8079
.accessibilityAddTraits(.isHeader)
8180
.accessibilityIdentifier("onboarding_subtitle")
8281
}
@@ -90,9 +89,9 @@ struct PageView: View {
9089
}
9190

9291
if !viewModel.accessoryViewsMatrix.isEmpty {
93-
VStack {
92+
VStack(alignment: .center) {
9493
ForEach(viewModel.accessoryViewsMatrix, id: \.hashValue) { row in
95-
HStack {
94+
HStack(alignment: .top) {
9695
ForEach(row, id: \.hashValue) { accessoryView in
9796
accessoryView
9897
}

0 commit comments

Comments
 (0)