Skip to content

Commit f0d50ca

Browse files
author
Rick Pasetto
authored
LOOP-1717: Fix settings navigation to not dismiss first (#222)
* Remove SettingsTableViewController * Don't dismiss; Use `show` instead of `present` * Rename some stuff * LOOP-1717: Navigation using sheets Because of the current plugin vending strategy, we have to navigate using sheets. Therefore, this makes the UI more consistent for all buttons, including Therapy Settings * More PR feedback: update service list when service is added/deleted
1 parent c70eac5 commit f0d50ca

File tree

10 files changed

+77
-1356
lines changed

10 files changed

+77
-1356
lines changed

Loop.xcodeproj/project.pbxproj

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,6 @@
163163
43C05CCA21EC382B006FB252 /* NumberEntry.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43C05CC921EC382B006FB252 /* NumberEntry.swift */; };
164164
43C0944A1CACCC73001F6403 /* NotificationManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43C094491CACCC73001F6403 /* NotificationManager.swift */; };
165165
43C2FAE11EB656A500364AFF /* GlucoseEffectVelocity.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43C2FAE01EB656A500364AFF /* GlucoseEffectVelocity.swift */; };
166-
43C3B6EC20B650A80026CAFA /* SettingsImageTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43C3B6EB20B650A80026CAFA /* SettingsImageTableViewCell.swift */; };
167166
43C513191E864C4E001547C7 /* GlucoseRangeSchedule.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43C513181E864C4E001547C7 /* GlucoseRangeSchedule.swift */; };
168167
43C5F257222C7B7200905D10 /* TimeComponents.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43C5F256222C7B7200905D10 /* TimeComponents.swift */; };
169168
43C5F258222C7BD400905D10 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43D9FFA421EA9A0C00AF44BF /* AppDelegate.swift */; };
@@ -229,7 +228,6 @@
229228
43F1C31A1F5DC87700395429 /* ChartPoint.swift in Sources */ = {isa = PBXBuildFile; fileRef = 438991661E91B563000EEF90 /* ChartPoint.swift */; };
230229
43F41C371D3BF32400C11ED6 /* UIAlertController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43F41C361D3BF32400C11ED6 /* UIAlertController.swift */; };
231230
43F5C2C91B929C09003EB13D /* HealthKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 43F5C2C81B929C09003EB13D /* HealthKit.framework */; };
232-
43F5C2DB1B92A5E1003EB13D /* SettingsTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43F5C2DA1B92A5E1003EB13D /* SettingsTableViewController.swift */; };
233231
43F64DD91D9C92C900D24DC6 /* TitleSubtitleTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43F64DD81D9C92C900D24DC6 /* TitleSubtitleTableViewCell.swift */; };
234232
43F78D261C8FC000002152D1 /* DoseMath.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43F78D251C8FC000002152D1 /* DoseMath.swift */; };
235233
43F78D4F1C914197002152D1 /* LoopKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 43F78D4B1C914197002152D1 /* LoopKit.framework */; };
@@ -316,7 +314,6 @@
316314
892A5D59222F0A27008961AB /* Debug.swift in Sources */ = {isa = PBXBuildFile; fileRef = 892A5D58222F0A27008961AB /* Debug.swift */; };
317315
892A5D5B222F0D7C008961AB /* LoopTestingKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 892A5D5A222F0D7C008961AB /* LoopTestingKit.framework */; };
318316
892A5D692230C41D008961AB /* RangeReplaceableCollection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 892A5D682230C41D008961AB /* RangeReplaceableCollection.swift */; };
319-
892ADE0A2446E9C3007CE08C /* ExplicitlyDismissibleModal.swift in Sources */ = {isa = PBXBuildFile; fileRef = 892ADE092446E9C3007CE08C /* ExplicitlyDismissibleModal.swift */; };
320317
892D7C5123B54A15008A9656 /* CarbEntryViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 892D7C5023B54A14008A9656 /* CarbEntryViewController.swift */; };
321318
892FB4CD22040104005293EC /* OverridePresetRow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 892FB4CC22040104005293EC /* OverridePresetRow.swift */; };
322319
892FB4CF220402C0005293EC /* OverrideSelectionController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 892FB4CE220402C0005293EC /* OverrideSelectionController.swift */; };
@@ -823,7 +820,6 @@
823820
43C094491CACCC73001F6403 /* NotificationManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NotificationManager.swift; sourceTree = "<group>"; };
824821
43C246A71D89990F0031F8D1 /* Crypto.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = Crypto.framework; sourceTree = BUILT_PRODUCTS_DIR; };
825822
43C2FAE01EB656A500364AFF /* GlucoseEffectVelocity.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GlucoseEffectVelocity.swift; sourceTree = "<group>"; };
826-
43C3B6EB20B650A80026CAFA /* SettingsImageTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsImageTableViewCell.swift; sourceTree = "<group>"; };
827823
43C3B6F620BBCAA30026CAFA /* PumpManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PumpManager.swift; sourceTree = "<group>"; };
828824
43C513181E864C4E001547C7 /* GlucoseRangeSchedule.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GlucoseRangeSchedule.swift; sourceTree = "<group>"; };
829825
43C5F256222C7B7200905D10 /* TimeComponents.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimeComponents.swift; sourceTree = "<group>"; };
@@ -881,7 +877,6 @@
881877
43F5C2C81B929C09003EB13D /* HealthKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = HealthKit.framework; path = System/Library/Frameworks/HealthKit.framework; sourceTree = SDKROOT; };
882878
43F5C2D41B92A4A6003EB13D /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
883879
43F5C2D61B92A4DC003EB13D /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
884-
43F5C2DA1B92A5E1003EB13D /* SettingsTableViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = SettingsTableViewController.swift; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.swift; };
885880
43F64DD81D9C92C900D24DC6 /* TitleSubtitleTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TitleSubtitleTableViewCell.swift; sourceTree = "<group>"; };
886881
43F78D251C8FC000002152D1 /* DoseMath.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DoseMath.swift; sourceTree = "<group>"; };
887882
43F78D4B1C914197002152D1 /* LoopKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = LoopKit.framework; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -1101,7 +1096,6 @@
11011096
892A5D58222F0A27008961AB /* Debug.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Debug.swift; sourceTree = "<group>"; };
11021097
892A5D5A222F0D7C008961AB /* LoopTestingKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; name = LoopTestingKit.framework; path = Carthage/Build/iOS/LoopTestingKit.framework; sourceTree = SOURCE_ROOT; };
11031098
892A5D682230C41D008961AB /* RangeReplaceableCollection.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RangeReplaceableCollection.swift; sourceTree = "<group>"; };
1104-
892ADE092446E9C3007CE08C /* ExplicitlyDismissibleModal.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExplicitlyDismissibleModal.swift; sourceTree = "<group>"; };
11051099
892D7C5023B54A14008A9656 /* CarbEntryViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CarbEntryViewController.swift; sourceTree = "<group>"; };
11061100
892FB4CC22040104005293EC /* OverridePresetRow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OverridePresetRow.swift; sourceTree = "<group>"; };
11071101
892FB4CE220402C0005293EC /* OverrideSelectionController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OverrideSelectionController.swift; sourceTree = "<group>"; };
@@ -1807,12 +1801,10 @@
18071801
892D7C5023B54A14008A9656 /* CarbEntryViewController.swift */,
18081802
43A51E201EB6DBDD000736CC /* LoopChartsTableViewController.swift */,
18091803
433EA4C31D9F71C800CD78FB /* CommandResponseViewController.swift */,
1810-
892ADE092446E9C3007CE08C /* ExplicitlyDismissibleModal.swift */,
18111804
C178249F1E19CF9800D9D25C /* GlucoseThresholdTableViewController.swift */,
18121805
4302F4E21D4EA54200F0FCAF /* InsulinDeliveryTableViewController.swift */,
18131806
437D9BA21D7BC977007245E8 /* PredictionTableViewController.swift */,
18141807
439A7941211F631C0041B75F /* RootNavigationController.swift */,
1815-
43F5C2DA1B92A5E1003EB13D /* SettingsTableViewController.swift */,
18161808
43E3449E1B9D68E900C85C07 /* StatusTableViewController.swift */,
18171809
89CA2B31226C18B8004D9350 /* TestingScenariosTableViewController.swift */,
18181810
4302F4E01D4E9C8900F0FCAF /* TextFieldTableViewController.swift */,
@@ -1838,7 +1830,6 @@
18381830
438D42FA1D7D11A4003244B0 /* PredictionInputEffectTableViewCell.swift */,
18391831
439706E522D2E84900C81566 /* PredictionSettingTableViewCell.swift */,
18401832
1D49795724E7289700948F05 /* ServicesViewModel.swift */,
1841-
43C3B6EB20B650A80026CAFA /* SettingsImageTableViewCell.swift */,
18421833
1DE09BA824A3E23F009EE9F9 /* SettingsView.swift */,
18431834
1DB1CA4E24A56D7600B3B94C /* SettingsViewModel.swift */,
18441835
43F64DD81D9C92C900D24DC6 /* TitleSubtitleTableViewCell.swift */,
@@ -3131,8 +3122,6 @@
31313122
1DDE273F24AEA4F200796622 /* NotificationsCriticalAlertPermissionsViewModel.swift in Sources */,
31323123
439A7942211F631C0041B75F /* RootNavigationController.swift in Sources */,
31333124
4F11D3C020DCBEEC006E072C /* GlucoseBackfillRequestUserInfo.swift in Sources */,
3134-
892ADE0A2446E9C3007CE08C /* ExplicitlyDismissibleModal.swift in Sources */,
3135-
43F5C2DB1B92A5E1003EB13D /* SettingsTableViewController.swift in Sources */,
31363125
89E267FC2292456700A3F2AF /* FeatureFlags.swift in Sources */,
31373126
43A567691C94880B00334FAC /* LoopDataManager.swift in Sources */,
31383127
1DA649A9244126DA00F61E75 /* InAppModalAlertPresenter.swift in Sources */,
@@ -3213,7 +3202,6 @@
32133202
4328E0331CFC091100E199AA /* WatchContext+LoopKit.swift in Sources */,
32143203
4F526D611DF8D9A900A04910 /* NetBasal.swift in Sources */,
32153204
A92E557E2464DFFD00DB93BB /* DosingDecisionStore.swift in Sources */,
3216-
43C3B6EC20B650A80026CAFA /* SettingsImageTableViewCell.swift in Sources */,
32173205
89ADE13B226BFA0F0067222B /* TestingScenariosManager.swift in Sources */,
32183206
4F7E8ACB20E2ACB500AEA65E /* WatchPredictedGlucose.swift in Sources */,
32193207
436A0DA51D236A2A00104B24 /* LoopError.swift in Sources */,

Loop/Base.lproj/Main.storyboard

Lines changed: 0 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -7,84 +7,6 @@
77
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
88
</dependencies>
99
<scenes>
10-
<!--Settings-->
11-
<scene sceneID="lFu-dL-RU5">
12-
<objects>
13-
<tableViewController id="4cb-Yq-02o" customClass="SettingsTableViewController" customModule="Loop" customModuleProvider="target" sceneMemberID="viewController">
14-
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" separatorStyle="default" rowHeight="44" sectionHeaderHeight="18" sectionFooterHeight="18" id="MhB-bL-wBN">
15-
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
16-
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
17-
<color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
18-
<prototypes>
19-
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" reuseIdentifier="ConfigTableViewCell" textLabel="5TX-kX-nBo" detailTextLabel="m9c-SQ-djE" style="IBUITableViewCellStyleValue1" id="0EG-OG-YuT">
20-
<rect key="frame" x="0.0" y="55.5" width="375" height="44"/>
21-
<autoresizingMask key="autoresizingMask"/>
22-
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="0EG-OG-YuT" id="af2-sZ-CY0">
23-
<rect key="frame" x="0.0" y="0.0" width="348" height="44"/>
24-
<autoresizingMask key="autoresizingMask"/>
25-
<subviews>
26-
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Pump ID" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" id="5TX-kX-nBo">
27-
<rect key="frame" x="16" y="12" width="65" height="20.5"/>
28-
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
29-
<fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
30-
<nil key="textColor"/>
31-
<nil key="highlightedColor"/>
32-
</label>
33-
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Tap to set" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" id="m9c-SQ-djE">
34-
<rect key="frame" x="264.5" y="12" width="75.5" height="20.5"/>
35-
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
36-
<fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
37-
<color key="textColor" systemColor="secondaryLabelColor" red="0.23529411759999999" green="0.23529411759999999" blue="0.26274509800000001" alpha="0.59999999999999998" colorSpace="custom" customColorSpace="sRGB"/>
38-
<nil key="highlightedColor"/>
39-
</label>
40-
</subviews>
41-
</tableViewCellContentView>
42-
<color key="backgroundColor" cocoaTouchSystemColor="tableCellGroupedBackgroundColor"/>
43-
</tableViewCell>
44-
</prototypes>
45-
<connections>
46-
<outlet property="dataSource" destination="4cb-Yq-02o" id="KZ7-dm-dst"/>
47-
<outlet property="delegate" destination="4cb-Yq-02o" id="VIi-cT-TDQ"/>
48-
</connections>
49-
</tableView>
50-
<navigationItem key="navigationItem" title="Settings" id="dmB-PQ-B44">
51-
<barButtonItem key="rightBarButtonItem" style="done" systemItem="done" id="UQ4-6W-0S2">
52-
<connections>
53-
<segue destination="VsH-x7-Sqg" kind="unwind" unwindAction="unwindFromSettings:" id="Uee-6M-6sQ"/>
54-
</connections>
55-
</barButtonItem>
56-
</navigationItem>
57-
<simulatedNavigationBarMetrics key="simulatedTopBarMetrics" prompted="NO"/>
58-
<connections>
59-
<outlet property="devicesSectionTitleView" destination="ywS-mm-GoX" id="7tF-Zf-Op2"/>
60-
</connections>
61-
</tableViewController>
62-
<placeholder placeholderIdentifier="IBFirstResponder" id="ymW-vT-DZk" userLabel="First Responder" sceneMemberID="firstResponder"/>
63-
<exit id="VsH-x7-Sqg" userLabel="Exit" sceneMemberID="exit"/>
64-
<view contentMode="scaleToFill" id="ywS-mm-GoX">
65-
<rect key="frame" x="0.0" y="0.0" width="600" height="44"/>
66-
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
67-
<subviews>
68-
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="DEVICES" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="DyC-Sv-qP8">
69-
<rect key="frame" x="27" y="28" width="55" height="16"/>
70-
<fontDescription key="fontDescription" type="system" pointSize="13"/>
71-
<color key="textColor" systemColor="secondaryLabelColor" red="0.23529411759999999" green="0.23529411759999999" blue="0.26274509800000001" alpha="0.59999999999999998" colorSpace="custom" customColorSpace="sRGB"/>
72-
<nil key="highlightedColor"/>
73-
</label>
74-
<activityIndicatorView opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" hidesWhenStopped="YES" animating="YES" style="gray" translatesAutoresizingMaskIntoConstraints="NO" id="onC-e2-eI7">
75-
<rect key="frame" x="560" y="26" width="20" height="20"/>
76-
</activityIndicatorView>
77-
</subviews>
78-
<constraints>
79-
<constraint firstItem="DyC-Sv-qP8" firstAttribute="leading" secondItem="ywS-mm-GoX" secondAttribute="leadingMargin" constant="7" id="Lrm-2T-snm"/>
80-
<constraint firstItem="onC-e2-eI7" firstAttribute="trailing" secondItem="ywS-mm-GoX" secondAttribute="trailingMargin" id="bKI-Pq-Ocv"/>
81-
<constraint firstItem="onC-e2-eI7" firstAttribute="centerY" secondItem="DyC-Sv-qP8" secondAttribute="centerY" id="qVw-36-UJh"/>
82-
<constraint firstItem="DyC-Sv-qP8" firstAttribute="bottom" secondItem="ywS-mm-GoX" secondAttribute="bottomMargin" id="yah-t1-9b2"/>
83-
</constraints>
84-
</view>
85-
</objects>
86-
<point key="canvasLocation" x="1652" y="1979.4602698650676"/>
87-
</scene>
8810
<!--Predicted Glucose-->
8911
<scene sceneID="iWG-eJ-SCc">
9012
<objects>
@@ -762,9 +684,6 @@
762684
<autoresizingMask key="autoresizingMask"/>
763685
</navigationBar>
764686
<nil name="viewControllers"/>
765-
<connections>
766-
<segue destination="4cb-Yq-02o" kind="relationship" relationship="rootViewController" id="6BC-rd-2iw"/>
767-
</connections>
768687
</navigationController>
769688
<placeholder placeholderIdentifier="IBFirstResponder" id="hu2-qg-8CR" userLabel="First Responder" sceneMemberID="firstResponder"/>
770689
</objects>

Loop/View Controllers/ExplicitlyDismissibleModal.swift

Lines changed: 0 additions & 38 deletions
This file was deleted.

0 commit comments

Comments
 (0)