Skip to content

Commit 0783b9f

Browse files
committed
Add scrollview to experiments description view for larger fonts
1 parent 5952689 commit 0783b9f

File tree

1 file changed

+28
-26
lines changed

1 file changed

+28
-26
lines changed

Loop/Views/SettingsView+algorithmExperimentsSection.swift

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -44,34 +44,36 @@ public struct ExperimentsSettingsView: View {
4444
var automaticDosingStrategy: AutomaticDosingStrategy
4545

4646
public var body: some View {
47-
VStack(alignment: .center, spacing: 12) {
48-
Text(NSLocalizedString("Algorithm Experiments", comment: "Navigation title for algorithms experiments screen"))
49-
.font(.headline)
50-
VStack {
51-
Text("⚠️").font(.largeTitle)
52-
Text("Caution")
47+
ScrollView {
48+
VStack(alignment: .center, spacing: 12) {
49+
Text(NSLocalizedString("Algorithm Experiments", comment: "Navigation title for algorithms experiments screen"))
50+
.font(.headline)
51+
VStack {
52+
Text("⚠️").font(.largeTitle)
53+
Text("Caution")
54+
}
55+
Divider()
56+
VStack(alignment: .leading, spacing: 12) {
57+
Text(NSLocalizedString("Algorithm Experiments are optional modifications to the Loop Algorithm. These modifications are less tested than the standard Loop algorithm, so please use carefully.", comment: "Algorithm Experiments description."))
58+
Text(NSLocalizedString("In future versions of Loop these experiments may change, end up as standard parts of the Loop Algorithm, or be removed from Loop entirely. Please follow along in the Loop Zulip chat to stay informed of possible changes to these features.", comment: "Algorithm Experiments description second paragraph."))
59+
}
60+
.foregroundColor(.secondary)
61+
62+
Divider()
63+
NavigationLink(destination: GlucoseBasedApplicationFactorSelectionView(isGlucoseBasedApplicationFactorEnabled: $isGlucoseBasedApplicationFactorEnabled, automaticDosingStrategy: automaticDosingStrategy)) {
64+
ExperimentRow(
65+
name: NSLocalizedString("Glucose Based Partial Application", comment: "Title of glucose based partial application experiment"),
66+
enabled: isGlucoseBasedApplicationFactorEnabled && automaticDosingStrategy == .automaticBolus)
67+
}
68+
NavigationLink(destination: IntegralRetrospectiveCorrectionSelectionView(isIntegralRetrospectiveCorrectionEnabled: $isIntegralRetrospectiveCorrectionEnabled)) {
69+
ExperimentRow(
70+
name: NSLocalizedString("Integral Retrospective Correction", comment: "Title of integral retrospective correction experiment"),
71+
enabled: isIntegralRetrospectiveCorrectionEnabled)
72+
}
73+
Spacer()
5374
}
54-
Divider()
55-
VStack(alignment: .leading, spacing: 12) {
56-
Text(NSLocalizedString("Algorithm Experiments are optional modifications to the Loop Algorithm. These modifications are less tested than the standard Loop algorithm, so please use carefully.", comment: "Algorithm Experiments description."))
57-
Text(NSLocalizedString("In future versions of Loop these experiments may change, end up as standard parts of the Loop Algorithm, or be removed from Loop entirely. Please follow along in the Loop Zulip chat to stay informed of possible changes to these features.", comment: "Algorithm Experiments description second paragraph."))
58-
}
59-
.foregroundColor(.secondary)
60-
61-
Divider()
62-
NavigationLink(destination: GlucoseBasedApplicationFactorSelectionView(isGlucoseBasedApplicationFactorEnabled: $isGlucoseBasedApplicationFactorEnabled, automaticDosingStrategy: automaticDosingStrategy)) {
63-
ExperimentRow(
64-
name: NSLocalizedString("Glucose Based Partial Application", comment: "Title of glucose based partial application experiment"),
65-
enabled: isGlucoseBasedApplicationFactorEnabled && automaticDosingStrategy == .automaticBolus)
66-
}
67-
NavigationLink(destination: IntegralRetrospectiveCorrectionSelectionView(isIntegralRetrospectiveCorrectionEnabled: $isIntegralRetrospectiveCorrectionEnabled)) {
68-
ExperimentRow(
69-
name: NSLocalizedString("Integral Retrospective Correction", comment: "Title of integral retrospective correction experiment"),
70-
enabled: isIntegralRetrospectiveCorrectionEnabled)
71-
}
72-
Spacer()
75+
.padding()
7376
}
74-
.padding()
7577
.navigationBarTitleDisplayMode(.inline)
7678
}
7779
}

0 commit comments

Comments
 (0)