Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
6bf94eb
Remove Main.storyboard and migrate to SwiftUI app lifecycle
bjorkert Apr 18, 2026
05992d9
Migrate info table from UITableView to SwiftUI List
bjorkert Apr 18, 2026
94e23c0
Migrate statistics and pie chart from UIKit to SwiftUI
bjorkert Apr 18, 2026
69566eb
Migrate BG display area from UIKit labels to SwiftUI
bjorkert Apr 18, 2026
63e8307
Migrate main layout to SwiftUI with UIKit charts embedded
bjorkert Apr 18, 2026
7ed09ca
Clean up migration artifacts and fix post-migration bugs
bjorkert Apr 18, 2026
d5ed19c
Replace view hierarchy walking with MainViewController.shared
bjorkert Apr 18, 2026
561375b
Fix MainViewController.shared references for stats and treatments
bjorkert Apr 19, 2026
69434c9
Fix info table font size to match storyboard
bjorkert Apr 19, 2026
122c49e
Fix Share Logs sheet rendering blank
bjorkert Apr 21, 2026
f54847b
Merge remote-tracking branch 'origin/dev' into remove-storyboard
bjorkert Apr 26, 2026
db546b8
Fix back navigation from Settings sub-pages
bjorkert Apr 28, 2026
1a6f75f
Harden post-storyboard migration
bjorkert Apr 29, 2026
b26943b
MoreMenuView: render tab-switch buttons in primary color
bjorkert Apr 29, 2026
10b1d19
Merge remote-tracking branch 'origin/dev' into remove-storyboard
bjorkert Apr 29, 2026
30339e4
Revert MainViewController singleton bootstrap
bjorkert Apr 29, 2026
89d53d7
MoreMenuView: make tab-switch rows full-row tappable
bjorkert May 3, 2026
908b5bb
Merge remote-tracking branch 'origin/dev' into remove-storyboard
bjorkert May 3, 2026
10c31c3
Align units-selection conflict resolution with integration branch
bjorkert May 3, 2026
2ea11e0
MoreMenuView: fix cross-row tap routing in Features section
bjorkert May 3, 2026
2c35ee3
MoreMenuView: keep Settings as a value-based NavigationLink
bjorkert May 3, 2026
d25c182
Fix navigation between alarms and menu
bjorkert May 4, 2026
892a60f
Drive Before-First-Unlock recovery from AppDelegate
bjorkert May 4, 2026
ad84c7b
Keep MainViewController alive regardless of tab layout
bjorkert Jun 1, 2026
52b0ccb
Merge remote-tracking branch 'origin/dev' into remove-storyboard
bjorkert Jun 1, 2026
6f8bde7
Scale info data table text with Dynamic Type
bjorkert Jun 3, 2026
b1bd86c
Merge remote-tracking branch 'origin/dev' into info-table-dynamic-type
bjorkert Jun 13, 2026
09eade5
Use two rows if needed
bjorkert Jun 14, 2026
1dfbde7
Info table adjustments
bjorkert Jun 15, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ extension MainViewController {
Storage.shared.lastMinBgMgdl.value = minPredBG
Storage.shared.lastMaxBgMgdl.value = maxPredBG
} else {
infoManager.updateInfoData(type: .minMax, value: "N/A")
infoManager.clearInfoData(type: .minMax)
}

updateOpenAPSPredictionDisplay()
Expand Down
36 changes: 28 additions & 8 deletions LoopFollow/InfoTable/InfoTableView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ struct InfoTableView: View {
@ObservedObject var infoManager: InfoManager
var timeZoneOverride: String?

@ScaledMetric(relativeTo: .body) private var fontSize: CGFloat = 17
@ScaledMetric(relativeTo: .body) private var rowHeight: CGFloat = 21

var body: some View {
List {
if let tz = timeZoneOverride {
Expand All @@ -17,18 +20,35 @@ struct InfoTableView: View {
}
}
.listStyle(.plain)
.environment(\.defaultMinListRowHeight, 21)
.environment(\.defaultMinListRowHeight, rowHeight)
}

private func row(name: String, value: String) -> some View {
HStack {
Text(name)
Spacer()
Text(value)
.foregroundStyle(.primary)
// Show a placeholder for any field that has no value yet,
// so the row reads as "no data" rather than appearing empty.
let displayValue = value.isEmpty ? "—" : value

return ViewThatFits(in: .horizontal) {
// Preferred: compact single line (label — value)
HStack {
Text(name)
Spacer()
Text(displayValue)
.foregroundStyle(.primary)
}

// Fallback when the single line won't fit: label over value
VStack(alignment: .leading, spacing: 0) {
Text(name)
Text(displayValue)
.foregroundStyle(.primary)
.frame(maxWidth: .infinity, alignment: .trailing)
}
}
.font(.system(size: 17))
.frame(height: 21)
.font(.system(size: fontSize))
.lineLimit(1)
.minimumScaleFactor(0.5)
.frame(minHeight: rowHeight)
.listRowInsets(EdgeInsets(top: 0, leading: 8, bottom: 0, trailing: 8))
}
}
1 change: 1 addition & 0 deletions LoopFollow/ViewControllers/MainHomeView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ struct MainHomeView: View {

if isNightscoutEnabled && !hideInfoTable.value {
InfoTableView(infoManager: infoManager, timeZoneOverride: timeZoneOverride)
.dynamicTypeSize(...DynamicTypeSize.accessibility1)
.frame(minWidth: 160, maxWidth: 250)
.overlay(
Rectangle()
Expand Down
Loading