krz/moonrise

Night-sky companion for iPhone, Apple Watch and Vision Pro: what's up tonight, the Moon, planets, launches and missions, and a Library of the solar system. SwiftUI app with a Cloudflare Workers backend. astronomy cloudflare-workers ios night-sky space swiftui visionos watchos

Commit e4ed078778

e4ed078778c04d599329c320a8c27a95caf5a9a2

parent: 2797e2b68d

Unsigned

cmc <hello@cleberg.net> · 2026-10-21 23:35 UTC

Small text: eclipse chart labels scale; widget labels 11 pt (!97)

- EclipseScreen sun-path chart: 9–10 pt labels → `.caption2`, Dynamic Type capped at xxLarge (chart is 180 pt tall).
- Pass, Launch and Eclipse Live Activities, Planets widget: 10 pt → 11 pt; opacity 0.5–0.6 → 0.7 on the faintest labels.
- iOS and Watch builds pass. Not checked visually on the Lock Screen (Settings → Sample Live Activities in a Debug build).

Layout: unified · split

App/Sources/EclipseScreen.swift +4 −3
@@ -296,6 +296,7 @@ struct SunDiagram: View {
296 VStack(alignment: .leading, spacing: 8) { 296 VStack(alignment: .leading, spacing: 8) {
297 Canvas { context, size in draw(path, context: &context, size: size) } 297 Canvas { context, size in draw(path, context: &context, size: size) }
298 .frame(height: 180) 298 .frame(height: 180)
299 .dynamicTypeSize(...DynamicTypeSize.xxLarge)
299 .accessibilityHidden(true) 300 .accessibilityHidden(true)
300 Text("At \(timeline.eclipse.kind == "Total" ? "totality" : "maximum") the Sun is \(Int(key.sun.altitude.rounded()))° up, about \(Int((key.sun.altitude / 10).rounded())) fists above the horizon at arm's length, bearing \(Int(key.sun.azimuth.rounded()))° \(compass(key.sun.azimuth)). Check that no trees or buildings will be in the way.") 301 Text("At \(timeline.eclipse.kind == "Total" ? "totality" : "maximum") the Sun is \(Int(key.sun.altitude.rounded()))° up, about \(Int((key.sun.altitude / 10).rounded())) fists above the horizon at arm's length, bearing \(Int(key.sun.azimuth.rounded()))° \(compass(key.sun.azimuth)). Check that no trees or buildings will be in the way.")
301 .font(.footnote).dimmed(0.8) 302 .font(.footnote).dimmed(0.8)
@@ -320,13 +321,13 @@ struct SunDiagram: View {
320 } 321 }
321 context.stroke(grid, with: .color(ink.opacity(0.12)), style: StrokeStyle(lineWidth: 0.5, dash: [2, 3])) 322 context.stroke(grid, with: .color(ink.opacity(0.12)), style: StrokeStyle(lineWidth: 0.5, dash: [2, 3]))
322 for alt in stride(from: 20.0, through: top, by: 20) { 323 for alt in stride(from: 20.0, through: top, by: 20) {
323 context.draw(Text("\(Int(alt))°").font(.system(size: 9)).foregroundStyle(ink.opacity(0.5)), at: pt(alt, mid - half), anchor: .bottomLeading) 324 context.draw(Text("\(Int(alt))°").font(.caption2).foregroundStyle(ink.opacity(0.6)), at: pt(alt, mid - half), anchor: .bottomLeading)
324 } 325 }
325 var horizon = Path() 326 var horizon = Path()
326 horizon.move(to: CGPoint(x: 0, y: base)); horizon.addLine(to: CGPoint(x: size.width, y: base)) 327 horizon.move(to: CGPoint(x: 0, y: base)); horizon.addLine(to: CGPoint(x: size.width, y: base))
327 context.stroke(horizon, with: .color(ink.opacity(0.6)), lineWidth: 1) 328 context.stroke(horizon, with: .color(ink.opacity(0.6)), lineWidth: 1)
328 for bearing in stride(from: ((mid - half) / 45).rounded(.up) * 45, through: mid + half, by: 45) { 329 for bearing in stride(from: ((mid - half) / 45).rounded(.up) * 45, through: mid + half, by: 45) {
329 context.draw(Text(compass(bearing)).font(.system(size: 10)).foregroundStyle(ink.opacity(0.7)), at: CGPoint(x: pt(0, bearing).x, y: base + 8)) 330 context.draw(Text(compass(bearing)).font(.caption2).foregroundStyle(ink.opacity(0.7)), at: CGPoint(x: pt(0, bearing).x, y: base + 8))
330 } 331 }
331 332
332 var arc = Path() 333 var arc = Path()
@@ -336,7 +337,7 @@ struct SunDiagram: View {
336 let p = pt(c.sun.altitude, unwrap(c.sun.azimuth)) 337 let p = pt(c.sun.altitude, unwrap(c.sun.azimuth))
337 let key = c.name == "C2" || c.name == "Max" 338 let key = c.name == "C2" || c.name == "Max"
338 context.fill(Path(ellipseIn: CGRect(x: p.x - 4, y: p.y - 4, width: 8, height: 8)), with: .color(key ? accent : ink)) 339 context.fill(Path(ellipseIn: CGRect(x: p.x - 4, y: p.y - 4, width: 8, height: 8)), with: .color(key ? accent : ink))
339 context.draw(Text(c.name == "C2" ? "Totality" : c.name).font(.system(size: 10)).foregroundStyle(ink), at: CGPoint(x: p.x, y: p.y - 11)) 340 context.draw(Text(c.name == "C2" ? "Totality" : c.name).font(.caption2).foregroundStyle(ink), at: CGPoint(x: p.x, y: p.y - 11))
340 } 341 }
341 } 342 }
342 343
App/Widgets/EclipseLiveActivity.swift +2 −2
@@ -102,13 +102,13 @@ private struct EclipseActivityView: View {
102 HStack { 102 HStack {
103 ForEach(contacts(a), id: \.0) { name, date in 103 ForEach(contacts(a), id: \.0) { name, date in
104 VStack(alignment: .leading, spacing: 0) { 104 VStack(alignment: .leading, spacing: 0) {
105 Text(name).font(.system(size: 10)).opacity(0.6) 105 Text(name).font(.system(size: 11)).opacity(0.7)
106 Text(clock(date, a)).font(.system(size: 11).monospacedDigit()) 106 Text(clock(date, a)).font(.system(size: 11).monospacedDigit())
107 } 107 }
108 if name != "C4" { Spacer(minLength: 4) } 108 if name != "C4" { Spacer(minLength: 4) }
109 } 109 }
110 } 110 }
111 Text(a.timeZone == nil ? "Times in UTC" : "Local time at the site").font(.system(size: 10)).opacity(0.6) 111 Text(a.timeZone == nil ? "Times in UTC" : "Local time at the site").font(.system(size: 11)).opacity(0.7)
112 } 112 }
113 .padding(16) 113 .padding(16)
114 } 114 }
App/Widgets/LaunchLiveActivity.swift +1 −1
@@ -84,7 +84,7 @@ private struct LaunchActivityView: View {
84 } 84 }
85 Spacer() 85 Spacer()
86 VStack(alignment: .trailing, spacing: 2) { 86 VStack(alignment: .trailing, spacing: 2) {
87 Text(context.state.status.uppercased()).font(.system(size: 10, weight: .medium)).tracking(0.6) 87 Text(context.state.status.uppercased()).font(.system(size: 11, weight: .medium)).tracking(0.6)
88 .foregroundStyle(context.state.status == "Hold" ? accent : ink) 88 .foregroundStyle(context.state.status == "Hold" ? accent : ink)
89 HStack(spacing: 2) { 89 HStack(spacing: 2) {
90 Text(context.state.net > .now ? "T−" : "T+") 90 Text(context.state.net > .now ? "T−" : "T+")
App/Widgets/MoonriseWidgets.swift +1 −1
@@ -213,7 +213,7 @@ struct PlanetsWidgetView: View {
213 } 213 }
214 Spacer(minLength: 0) 214 Spacer(minLength: 0)
215 if !entry.located { 215 if !entry.located {
216 Text("Open Moonrise to set location").font(.system(size: 10)).opacity(0.5) 216 Text("Open Moonrise to set location").font(.system(size: 11)).opacity(0.7)
217 } 217 }
218 } 218 }
219 .foregroundStyle(Color(red: 0.95, green: 0.95, blue: 0.93)) 219 .foregroundStyle(Color(red: 0.95, green: 0.95, blue: 0.93))
App/Widgets/PassLiveActivity.swift +3 −3
@@ -77,9 +77,9 @@ private struct PassActivityView: View {
77 private var medium: some View { 77 private var medium: some View {
78 VStack(alignment: .leading, spacing: 8) { 78 VStack(alignment: .leading, spacing: 8) {
79 HStack(alignment: .firstTextBaseline) { 79 HStack(alignment: .firstTextBaseline) {
80 Text("\(pass.name) pass").font(.system(size: 10, weight: .medium)).textCase(.uppercase).tracking(0.6).opacity(0.8) 80 Text("\(pass.name) pass").font(.system(size: 11, weight: .medium)).textCase(.uppercase).tracking(0.6).opacity(0.8)
81 if pass.visible { 81 if pass.visible {
82 Text("Visible").font(.system(size: 10, weight: .medium)).textCase(.uppercase).tracking(0.6) 82 Text("Visible").font(.system(size: 11, weight: .medium)).textCase(.uppercase).tracking(0.6)
83 } 83 }
84 Spacer() 84 Spacer()
85 if !context.isStale { 85 if !context.isStale {
@@ -105,7 +105,7 @@ private struct PassActivityView: View {
105 105
106 private func column(_ label: String, _ value: String, _ detail: String) -> some View { 106 private func column(_ label: String, _ value: String, _ detail: String) -> some View {
107 VStack(alignment: .leading, spacing: 1) { 107 VStack(alignment: .leading, spacing: 1) {
108 Text(label).font(.system(size: 10, weight: .medium)).textCase(.uppercase).tracking(0.6).opacity(0.6) 108 Text(label).font(.system(size: 11, weight: .medium)).textCase(.uppercase).tracking(0.6).opacity(0.7)
109 Text("\(value) \(detail)").font(.system(size: 15, weight: .medium).monospacedDigit()) 109 Text("\(value) \(detail)").font(.system(size: 15, weight: .medium).monospacedDigit())
110 } 110 }
111 } 111 }
PLAN.org +3 −1
@@ -473,7 +473,9 @@ Sky, System, Sun, Launches, Library core (above).
473- iPhone app on Vision Pro (iPad compatibility mode): "View as a globe" was 473- iPhone app on Vision Pro (iPad compatibility mode): "View as a globe" was
474 black. Done: unlit globe when =isiOSAppOnVision= (iOS 26.1+). 474 black. Done: unlit globe when =isiOSAppOnVision= (iOS 26.1+).
475- Small text: 9–10 pt Canvas labels in EclipseScreen ignore Dynamic Type; 475- Small text: 9–10 pt Canvas labels in EclipseScreen ignore Dynamic Type;
476 10 pt uppercase at 0.6 opacity in the Pass and Launch Live Activities. 476 10 pt uppercase at 0.6 opacity in the Pass and Launch Live Activities. Done: chart
477 labels in caption2 (Dynamic Type up to xxLarge); widget and Live Activity
478 labels 10 → 11 pt, faintest opacity 0.5–0.6 → 0.7.
477- App Shortcuts phrases tested on a device. 479- App Shortcuts phrases tested on a device.
478- Artemis II (Horizons =-1024=, 1–11 April 2026) in =server/src/live.ts= as 480- Artemis II (Horizons =-1024=, 1–11 April 2026) in =server/src/live.ts= as
479 a past event for replay. Done: Horizons data 2 April 01:59 to 10 April 481 a past event for replay. Done: Horizons data 2 April 01:59 to 10 April