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)
6060/// register.
6161extension Font {
6262
63 /// A custom face takes only the size of `relativeTo`, so headline's
64 /// semibold weight is applied here.
6365 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
6568 }
6669
6770 nonisolated static func gbMono(_ style: TextStyle) -> Font {
gitbay/Views/Discovery/FeedView.swift +5 −12
@@ -65,21 +65,14 @@ struct FeedRow: View {
6565 .foregroundStyle(color)
6666 .frame(width: 22)
6767 VStack(alignment: .leading, spacing: 2) {
68 Text(event.repo)
68 Text("\(event.repo) · \(Text(event.createdAt, format: .relative(presentation: .named)))")
6969 .font(.gbSans(.caption))
7070 .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)
7874 }
79 Spacer()
80 Text(event.createdAt, format: .relative(presentation: .named))
81 .font(.gbSans(.caption))
82 .foregroundStyle(.secondary)
75 Spacer(minLength: 0)
8376 }
8477 .padding(.vertical, 2)
8578 }
gitbay/Views/Discovery/ProfileView.swift +6 −2
@@ -132,8 +132,10 @@ struct ProfileView: View {
132132 let url = URL(string: website) {
133133 Link(destination: url) {
134134 Label(website, systemImage: "link")
135 .font(.gbSans(.caption))
135 .font(.gbSans(.subheadline))
136136 .lineLimit(1)
137 .frame(maxWidth: .infinity, minHeight: 44, alignment: .leading)
138 .contentShape(Rectangle())
137139 }
138140 }
139141 if let links = profile.links, !links.isEmpty {
@@ -141,8 +143,10 @@ struct ProfileView: View {
141143 if let url = URL(string: link.url) {
142144 Link(destination: url) {
143145 Label(link.title, systemImage: "arrow.up.right")
144 .font(.gbSans(.caption))
146 .font(.gbSans(.subheadline))
145147 .lineLimit(1)
148 .frame(maxWidth: .infinity, minHeight: 44, alignment: .leading)
149 .contentShape(Rectangle())
146150 }
147151 }
148152 }
gitbay/Views/Issues/IssueView.swift −1
@@ -70,7 +70,6 @@ struct IssueView: View {
7070 .foregroundStyle(issue.isOpen ? Color.gbOK : Color.gbBad)
7171 Text("by \(issue.author)")
7272 Text(issue.createdAt, format: .relative(presentation: .named))
73 .foregroundStyle(.tertiary)
7473 if let milestone = issue.milestone {
7574 Label(milestone, systemImage: "flag")
7675 }
gitbay/Views/Issues/MilestoneListView.swift +1 −1
@@ -155,7 +155,7 @@ private struct MilestoneRow: View {
155155 if let due = milestone.due, !due.isEmpty {
156156 Text(due)
157157 .font(.gbSans(.caption))
158 .foregroundStyle(.tertiary)
158 .foregroundStyle(.secondary)
159159 }
160160 }
161161 if let description = milestone.description, !description.isEmpty {
gitbay/Views/MRs/DiffView.swift +1
@@ -199,6 +199,7 @@ private struct LineView: View {
199199 .foregroundStyle(textColor)
200200 }
201201 .font(.gbMono(.caption2))
202 .frame(maxWidth: .infinity, alignment: .leading)
202203 .background(background)
203204 .accessibilityElement(children: .ignore)
204205 .accessibilityLabel(line.accessibilityLabel)
gitbay/Views/MRs/MRListView.swift +1 −2
@@ -209,14 +209,13 @@ struct MRRow: View {
209209 Spacer()
210210 }
211211 Text(mr.createdAt, format: .relative(presentation: .named))
212 .foregroundStyle(.secondary)
213212 }
214213 .font(.gbSans(.caption))
215214 .foregroundStyle(.secondary)
216215 if let stackedOn = mr.stackedOn {
217216 Text("stacked on !\(stackedOn.number)")
218217 .font(.gbSans(.caption2))
219 .foregroundStyle(.tertiary)
218 .foregroundStyle(.secondary)
220219 }
221220 }
222221 .padding(.vertical, 2)
gitbay/Views/MRs/MRView.swift +3 −5
@@ -191,7 +191,6 @@ struct MRView: View {
191191 HStack(spacing: 6) {
192192 Text("by \(mr.author)")
193193 Text(mr.createdAt, format: .relative(presentation: .named))
194 .foregroundStyle(.tertiary)
195194 }
196195 .font(.gbSans(.caption))
197196 .foregroundStyle(.secondary)
@@ -217,7 +216,6 @@ struct MRView: View {
217216 HStack(spacing: 6) {
218217 Text(actor.map { "\(verb) by \($0)" } ?? verb)
219218 Text(at, format: Self.stamp)
220 .foregroundStyle(.tertiary)
221219 }
222220 .font(.gbSans(.caption))
223221 .foregroundStyle(.secondary)
@@ -305,7 +303,7 @@ struct MRView: View {
305303 }
306304 Text(revision.createdAt.prefix(10))
307305 .font(.gbSans(.caption))
308 .foregroundStyle(.tertiary)
306 .foregroundStyle(.secondary)
309307 }
310308 if index > 0 {
311309 NavigationLink(value: MRRoute.rangeDiff(
@@ -493,7 +491,7 @@ struct MRView: View {
493491 }
494492 }
495493 .font(.gbSans(.caption))
496 .foregroundStyle(.tertiary)
494 .foregroundStyle(.secondary)
497495 }
498496 }
499497
@@ -662,7 +660,7 @@ struct ReviewThreadView: View {
662660 .font(.gbSans(.caption).weight(.semibold))
663661 Text(comment.createdAt, format: .relative(presentation: .named))
664662 .font(.gbSans(.caption2))
665 .foregroundStyle(.tertiary)
663 .foregroundStyle(.secondary)
666664 }
667665 // Review comments carry no format; the web renders them as Markdown.
668666 // The thread's first comment holds its suggestion, drawn above.
gitbay/Views/Releases/ReleaseListView.swift +1 −1
@@ -33,7 +33,7 @@ struct ReleaseListView: View {
3333 Spacer()
3434 Text(release.createdAt, format: .relative(presentation: .named))
3535 .font(.gbSans(.caption))
36 .foregroundStyle(.tertiary)
36 .foregroundStyle(.secondary)
3737 }
3838 }
3939 .padding(.vertical, 2)
gitbay/Views/Releases/ReleaseView.swift +1 −2
@@ -35,7 +35,6 @@ struct ReleaseView: View {
3535 Text("by \(author)")
3636 }
3737 Text(release.createdAt, format: .relative(presentation: .named))
38 .foregroundStyle(.tertiary)
3938 }
4039 .font(.gbSans(.caption))
4140 .foregroundStyle(.secondary)
@@ -62,7 +61,7 @@ struct ReleaseView: View {
6261 .lineLimit(1)
6362 Text(String(asset.sha256.prefix(16)))
6463 .font(.gbMono(.caption2))
65 .foregroundStyle(.tertiary)
64 .foregroundStyle(.secondary)
6665 }
6766 Spacer()
6867 Text(asset.size.formatted(.byteCount(style: .file)))
gitbay/Views/Repos/BlameView.swift +1 −1
@@ -73,7 +73,7 @@ private struct HunkAttribution: View {
7373 .lineLimit(1)
7474 Text(hunk.date, format: .dateTime.year().month(.abbreviated).day())
7575 .font(.gbSans(.caption2))
76 .foregroundStyle(.tertiary)
76 .foregroundStyle(.secondary)
7777 }
7878 .padding(.horizontal, 10)
7979 .padding(.vertical, 6)
gitbay/Views/Repos/CommitView.swift −1
@@ -34,7 +34,6 @@ struct CommitView: View {
3434 HStack(spacing: 6) {
3535 Text(commit.authorName)
3636 Text(commit.date, format: .dateTime.year().month().day())
37 .foregroundStyle(.tertiary)
3837 }
3938 .font(.gbSans(.caption))
4039 .foregroundStyle(.secondary)
gitbay/Views/Repos/RefsView.swift +1 −1
@@ -70,7 +70,7 @@ private struct RefRow: View {
7070 Spacer()
7171 Text(String(ref.sha.prefix(10)))
7272 .font(.gbMono(.caption2))
73 .foregroundStyle(.tertiary)
73 .foregroundStyle(.secondary)
7474 }
7575 }
7676}
gitbay/Views/Repos/TreeView.swift +1 −1
@@ -69,7 +69,7 @@ private struct EntryRow: View {
6969 if let size = entry.size, !entry.isDirectory {
7070 Text(size.formatted(.byteCount(style: .file)))
7171 .font(.gbSans(.caption))
72 .foregroundStyle(.tertiary)
72 .foregroundStyle(.secondary)
7373 .monospacedDigit()
7474 }
7575 }
gitbay/Views/Repos/WebhookListView.swift +1 −1
@@ -194,7 +194,7 @@ struct WebhookDeliveriesView: View {
194194 Text("\(delivery.attempts) attempt\(delivery.attempts == 1 ? "" : "s")"
195195 + (delivery.lastError.map { " — \($0)" } ?? ""))
196196 .font(.gbSans(.caption))
197 .foregroundStyle(.tertiary)
197 .foregroundStyle(.secondary)
198198 .lineLimit(2)
199199 }
200200 .padding(.vertical, 2)
gitbay/Views/Shared/CommentsSection.swift +1 −1
@@ -34,7 +34,7 @@ struct CommentsSection: View {
3434 .font(.gbSans(.caption).weight(.semibold))
3535 Text(comment.createdAt, format: .relative(presentation: .named))
3636 .font(.gbSans(.caption))
37 .foregroundStyle(.tertiary)
37 .foregroundStyle(.secondary)
3838 }
3939 FormattedBodyView(text: comment.body, format: comment.bodyFormat, repo: repo)
4040 .font(.gbSans(.subheadline))
gitbay/Views/Snippets/SnippetView.swift +1 −1
@@ -163,7 +163,7 @@ struct SnippetView: View {
163163 .foregroundStyle(.secondary)
164164 Text(snippet.id)
165165 .font(.gbMono(.caption2))
166 .foregroundStyle(.tertiary)
166 .foregroundStyle(.secondary)
167167 }
168168 .padding(.vertical, 2)
169169 }