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 | 60 | /// register. |
| 61 | 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 | 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 | 70 | nonisolated static func gbMono(_ style: TextStyle) -> Font { |
gitbay/Views/Discovery/FeedView.swift
+5 −12
| @@ -65,21 +65,14 @@ struct FeedRow: View { |
| 65 | 65 | .foregroundStyle(color) |
| 66 | 66 | .frame(width: 22) |
| 67 | 67 | VStack(alignment: .leading, spacing: 2) { |
| 68 | | Text(event.repo) |
| 68 | Text("\(event.repo) · \(Text(event.createdAt, format: .relative(presentation: .named)))") |
| 69 | 69 | .font(.gbSans(.caption)) |
| 70 | 70 | .foregroundStyle(.secondary) |
| 71 | | HStack(spacing: 4) { |
| 72 | | Text(event.displayActor) |
| 73 | | .font(.gbSans(.subheadline).weight(.semibold)) |
| 74 | | Text(event.phrase) |
| 75 | | .font(.gbSans(.subheadline)) |
| 76 | | .lineLimit(1) |
| 77 | | } |
| 71 | Text("\(Text(event.displayActor).fontWeight(.semibold)) \(event.phrase)") |
| 72 | .font(.gbSans(.subheadline)) |
| 73 | .lineLimit(2) |
| 78 | 74 | } |
| 79 | | Spacer() |
| 80 | | Text(event.createdAt, format: .relative(presentation: .named)) |
| 81 | | .font(.gbSans(.caption)) |
| 82 | | .foregroundStyle(.secondary) |
| 75 | Spacer(minLength: 0) |
| 83 | 76 | } |
| 84 | 77 | .padding(.vertical, 2) |
| 85 | 78 | } |
gitbay/Views/Discovery/ProfileView.swift
+6 −2
| @@ -132,8 +132,10 @@ struct ProfileView: View { |
| 132 | 132 | let url = URL(string: website) { |
| 133 | 133 | Link(destination: url) { |
| 134 | 134 | Label(website, systemImage: "link") |
| 135 | | .font(.gbSans(.caption)) |
| 135 | .font(.gbSans(.subheadline)) |
| 136 | 136 | .lineLimit(1) |
| 137 | .frame(maxWidth: .infinity, minHeight: 44, alignment: .leading) |
| 138 | .contentShape(Rectangle()) |
| 137 | 139 | } |
| 138 | 140 | } |
| 139 | 141 | if let links = profile.links, !links.isEmpty { |
| @@ -141,8 +143,10 @@ struct ProfileView: View { |
| 141 | 143 | if let url = URL(string: link.url) { |
| 142 | 144 | Link(destination: url) { |
| 143 | 145 | Label(link.title, systemImage: "arrow.up.right") |
| 144 | | .font(.gbSans(.caption)) |
| 146 | .font(.gbSans(.subheadline)) |
| 145 | 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 | 70 | .foregroundStyle(issue.isOpen ? Color.gbOK : Color.gbBad) |
| 71 | 71 | Text("by \(issue.author)") |
| 72 | 72 | Text(issue.createdAt, format: .relative(presentation: .named)) |
| 73 | | .foregroundStyle(.tertiary) |
| 74 | 73 | if let milestone = issue.milestone { |
| 75 | 74 | Label(milestone, systemImage: "flag") |
| 76 | 75 | } |
gitbay/Views/Issues/MilestoneListView.swift
+1 −1
| @@ -155,7 +155,7 @@ private struct MilestoneRow: View { |
| 155 | 155 | if let due = milestone.due, !due.isEmpty { |
| 156 | 156 | Text(due) |
| 157 | 157 | .font(.gbSans(.caption)) |
| 158 | | .foregroundStyle(.tertiary) |
| 158 | .foregroundStyle(.secondary) |
| 159 | 159 | } |
| 160 | 160 | } |
| 161 | 161 | if let description = milestone.description, !description.isEmpty { |
gitbay/Views/MRs/DiffView.swift
+1
| @@ -199,6 +199,7 @@ private struct LineView: View { |
| 199 | 199 | .foregroundStyle(textColor) |
| 200 | 200 | } |
| 201 | 201 | .font(.gbMono(.caption2)) |
| 202 | .frame(maxWidth: .infinity, alignment: .leading) |
| 202 | 203 | .background(background) |
| 203 | 204 | .accessibilityElement(children: .ignore) |
| 204 | 205 | .accessibilityLabel(line.accessibilityLabel) |
gitbay/Views/MRs/MRListView.swift
+1 −2
| @@ -209,14 +209,13 @@ struct MRRow: View { |
| 209 | 209 | Spacer() |
| 210 | 210 | } |
| 211 | 211 | Text(mr.createdAt, format: .relative(presentation: .named)) |
| 212 | | .foregroundStyle(.secondary) |
| 213 | 212 | } |
| 214 | 213 | .font(.gbSans(.caption)) |
| 215 | 214 | .foregroundStyle(.secondary) |
| 216 | 215 | if let stackedOn = mr.stackedOn { |
| 217 | 216 | Text("stacked on !\(stackedOn.number)") |
| 218 | 217 | .font(.gbSans(.caption2)) |
| 219 | | .foregroundStyle(.tertiary) |
| 218 | .foregroundStyle(.secondary) |
| 220 | 219 | } |
| 221 | 220 | } |
| 222 | 221 | .padding(.vertical, 2) |
gitbay/Views/MRs/MRView.swift
+3 −5
| @@ -191,7 +191,6 @@ struct MRView: View { |
| 191 | 191 | HStack(spacing: 6) { |
| 192 | 192 | Text("by \(mr.author)") |
| 193 | 193 | Text(mr.createdAt, format: .relative(presentation: .named)) |
| 194 | | .foregroundStyle(.tertiary) |
| 195 | 194 | } |
| 196 | 195 | .font(.gbSans(.caption)) |
| 197 | 196 | .foregroundStyle(.secondary) |
| @@ -217,7 +216,6 @@ struct MRView: View { |
| 217 | 216 | HStack(spacing: 6) { |
| 218 | 217 | Text(actor.map { "\(verb) by \($0)" } ?? verb) |
| 219 | 218 | Text(at, format: Self.stamp) |
| 220 | | .foregroundStyle(.tertiary) |
| 221 | 219 | } |
| 222 | 220 | .font(.gbSans(.caption)) |
| 223 | 221 | .foregroundStyle(.secondary) |
| @@ -305,7 +303,7 @@ struct MRView: View { |
| 305 | 303 | } |
| 306 | 304 | Text(revision.createdAt.prefix(10)) |
| 307 | 305 | .font(.gbSans(.caption)) |
| 308 | | .foregroundStyle(.tertiary) |
| 306 | .foregroundStyle(.secondary) |
| 309 | 307 | } |
| 310 | 308 | if index > 0 { |
| 311 | 309 | NavigationLink(value: MRRoute.rangeDiff( |
| @@ -493,7 +491,7 @@ struct MRView: View { |
| 493 | 491 | } |
| 494 | 492 | } |
| 495 | 493 | .font(.gbSans(.caption)) |
| 496 | | .foregroundStyle(.tertiary) |
| 494 | .foregroundStyle(.secondary) |
| 497 | 495 | } |
| 498 | 496 | } |
| 499 | 497 | |
| @@ -662,7 +660,7 @@ struct ReviewThreadView: View { |
| 662 | 660 | .font(.gbSans(.caption).weight(.semibold)) |
| 663 | 661 | Text(comment.createdAt, format: .relative(presentation: .named)) |
| 664 | 662 | .font(.gbSans(.caption2)) |
| 665 | | .foregroundStyle(.tertiary) |
| 663 | .foregroundStyle(.secondary) |
| 666 | 664 | } |
| 667 | 665 | // Review comments carry no format; the web renders them as Markdown. |
| 668 | 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 | 33 | Spacer() |
| 34 | 34 | Text(release.createdAt, format: .relative(presentation: .named)) |
| 35 | 35 | .font(.gbSans(.caption)) |
| 36 | | .foregroundStyle(.tertiary) |
| 36 | .foregroundStyle(.secondary) |
| 37 | 37 | } |
| 38 | 38 | } |
| 39 | 39 | .padding(.vertical, 2) |
gitbay/Views/Releases/ReleaseView.swift
+1 −2
| @@ -35,7 +35,6 @@ struct ReleaseView: View { |
| 35 | 35 | Text("by \(author)") |
| 36 | 36 | } |
| 37 | 37 | Text(release.createdAt, format: .relative(presentation: .named)) |
| 38 | | .foregroundStyle(.tertiary) |
| 39 | 38 | } |
| 40 | 39 | .font(.gbSans(.caption)) |
| 41 | 40 | .foregroundStyle(.secondary) |
| @@ -62,7 +61,7 @@ struct ReleaseView: View { |
| 62 | 61 | .lineLimit(1) |
| 63 | 62 | Text(String(asset.sha256.prefix(16))) |
| 64 | 63 | .font(.gbMono(.caption2)) |
| 65 | | .foregroundStyle(.tertiary) |
| 64 | .foregroundStyle(.secondary) |
| 66 | 65 | } |
| 67 | 66 | Spacer() |
| 68 | 67 | Text(asset.size.formatted(.byteCount(style: .file))) |
gitbay/Views/Repos/BlameView.swift
+1 −1
| @@ -73,7 +73,7 @@ private struct HunkAttribution: View { |
| 73 | 73 | .lineLimit(1) |
| 74 | 74 | Text(hunk.date, format: .dateTime.year().month(.abbreviated).day()) |
| 75 | 75 | .font(.gbSans(.caption2)) |
| 76 | | .foregroundStyle(.tertiary) |
| 76 | .foregroundStyle(.secondary) |
| 77 | 77 | } |
| 78 | 78 | .padding(.horizontal, 10) |
| 79 | 79 | .padding(.vertical, 6) |
gitbay/Views/Repos/CommitView.swift
−1
| @@ -34,7 +34,6 @@ struct CommitView: View { |
| 34 | 34 | HStack(spacing: 6) { |
| 35 | 35 | Text(commit.authorName) |
| 36 | 36 | Text(commit.date, format: .dateTime.year().month().day()) |
| 37 | | .foregroundStyle(.tertiary) |
| 38 | 37 | } |
| 39 | 38 | .font(.gbSans(.caption)) |
| 40 | 39 | .foregroundStyle(.secondary) |
gitbay/Views/Repos/RefsView.swift
+1 −1
| @@ -70,7 +70,7 @@ private struct RefRow: View { |
| 70 | 70 | Spacer() |
| 71 | 71 | Text(String(ref.sha.prefix(10))) |
| 72 | 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 | 69 | if let size = entry.size, !entry.isDirectory { |
| 70 | 70 | Text(size.formatted(.byteCount(style: .file))) |
| 71 | 71 | .font(.gbSans(.caption)) |
| 72 | | .foregroundStyle(.tertiary) |
| 72 | .foregroundStyle(.secondary) |
| 73 | 73 | .monospacedDigit() |
| 74 | 74 | } |
| 75 | 75 | } |
gitbay/Views/Repos/WebhookListView.swift
+1 −1
| @@ -194,7 +194,7 @@ struct WebhookDeliveriesView: View { |
| 194 | 194 | Text("\(delivery.attempts) attempt\(delivery.attempts == 1 ? "" : "s")" |
| 195 | 195 | + (delivery.lastError.map { " — \($0)" } ?? "")) |
| 196 | 196 | .font(.gbSans(.caption)) |
| 197 | | .foregroundStyle(.tertiary) |
| 197 | .foregroundStyle(.secondary) |
| 198 | 198 | .lineLimit(2) |
| 199 | 199 | } |
| 200 | 200 | .padding(.vertical, 2) |
gitbay/Views/Shared/CommentsSection.swift
+1 −1
| @@ -34,7 +34,7 @@ struct CommentsSection: View { |
| 34 | 34 | .font(.gbSans(.caption).weight(.semibold)) |
| 35 | 35 | Text(comment.createdAt, format: .relative(presentation: .named)) |
| 36 | 36 | .font(.gbSans(.caption)) |
| 37 | | .foregroundStyle(.tertiary) |
| 37 | .foregroundStyle(.secondary) |
| 38 | 38 | } |
| 39 | 39 | FormattedBodyView(text: comment.body, format: comment.bodyFormat, repo: repo) |
| 40 | 40 | .font(.gbSans(.subheadline)) |
gitbay/Views/Snippets/SnippetView.swift
+1 −1
| @@ -163,7 +163,7 @@ struct SnippetView: View { |
| 163 | 163 | .foregroundStyle(.secondary) |
| 164 | 164 | Text(snippet.id) |
| 165 | 165 | .font(.gbMono(.caption2)) |
| 166 | | .foregroundStyle(.tertiary) |
| 166 | .foregroundStyle(.secondary) |
| 167 | 167 | } |
| 168 | 168 | .padding(.vertical, 2) |
| 169 | 169 | } |