Commit 4ac9bff752
4ac9bff752fc0db4a2e0caf477880f22f429633e
parent: 8a98032291
Verified · cmc
cmc <hello@cleberg.net> · 2026-11-09 00:21 UTC
Fix low-contrast text, feed rows, profile links and headline weight
- Use .secondary instead of .tertiary for readable text, and drop
inner styles nested in a .secondary stack, which rendered a level
fainter (MR header dates were 1.33:1, now 5.2:1).
- Feed rows: one wrapping Text for actor and action; time moves onto
the repo line so large Dynamic Type sizes no longer truncate.
- Profile links: subheadline text and a 44pt minimum tap area.
- gbSans applies semibold to .headline; the custom face only took
its size.
- Diff lines fill the row width so highlights no longer end at the
text.
Layout: unified · split
gitbay/Theme/Theme.swift
+4 −1
| @@ -60,8 +60,11 @@ nonisolated let gbChipShape = RoundedRectangle(cornerRadius: 2) |
| 60 | /// register. |
60 | /// register. |
| 61 | extension Font { |
61 | extension Font { |
| 62 | |
62 | |
| |
63 | /// A custom face takes only the size of `relativeTo`, so headline's |
| |
64 | /// semibold weight is applied here. |
| 63 | nonisolated static func gbSans(_ style: TextStyle) -> Font { |
65 | nonisolated static func gbSans(_ style: TextStyle) -> Font { |
| 64 | .custom("Atkinson Hyperlegible Next", size: gbSize(style), relativeTo: style) |
66 | let font = Font.custom("Atkinson Hyperlegible Next", size: gbSize(style), relativeTo: style) |
| |
67 | return style == .headline ? font.weight(.semibold) : font |
| 65 | } |
68 | } |
| 66 | |
69 | |
| 67 | nonisolated static func gbMono(_ style: TextStyle) -> Font { |
70 | nonisolated static func gbMono(_ style: TextStyle) -> Font { |
gitbay/Views/Discovery/FeedView.swift
+5 −12
| @@ -65,21 +65,14 @@ struct FeedRow: View { |
| 65 | .foregroundStyle(color) |
65 | .foregroundStyle(color) |
| 66 | .frame(width: 22) |
66 | .frame(width: 22) |
| 67 | VStack(alignment: .leading, spacing: 2) { |
67 | VStack(alignment: .leading, spacing: 2) { |
| 68 | Text(event.repo) |
68 | Text("\(event.repo) · \(Text(event.createdAt, format: .relative(presentation: .named)))") |
| 69 | .font(.gbSans(.caption)) |
69 | .font(.gbSans(.caption)) |
| 70 | .foregroundStyle(.secondary) |
70 | .foregroundStyle(.secondary) |
| 71 | HStack(spacing: 4) { |
71 | Text("\(Text(event.displayActor).fontWeight(.semibold)) \(event.phrase)") |
| 72 | Text(event.displayActor) |
72 | .font(.gbSans(.subheadline)) |
| 73 | .font(.gbSans(.subheadline).weight(.semibold)) |
73 | .lineLimit(2) |
| 74 | Text(event.phrase) |
| |
| 75 | .font(.gbSans(.subheadline)) |
| |
| 76 | .lineLimit(1) |
| |
| 77 | } |
| |
| 78 | } |
74 | } |
| 79 | Spacer() |
75 | Spacer(minLength: 0) |
| 80 | Text(event.createdAt, format: .relative(presentation: .named)) |
| |
| 81 | .font(.gbSans(.caption)) |
| |
| 82 | .foregroundStyle(.secondary) |
| |
| 83 | } |
76 | } |
| 84 | .padding(.vertical, 2) |
77 | .padding(.vertical, 2) |
| 85 | } |
78 | } |
gitbay/Views/Discovery/ProfileView.swift
+6 −2
| @@ -132,8 +132,10 @@ struct ProfileView: View { |
| 132 | let url = URL(string: website) { |
132 | let url = URL(string: website) { |
| 133 | Link(destination: url) { |
133 | Link(destination: url) { |
| 134 | Label(website, systemImage: "link") |
134 | Label(website, systemImage: "link") |
| 135 | .font(.gbSans(.caption)) |
135 | .font(.gbSans(.subheadline)) |
| 136 | .lineLimit(1) |
136 | .lineLimit(1) |
| |
137 | .frame(maxWidth: .infinity, minHeight: 44, alignment: .leading) |
| |
138 | .contentShape(Rectangle()) |
| 137 | } |
139 | } |
| 138 | } |
140 | } |
| 139 | if let links = profile.links, !links.isEmpty { |
141 | if let links = profile.links, !links.isEmpty { |
| @@ -141,8 +143,10 @@ struct ProfileView: View { |
| 141 | if let url = URL(string: link.url) { |
143 | if let url = URL(string: link.url) { |
| 142 | Link(destination: url) { |
144 | Link(destination: url) { |
| 143 | Label(link.title, systemImage: "arrow.up.right") |
145 | Label(link.title, systemImage: "arrow.up.right") |
| 144 | .font(.gbSans(.caption)) |
146 | .font(.gbSans(.subheadline)) |
| 145 | .lineLimit(1) |
147 | .lineLimit(1) |
| |
148 | .frame(maxWidth: .infinity, minHeight: 44, alignment: .leading) |
| |
149 | .contentShape(Rectangle()) |
| 146 | } |
150 | } |
| 147 | } |
151 | } |
| 148 | } |
152 | } |
gitbay/Views/Issues/IssueView.swift
−1
| @@ -70,7 +70,6 @@ struct IssueView: View { |
| 70 | .foregroundStyle(issue.isOpen ? Color.gbOK : Color.gbBad) |
70 | .foregroundStyle(issue.isOpen ? Color.gbOK : Color.gbBad) |
| 71 | Text("by \(issue.author)") |
71 | Text("by \(issue.author)") |
| 72 | Text(issue.createdAt, format: .relative(presentation: .named)) |
72 | Text(issue.createdAt, format: .relative(presentation: .named)) |
| 73 | .foregroundStyle(.tertiary) |
| |
| 74 | if let milestone = issue.milestone { |
73 | if let milestone = issue.milestone { |
| 75 | Label(milestone, systemImage: "flag") |
74 | Label(milestone, systemImage: "flag") |
| 76 | } |
75 | } |
gitbay/Views/Issues/MilestoneListView.swift
+1 −1
| @@ -155,7 +155,7 @@ private struct MilestoneRow: View { |
| 155 | if let due = milestone.due, !due.isEmpty { |
155 | if let due = milestone.due, !due.isEmpty { |
| 156 | Text(due) |
156 | Text(due) |
| 157 | .font(.gbSans(.caption)) |
157 | .font(.gbSans(.caption)) |
| 158 | .foregroundStyle(.tertiary) |
158 | .foregroundStyle(.secondary) |
| 159 | } |
159 | } |
| 160 | } |
160 | } |
| 161 | if let description = milestone.description, !description.isEmpty { |
161 | if let description = milestone.description, !description.isEmpty { |
gitbay/Views/MRs/DiffView.swift
+1
| @@ -199,6 +199,7 @@ private struct LineView: View { |
| 199 | .foregroundStyle(textColor) |
199 | .foregroundStyle(textColor) |
| 200 | } |
200 | } |
| 201 | .font(.gbMono(.caption2)) |
201 | .font(.gbMono(.caption2)) |
| |
202 | .frame(maxWidth: .infinity, alignment: .leading) |
| 202 | .background(background) |
203 | .background(background) |
| 203 | .accessibilityElement(children: .ignore) |
204 | .accessibilityElement(children: .ignore) |
| 204 | .accessibilityLabel(line.accessibilityLabel) |
205 | .accessibilityLabel(line.accessibilityLabel) |
gitbay/Views/MRs/MRListView.swift
+1 −2
| @@ -209,14 +209,13 @@ struct MRRow: View { |
| 209 | Spacer() |
209 | Spacer() |
| 210 | } |
210 | } |
| 211 | Text(mr.createdAt, format: .relative(presentation: .named)) |
211 | Text(mr.createdAt, format: .relative(presentation: .named)) |
| 212 | .foregroundStyle(.secondary) |
| |
| 213 | } |
212 | } |
| 214 | .font(.gbSans(.caption)) |
213 | .font(.gbSans(.caption)) |
| 215 | .foregroundStyle(.secondary) |
214 | .foregroundStyle(.secondary) |
| 216 | if let stackedOn = mr.stackedOn { |
215 | if let stackedOn = mr.stackedOn { |
| 217 | Text("stacked on !\(stackedOn.number)") |
216 | Text("stacked on !\(stackedOn.number)") |
| 218 | .font(.gbSans(.caption2)) |
217 | .font(.gbSans(.caption2)) |
| 219 | .foregroundStyle(.tertiary) |
218 | .foregroundStyle(.secondary) |
| 220 | } |
219 | } |
| 221 | } |
220 | } |
| 222 | .padding(.vertical, 2) |
221 | .padding(.vertical, 2) |
gitbay/Views/MRs/MRView.swift
+3 −5
| @@ -191,7 +191,6 @@ struct MRView: View { |
| 191 | HStack(spacing: 6) { |
191 | HStack(spacing: 6) { |
| 192 | Text("by \(mr.author)") |
192 | Text("by \(mr.author)") |
| 193 | Text(mr.createdAt, format: .relative(presentation: .named)) |
193 | Text(mr.createdAt, format: .relative(presentation: .named)) |
| 194 | .foregroundStyle(.tertiary) |
| |
| 195 | } |
194 | } |
| 196 | .font(.gbSans(.caption)) |
195 | .font(.gbSans(.caption)) |
| 197 | .foregroundStyle(.secondary) |
196 | .foregroundStyle(.secondary) |
| @@ -217,7 +216,6 @@ struct MRView: View { |
| 217 | HStack(spacing: 6) { |
216 | HStack(spacing: 6) { |
| 218 | Text(actor.map { "\(verb) by \($0)" } ?? verb) |
217 | Text(actor.map { "\(verb) by \($0)" } ?? verb) |
| 219 | Text(at, format: Self.stamp) |
218 | Text(at, format: Self.stamp) |
| 220 | .foregroundStyle(.tertiary) |
| |
| 221 | } |
219 | } |
| 222 | .font(.gbSans(.caption)) |
220 | .font(.gbSans(.caption)) |
| 223 | .foregroundStyle(.secondary) |
221 | .foregroundStyle(.secondary) |
| @@ -305,7 +303,7 @@ struct MRView: View { |
| 305 | } |
303 | } |
| 306 | Text(revision.createdAt.prefix(10)) |
304 | Text(revision.createdAt.prefix(10)) |
| 307 | .font(.gbSans(.caption)) |
305 | .font(.gbSans(.caption)) |
| 308 | .foregroundStyle(.tertiary) |
306 | .foregroundStyle(.secondary) |
| 309 | } |
307 | } |
| 310 | if index > 0 { |
308 | if index > 0 { |
| 311 | NavigationLink(value: MRRoute.rangeDiff( |
309 | NavigationLink(value: MRRoute.rangeDiff( |
| @@ -493,7 +491,7 @@ struct MRView: View { |
| 493 | } |
491 | } |
| 494 | } |
492 | } |
| 495 | .font(.gbSans(.caption)) |
493 | .font(.gbSans(.caption)) |
| 496 | .foregroundStyle(.tertiary) |
494 | .foregroundStyle(.secondary) |
| 497 | } |
495 | } |
| 498 | } |
496 | } |
| 499 | |
497 | |
| @@ -662,7 +660,7 @@ struct ReviewThreadView: View { |
| 662 | .font(.gbSans(.caption).weight(.semibold)) |
660 | .font(.gbSans(.caption).weight(.semibold)) |
| 663 | Text(comment.createdAt, format: .relative(presentation: .named)) |
661 | Text(comment.createdAt, format: .relative(presentation: .named)) |
| 664 | .font(.gbSans(.caption2)) |
662 | .font(.gbSans(.caption2)) |
| 665 | .foregroundStyle(.tertiary) |
663 | .foregroundStyle(.secondary) |
| 666 | } |
664 | } |
| 667 | // Review comments carry no format; the web renders them as Markdown. |
665 | // Review comments carry no format; the web renders them as Markdown. |
| 668 | // The thread's first comment holds its suggestion, drawn above. |
666 | // The thread's first comment holds its suggestion, drawn above. |
gitbay/Views/Releases/ReleaseListView.swift
+1 −1
| @@ -33,7 +33,7 @@ struct ReleaseListView: View { |
| 33 | Spacer() |
33 | Spacer() |
| 34 | Text(release.createdAt, format: .relative(presentation: .named)) |
34 | Text(release.createdAt, format: .relative(presentation: .named)) |
| 35 | .font(.gbSans(.caption)) |
35 | .font(.gbSans(.caption)) |
| 36 | .foregroundStyle(.tertiary) |
36 | .foregroundStyle(.secondary) |
| 37 | } |
37 | } |
| 38 | } |
38 | } |
| 39 | .padding(.vertical, 2) |
39 | .padding(.vertical, 2) |
gitbay/Views/Releases/ReleaseView.swift
+1 −2
| @@ -35,7 +35,6 @@ struct ReleaseView: View { |
| 35 | Text("by \(author)") |
35 | Text("by \(author)") |
| 36 | } |
36 | } |
| 37 | Text(release.createdAt, format: .relative(presentation: .named)) |
37 | Text(release.createdAt, format: .relative(presentation: .named)) |
| 38 | .foregroundStyle(.tertiary) |
| |
| 39 | } |
38 | } |
| 40 | .font(.gbSans(.caption)) |
39 | .font(.gbSans(.caption)) |
| 41 | .foregroundStyle(.secondary) |
40 | .foregroundStyle(.secondary) |
| @@ -62,7 +61,7 @@ struct ReleaseView: View { |
| 62 | .lineLimit(1) |
61 | .lineLimit(1) |
| 63 | Text(String(asset.sha256.prefix(16))) |
62 | Text(String(asset.sha256.prefix(16))) |
| 64 | .font(.gbMono(.caption2)) |
63 | .font(.gbMono(.caption2)) |
| 65 | .foregroundStyle(.tertiary) |
64 | .foregroundStyle(.secondary) |
| 66 | } |
65 | } |
| 67 | Spacer() |
66 | Spacer() |
| 68 | Text(asset.size.formatted(.byteCount(style: .file))) |
67 | Text(asset.size.formatted(.byteCount(style: .file))) |
gitbay/Views/Repos/BlameView.swift
+1 −1
| @@ -73,7 +73,7 @@ private struct HunkAttribution: View { |
| 73 | .lineLimit(1) |
73 | .lineLimit(1) |
| 74 | Text(hunk.date, format: .dateTime.year().month(.abbreviated).day()) |
74 | Text(hunk.date, format: .dateTime.year().month(.abbreviated).day()) |
| 75 | .font(.gbSans(.caption2)) |
75 | .font(.gbSans(.caption2)) |
| 76 | .foregroundStyle(.tertiary) |
76 | .foregroundStyle(.secondary) |
| 77 | } |
77 | } |
| 78 | .padding(.horizontal, 10) |
78 | .padding(.horizontal, 10) |
| 79 | .padding(.vertical, 6) |
79 | .padding(.vertical, 6) |
gitbay/Views/Repos/CommitView.swift
−1
| @@ -34,7 +34,6 @@ struct CommitView: View { |
| 34 | HStack(spacing: 6) { |
34 | HStack(spacing: 6) { |
| 35 | Text(commit.authorName) |
35 | Text(commit.authorName) |
| 36 | Text(commit.date, format: .dateTime.year().month().day()) |
36 | Text(commit.date, format: .dateTime.year().month().day()) |
| 37 | .foregroundStyle(.tertiary) |
| |
| 38 | } |
37 | } |
| 39 | .font(.gbSans(.caption)) |
38 | .font(.gbSans(.caption)) |
| 40 | .foregroundStyle(.secondary) |
39 | .foregroundStyle(.secondary) |
gitbay/Views/Repos/RefsView.swift
+1 −1
| @@ -70,7 +70,7 @@ private struct RefRow: View { |
| 70 | Spacer() |
70 | Spacer() |
| 71 | Text(String(ref.sha.prefix(10))) |
71 | Text(String(ref.sha.prefix(10))) |
| 72 | .font(.gbMono(.caption2)) |
72 | .font(.gbMono(.caption2)) |
| 73 | .foregroundStyle(.tertiary) |
73 | .foregroundStyle(.secondary) |
| 74 | } |
74 | } |
| 75 | } |
75 | } |
| 76 | } |
76 | } |
gitbay/Views/Repos/TreeView.swift
+1 −1
| @@ -69,7 +69,7 @@ private struct EntryRow: View { |
| 69 | if let size = entry.size, !entry.isDirectory { |
69 | if let size = entry.size, !entry.isDirectory { |
| 70 | Text(size.formatted(.byteCount(style: .file))) |
70 | Text(size.formatted(.byteCount(style: .file))) |
| 71 | .font(.gbSans(.caption)) |
71 | .font(.gbSans(.caption)) |
| 72 | .foregroundStyle(.tertiary) |
72 | .foregroundStyle(.secondary) |
| 73 | .monospacedDigit() |
73 | .monospacedDigit() |
| 74 | } |
74 | } |
| 75 | } |
75 | } |
gitbay/Views/Repos/WebhookListView.swift
+1 −1
| @@ -194,7 +194,7 @@ struct WebhookDeliveriesView: View { |
| 194 | Text("\(delivery.attempts) attempt\(delivery.attempts == 1 ? "" : "s")" |
194 | Text("\(delivery.attempts) attempt\(delivery.attempts == 1 ? "" : "s")" |
| 195 | + (delivery.lastError.map { " — \($0)" } ?? "")) |
195 | + (delivery.lastError.map { " — \($0)" } ?? "")) |
| 196 | .font(.gbSans(.caption)) |
196 | .font(.gbSans(.caption)) |
| 197 | .foregroundStyle(.tertiary) |
197 | .foregroundStyle(.secondary) |
| 198 | .lineLimit(2) |
198 | .lineLimit(2) |
| 199 | } |
199 | } |
| 200 | .padding(.vertical, 2) |
200 | .padding(.vertical, 2) |
gitbay/Views/Shared/CommentsSection.swift
+1 −1
| @@ -34,7 +34,7 @@ struct CommentsSection: View { |
| 34 | .font(.gbSans(.caption).weight(.semibold)) |
34 | .font(.gbSans(.caption).weight(.semibold)) |
| 35 | Text(comment.createdAt, format: .relative(presentation: .named)) |
35 | Text(comment.createdAt, format: .relative(presentation: .named)) |
| 36 | .font(.gbSans(.caption)) |
36 | .font(.gbSans(.caption)) |
| 37 | .foregroundStyle(.tertiary) |
37 | .foregroundStyle(.secondary) |
| 38 | } |
38 | } |
| 39 | FormattedBodyView(text: comment.body, format: comment.bodyFormat, repo: repo) |
39 | FormattedBodyView(text: comment.body, format: comment.bodyFormat, repo: repo) |
| 40 | .font(.gbSans(.subheadline)) |
40 | .font(.gbSans(.subheadline)) |
gitbay/Views/Snippets/SnippetView.swift
+1 −1
| @@ -163,7 +163,7 @@ struct SnippetView: View { |
| 163 | .foregroundStyle(.secondary) |
163 | .foregroundStyle(.secondary) |
| 164 | Text(snippet.id) |
164 | Text(snippet.id) |
| 165 | .font(.gbMono(.caption2)) |
165 | .font(.gbMono(.caption2)) |
| 166 | .foregroundStyle(.tertiary) |
166 | .foregroundStyle(.secondary) |
| 167 | } |
167 | } |
| 168 | .padding(.vertical, 2) |
168 | .padding(.vertical, 2) |
| 169 | } |
169 | } |