Quellcode durchsuchen

Add HCP feedback to Onboarding (Part 1/2)
* Adjust setting names for clarity: Autosens Min -> Minimum, Max Delta-BG Threshold BG -> Max Allowed Glucose Rise for SMB
* Add full names before using abbreviated settings
* Add hint about other third-party services and settings import to NS setup step
* Chore: use proper BulletPoint control for listing imported therapy settings
* Adjust settings names + hints in 'normal' app settings as well

Deniz Cengiz vor 1 Jahr
Ursprung
Commit
0b5080351e

+ 36 - 0
Trio/Sources/Localizations/Main/Localizable.xcstrings

@@ -10039,6 +10039,7 @@
       }
     },
     "• Basal Rates" : {
+      "extractionState" : "stale",
       "localizations" : {
         "bg" : {
           "stringUnit" : {
@@ -10340,6 +10341,7 @@
       }
     },
     "• Carb Ratios" : {
+      "extractionState" : "stale",
       "localizations" : {
         "bg" : {
           "stringUnit" : {
@@ -13042,6 +13044,7 @@
       }
     },
     "• Glucose Targets" : {
+      "extractionState" : "stale",
       "localizations" : {
         "bg" : {
           "stringUnit" : {
@@ -13543,6 +13546,7 @@
       }
     },
     "• Insulin Sensitivities" : {
+      "extractionState" : "stale",
       "localizations" : {
         "bg" : {
           "stringUnit" : {
@@ -33759,6 +33763,7 @@
       }
     },
     "Allow SMB when glucose is above the High BG Target value." : {
+      "extractionState" : "stale",
       "localizations" : {
         "bg" : {
           "stringUnit" : {
@@ -42993,6 +42998,9 @@
     "Autosens Max sets the maximum Sensitivity Ratio used by Autosens, Dynamic ISF, and Sigmoid Formula." : {
 
     },
+    "Autosens Maximum" : {
+      "comment" : "Autosens Max"
+    },
     "Autosens Min" : {
       "comment" : "Autosens Min",
       "localizations" : {
@@ -43197,6 +43205,9 @@
     "Autosens Min sets the minimum Sensitivity Ratio used by Autosens, Dynamic ISF, and Sigmoid Formula." : {
 
     },
+    "Autosens Minimum" : {
+      "comment" : "Autosens Min"
+    },
     "Autosens modifies Insulin Sensitivity Factor (ISF), basal rates, and target blood sugar levels. It doesn’t account for carbs but adjusts for insulin effectiveness based on patterns in your glucose data." : {
       "extractionState" : "stale",
       "localizations" : {
@@ -89431,6 +89442,7 @@
     },
     "Enable SMB With High BG" : {
       "comment" : "Enable SMB With High BG",
+      "extractionState" : "stale",
       "localizations" : {
         "bg" : {
           "stringUnit" : {
@@ -90243,6 +90255,9 @@
         }
       }
     },
+    "Enable UAM (Unannounced Meals)" : {
+      "comment" : "Enable UAM"
+    },
     "Enable Unannounced Meals SMB." : {
       "localizations" : {
         "bg" : {
@@ -91464,6 +91479,7 @@
       }
     },
     "Enabling this feature allows Trio to deliver insulin required using Super Micro Boluses (SMB) when glucose reading is above the value set as High BG Target." : {
+      "extractionState" : "stale",
       "localizations" : {
         "bg" : {
           "stringUnit" : {
@@ -134871,6 +134887,7 @@
 
     },
     "Lower target glucose when Autosens Ratio is <1." : {
+      "extractionState" : "stale",
       "localizations" : {
         "bg" : {
           "stringUnit" : {
@@ -134971,6 +134988,7 @@
       }
     },
     "Lower target glucose when Autosens Ratio is >1." : {
+      "extractionState" : "stale",
       "localizations" : {
         "bg" : {
           "stringUnit" : {
@@ -135070,6 +135088,9 @@
         }
       }
     },
+    "Lower target glucose when Autosens Ratio is greater than 1." : {
+
+    },
     "m" : {
       "comment" : "Abbreviation for Minutes\nabbreviation for minutes",
       "localizations" : {
@@ -138029,6 +138050,7 @@
     },
     "Max Delta-BG Threshold SMB" : {
       "comment" : "Max Delta-BG Threshold",
+      "extractionState" : "stale",
       "localizations" : {
         "bg" : {
           "stringUnit" : {
@@ -139859,6 +139881,9 @@
         }
       }
     },
+    "Max. Allowed Glucose Rise for SMB" : {
+      "comment" : "Max. Allowed Glucose Rise for SMB, formerly Max Delta-BG Threshold"
+    },
     "Maximum allowed positive percent change in glucose level to permit SMBs. If the difference in glucose is greater than this, Trio will disable SMBs." : {
       "localizations" : {
         "bg" : {
@@ -158741,6 +158766,9 @@
         }
       }
     },
+    "Other third-party services, like Apple Health or Tidepool, can later be set up in the settings menu." : {
+
+    },
     "Our strong recommendation is to " : {
       "localizations" : {
         "bg" : {
@@ -169091,6 +169119,7 @@
       }
     },
     "Raise target glucose if when Autosens Ratio is >1." : {
+      "extractionState" : "stale",
       "localizations" : {
         "bg" : {
           "stringUnit" : {
@@ -169191,6 +169220,7 @@
       }
     },
     "Raise target glucose when Autosens Ratio is <1." : {
+      "extractionState" : "stale",
       "localizations" : {
         "bg" : {
           "stringUnit" : {
@@ -169290,6 +169320,9 @@
         }
       }
     },
+    "Raise target glucose when Autosens Ratio is less than 1." : {
+
+    },
     "Random variation added to each reading to simulate real-world sensor noise." : {
       "localizations" : {
         "bg" : {
@@ -238800,6 +238833,9 @@
         }
       }
     },
+    "You can use Nightscout to import existing therapy settings, or only set it up now but configure settings from scratch." : {
+
+    },
     "You have certain rights regarding your information, including:" : {
       "localizations" : {
         "bg" : {

+ 17 - 17
Trio/Sources/Modules/Onboarding/View/OnboardingSteps/AlgorithmSettings/AlgorithmSettingsSubstepView.swift

@@ -52,7 +52,7 @@ struct AlgorithmSettingsSubstepView<Substep: AlgorithmSubstepProtocol & RawRepre
                     )
                 case .autosensMax:
                     algorithmSettingsInput(
-                        label: substep.title,
+                        label: step.title,
                         displayPicker: $shouldDisplayPicker,
                         setting: settingsProvider.settings.autosensMax,
                         decimalValue: $state.autosensMax,
@@ -61,7 +61,7 @@ struct AlgorithmSettingsSubstepView<Substep: AlgorithmSubstepProtocol & RawRepre
                     )
                 case .rewindResetsAutosens:
                     algorithmSettingsInput(
-                        label: substep.title,
+                        label: step.title,
                         displayPicker: $shouldDisplayPicker,
                         setting: nil,
                         decimalValue: $decimalPlaceholder,
@@ -71,7 +71,7 @@ struct AlgorithmSettingsSubstepView<Substep: AlgorithmSubstepProtocol & RawRepre
                     )
                 case .enableSMBAlways:
                     algorithmSettingsInput(
-                        label: substep.title,
+                        label: step.title,
                         displayPicker: $shouldDisplayPicker,
                         setting: nil,
                         decimalValue: $decimalPlaceholder,
@@ -80,7 +80,7 @@ struct AlgorithmSettingsSubstepView<Substep: AlgorithmSubstepProtocol & RawRepre
                     )
                 case .enableSMBWithCOB:
                     algorithmSettingsInput(
-                        label: substep.title,
+                        label: step.title,
                         displayPicker: $shouldDisplayPicker,
                         setting: nil,
                         decimalValue: $decimalPlaceholder,
@@ -90,7 +90,7 @@ struct AlgorithmSettingsSubstepView<Substep: AlgorithmSubstepProtocol & RawRepre
                     )
                 case .enableSMBWithTempTarget:
                     algorithmSettingsInput(
-                        label: substep.title,
+                        label: step.title,
                         displayPicker: $shouldDisplayPicker,
                         setting: nil,
                         decimalValue: $decimalPlaceholder,
@@ -100,7 +100,7 @@ struct AlgorithmSettingsSubstepView<Substep: AlgorithmSubstepProtocol & RawRepre
                     )
                 case .enableSMBAfterCarbs:
                     algorithmSettingsInput(
-                        label: substep.title,
+                        label: step.title,
                         displayPicker: $shouldDisplayPicker,
                         setting: nil,
                         decimalValue: $decimalPlaceholder,
@@ -110,7 +110,7 @@ struct AlgorithmSettingsSubstepView<Substep: AlgorithmSubstepProtocol & RawRepre
                     )
                 case .enableSMBWithHighGlucoseTarget:
                     algorithmSettingsInput(
-                        label: substep.title,
+                        label: step.title,
                         displayPicker: $shouldDisplayPicker,
                         setting: nil,
                         decimalValue: $decimalPlaceholder,
@@ -131,7 +131,7 @@ struct AlgorithmSettingsSubstepView<Substep: AlgorithmSubstepProtocol & RawRepre
                     }
                 case .allowSMBWithHighTempTarget:
                     algorithmSettingsInput(
-                        label: substep.title,
+                        label: step.title,
                         displayPicker: $shouldDisplayPicker,
                         setting: nil,
                         decimalValue: $decimalPlaceholder,
@@ -140,7 +140,7 @@ struct AlgorithmSettingsSubstepView<Substep: AlgorithmSubstepProtocol & RawRepre
                     )
                 case .enableUAM:
                     algorithmSettingsInput(
-                        label: substep.title,
+                        label: step.title,
                         displayPicker: $shouldDisplayPicker,
                         setting: nil,
                         decimalValue: $decimalPlaceholder,
@@ -149,7 +149,7 @@ struct AlgorithmSettingsSubstepView<Substep: AlgorithmSubstepProtocol & RawRepre
                     )
                 case .maxSMBMinutes:
                     algorithmSettingsInput(
-                        label: substep.title,
+                        label: step.title,
                         displayPicker: $shouldDisplayPicker,
                         setting: settingsProvider.settings.maxSMBBasalMinutes,
                         decimalValue: $state.maxSMBMinutes,
@@ -158,7 +158,7 @@ struct AlgorithmSettingsSubstepView<Substep: AlgorithmSubstepProtocol & RawRepre
                     )
                 case .maxUAMMinutes:
                     algorithmSettingsInput(
-                        label: substep.title,
+                        label: step.title,
                         displayPicker: $shouldDisplayPicker,
                         setting: settingsProvider.settings.maxUAMSMBBasalMinutes,
                         decimalValue: $state.maxUAMMinutes,
@@ -167,7 +167,7 @@ struct AlgorithmSettingsSubstepView<Substep: AlgorithmSubstepProtocol & RawRepre
                     )
                 case .maxDeltaGlucoseThreshold:
                     algorithmSettingsInput(
-                        label: substep.title,
+                        label: step.title,
                         displayPicker: $shouldDisplayPicker,
                         setting: settingsProvider.settings.maxDeltaBGthreshold,
                         decimalValue: $state.maxDeltaGlucoseThreshold,
@@ -176,7 +176,7 @@ struct AlgorithmSettingsSubstepView<Substep: AlgorithmSubstepProtocol & RawRepre
                     )
                 case .highTempTargetRaisesSensitivity:
                     algorithmSettingsInput(
-                        label: substep.title,
+                        label: step.title,
                         displayPicker: $shouldDisplayPicker,
                         setting: nil,
                         decimalValue: $decimalPlaceholder,
@@ -185,7 +185,7 @@ struct AlgorithmSettingsSubstepView<Substep: AlgorithmSubstepProtocol & RawRepre
                     )
                 case .lowTempTargetLowersSensitivity:
                     algorithmSettingsInput(
-                        label: substep.title,
+                        label: step.title,
                         displayPicker: $shouldDisplayPicker,
                         setting: nil,
                         decimalValue: $decimalPlaceholder,
@@ -194,7 +194,7 @@ struct AlgorithmSettingsSubstepView<Substep: AlgorithmSubstepProtocol & RawRepre
                     )
                 case .sensitivityRaisesTarget:
                     algorithmSettingsInput(
-                        label: substep.title,
+                        label: step.title,
                         displayPicker: $shouldDisplayPicker,
                         setting: nil,
                         decimalValue: $decimalPlaceholder,
@@ -203,7 +203,7 @@ struct AlgorithmSettingsSubstepView<Substep: AlgorithmSubstepProtocol & RawRepre
                     )
                 case .resistanceLowersTarget:
                     algorithmSettingsInput(
-                        label: substep.title,
+                        label: step.title,
                         displayPicker: $shouldDisplayPicker,
                         setting: nil,
                         decimalValue: $decimalPlaceholder,
@@ -212,7 +212,7 @@ struct AlgorithmSettingsSubstepView<Substep: AlgorithmSubstepProtocol & RawRepre
                     )
                 case .halfBasalTarget:
                     algorithmSettingsInput(
-                        label: substep.title,
+                        label: step.title,
                         displayPicker: $shouldDisplayPicker,
                         setting: settingsProvider.settings.halfBasalExerciseTarget,
                         decimalValue: $state.halfBasalTarget,

+ 6 - 4
Trio/Sources/Modules/Onboarding/View/OnboardingSteps/Nightscout/NightscoutImportStepView.swift

@@ -54,10 +54,12 @@ struct NightscoutImportStepView: View {
                         Text("Trio will import the following therapy settings from your Nightscout instance:")
                             .multilineTextAlignment(.leading)
                         VStack(alignment: .leading) {
-                            Text("• Glucose Targets")
-                            Text("• Basal Rates")
-                            Text("• Carb Ratios")
-                            Text("• Insulin Sensitivities")
+                            BulletPoint(String(localized: "Glucose Targets"))
+                            BulletPoint(String(localized: "Basal Rates"))
+                            BulletPoint(String(localized: "Carb Ratios"))
+                            BulletPoint(
+                                String(localized: "Insulin Sensitivities")
+                            )
                         }
                     }
                     .padding(.horizontal)

+ 14 - 0
Trio/Sources/Modules/Onboarding/View/OnboardingSteps/Nightscout/NightscoutSetupStepView.swift

@@ -30,6 +30,20 @@ struct NightscoutSetupStepView: View {
                 }
                 .buttonStyle(.plain)
             }
+
+            Text(
+                "You can use Nightscout to import existing therapy settings, or only set it up now but configure settings from scratch."
+            )
+            .padding(.horizontal)
+            .font(.footnote)
+            .foregroundStyle(Color.secondary)
+            .multilineTextAlignment(.leading)
+
+            Text("Other third-party services, like Apple Health or Tidepool, can later be set up in the settings menu.")
+                .padding(.horizontal)
+                .font(.footnote)
+                .foregroundStyle(Color.secondary)
+                .multilineTextAlignment(.leading)
         }
     }
 }

+ 13 - 10
Trio/Sources/Modules/Onboarding/View/OnboardingView+AlgorithmUtil.swift

@@ -99,8 +99,8 @@ enum AlgorithmSettingsSubstep: Int, CaseIterable, Identifiable {
 
     var title: String {
         switch self {
-        case .autosensMin: return String(localized: "Autosens Min", comment: "Autosens Min")
-        case .autosensMax: return String(localized: "Autosens Max", comment: "Autosens Max")
+        case .autosensMin: return String(localized: "Autosens Minimum", comment: "Autosens Min")
+        case .autosensMax: return String(localized: "Autosens Maximum", comment: "Autosens Max")
         case .rewindResetsAutosens: return String(localized: "Rewind Resets Autosens", comment: "Rewind Resets Autosens")
         case .enableSMBAlways: return String(localized: "Enable SMB Always", comment: "Enable SMB Always")
         case .enableSMBWithCOB: return String(localized: "Enable SMB With COB", comment: "Enable SMB With COB")
@@ -110,17 +110,20 @@ enum AlgorithmSettingsSubstep: Int, CaseIterable, Identifiable {
             )
         case .enableSMBAfterCarbs: return String(localized: "Enable SMB After Carbs", comment: "Enable SMB After Carbs")
         case .enableSMBWithHighGlucoseTarget: return String(
-                localized: "Enable SMB With High BG",
-                comment: "Enable SMB With High BG"
+                localized: "Enable SMB With High Glucose",
+                comment: "Enable SMB With High Glucose"
             )
         case .allowSMBWithHighTempTarget: return String(
                 localized: "Allow SMB With High Temptarget",
                 comment: "Allow SMB With High Temptarget"
             )
-        case .enableUAM: return String(localized: "Enable UAM", comment: "Enable UAM")
+        case .enableUAM: return String(localized: "Enable UAM (Unannounced Meals)", comment: "Enable UAM")
         case .maxSMBMinutes: return String(localized: "Max SMB Basal Minutes", comment: "Max SMB Basal Minutes")
         case .maxUAMMinutes: return String(localized: "Max UAM Basal Minutes", comment: "Max UAM Basal Minutes")
-        case .maxDeltaGlucoseThreshold: return String(localized: "Max Delta-BG Threshold SMB", comment: "Max Delta-BG Threshold")
+        case .maxDeltaGlucoseThreshold: return String(
+                localized: "Max. Allowed Glucose Rise for SMB",
+                comment: "Max. Allowed Glucose Rise for SMB, formerly Max Delta-BG Threshold"
+            )
         case .highTempTargetRaisesSensitivity: return String(
                 localized: "High Temp Target Raises Sensitivity",
                 comment: "High Temp Target Raises Sensitivity"
@@ -147,7 +150,7 @@ enum AlgorithmSettingsSubstep: Int, CaseIterable, Identifiable {
                 localized: "Allow SMB when a manual Temporary Target is set under \(units == .mgdL ? "100" : 100.formattedAsMmolL) \(units.rawValue)."
             )
         case .enableSMBAfterCarbs: return String(localized: "Allow SMB for 6 hrs after a carb entry.")
-        case .enableSMBWithHighGlucoseTarget: return String(localized: "Allow SMB when glucose is above the High BG Target value.")
+        case .enableSMBWithHighGlucoseTarget: return String(localized: "Allow SMB when glucose is above the High Glucose Target value.")
         case .allowSMBWithHighTempTarget: return String(
                 localized: "Allow SMB when a manual Temporary Target is set greater than \(units == .mgdL ? "100" : 100.formattedAsMmolL) \(units.rawValue)."
             )
@@ -161,8 +164,8 @@ enum AlgorithmSettingsSubstep: Int, CaseIterable, Identifiable {
         case .lowTempTargetLowersSensitivity: return String(
                 localized: "Decrease sensitivity when glucose is below target if a manual Temp Target < \(units == .mgdL ? "100" : 100.formattedAsMmolL) \(units.rawValue) is set."
             )
-        case .sensitivityRaisesTarget: return String(localized: "Raise target glucose if when Autosens Ratio is >1.")
-        case .resistanceLowersTarget: return String(localized: "Lower target glucose when Autosens Ratio is <1.")
+        case .sensitivityRaisesTarget: return String(localized: "Raise target glucose when Autosens Ratio is less than 1.")
+        case .resistanceLowersTarget: return String(localized: "Lower target glucose when Autosens Ratio is greater than 1.")
         case .halfBasalTarget: return String(localized: "Scales down your basal rate to 50% at this value.")
         }
     }
@@ -261,7 +264,7 @@ enum AlgorithmSettingsSubstep: Int, CaseIterable, Identifiable {
             return VStack(alignment: .leading, spacing: 8) {
                 Text("Default: OFF").bold().foregroundStyle(Color.primary)
                 Text(
-                    "Enabling this feature allows Trio to deliver insulin required using Super Micro Boluses (SMB) when glucose reading is above the value set as High BG Target."
+                    "Enabling this feature allows Trio to deliver insulin required using Super Micro Boluses (SMB) when glucose reading is above the value set as High Glucose Target."
                 )
                 Text(
                     "Note: If this is enabled and the criteria are met, SMBs could be utilized regardless of other SMB settings being enabled or not."

+ 8 - 2
Trio/Sources/Modules/SMBSettings/View/SMBSettingsRootView.swift

@@ -330,12 +330,18 @@ extension SMBSettings {
                         get: { selectedVerboseHint },
                         set: {
                             selectedVerboseHint = $0.map { AnyView($0) }
-                            hintLabel = String(localized: "Max Delta-BG Threshold SMB", comment: "Max Delta-BG Threshold")
+                            hintLabel = String(
+                                localized: "Max. Allowed Glucose Rise for SMB",
+                                comment: "Max. Allowed Glucose Rise for SMB, formerly Max Delta-BG Threshold"
+                            )
                         }
                     ),
                     units: state.units,
                     type: .decimal("maxDeltaBGthreshold"),
-                    label: String(localized: "Max Delta-BG Threshold SMB", comment: "Max Delta-BG Threshold"),
+                    label: String(
+                        localized: "Max. Allowed Glucose Rise for SMB",
+                        comment: "Max. Allowed Glucose Rise for SMB, formerly Max Delta-BG Threshold"
+                    ),
                     miniHint: String(localized: "Disables SMBs if last two glucose values differ by more than this percent."),
                     verboseHint:
                     VStack(alignment: .leading, spacing: 10) {

+ 2 - 2
Trio/Sources/Modules/TargetBehavoir/View/TargetBehavoirRootView.swift

@@ -110,7 +110,7 @@ extension TargetBehavoir {
                     units: state.units,
                     type: .boolean,
                     label: String(localized: "Sensitivity Raises Target", comment: "Sensitivity Raises Target"),
-                    miniHint: String(localized: "Raise target glucose when Autosens Ratio is <1."),
+                    miniHint: String(localized: "Raise target glucose when Autosens Ratio is less than 1."),
                     verboseHint: VStack(alignment: .leading, spacing: 10) {
                         Text("Default: OFF").bold()
                         Text(
@@ -133,7 +133,7 @@ extension TargetBehavoir {
                     units: state.units,
                     type: .boolean,
                     label: String(localized: "Resistance Lowers Target", comment: "Resistance Lowers Target"),
-                    miniHint: String(localized: "Lower target glucose when Autosens Ratio is >1."),
+                    miniHint: String(localized: "Lower target glucose when Autosens Ratio is greater than 1."),
                     verboseHint: VStack(alignment: .leading, spacing: 10) {
                         Text("Default: OFF").bold()
                         Text(