Commit 03e7bc5841

03e7bc5841682911b874a9ee88765b9d2abddacd

parent: a29283a1de

Verified · cmc

cmc <hello@cleberg.net> · 2026-09-22 22:22 UTC

views: previews render at the size the app renders the text

MarkupPreview put .gbSans(.subheadline) on the whole DisclosureGroup, so
body previews (compose sheet, MR create, release create, file edit)
rendered at the comment size instead of the root .gbSans(.body) the app
actually uses for those. Size only the "Preview" label inside
MarkupPreview, and let each call site set the font its own row needs:
the two comment rows now carry .gbSans(.subheadline) explicitly, matching
what the thread puts on a comment's FormattedBodyView.

Layout: unified · split

gitbay/Views/Issues/IssueView.swift +1
@@ -194,6 +194,7 @@ struct IssueView: View {
194 if !commentText.isEmpty { 194 if !commentText.isEmpty {
195 MarkupPreview(text: commentText, format: commentFormat, 195 MarkupPreview(text: commentText, format: commentFormat,
196 identifier: "issue-comment-preview") 196 identifier: "issue-comment-preview")
197 .font(.gbSans(.subheadline))
197 } 198 }
198 } 199 }
199 } 200 }
gitbay/Views/MRs/MRView.swift +1
@@ -559,6 +559,7 @@ struct MRView: View {
559 if !commentText.isEmpty { 559 if !commentText.isEmpty {
560 MarkupPreview(text: commentText, format: commentFormat, 560 MarkupPreview(text: commentText, format: commentFormat,
561 identifier: "mr-comment-preview") 561 identifier: "mr-comment-preview")
562 .font(.gbSans(.subheadline))
562 } 563 }
563 } 564 }
564 } 565 }
gitbay/Views/Shared/MarkupPreview.swift +4 −2
@@ -13,7 +13,7 @@ struct MarkupPreview: View {
13 @State private var expanded = false 13 @State private var expanded = false
14 14
15 var body: some View { 15 var body: some View {
16 DisclosureGroup("Preview", isExpanded: $expanded) { 16 DisclosureGroup(isExpanded: $expanded) {
17 if text.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty { 17 if text.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty {
18 Text("Nothing to preview.") 18 Text("Nothing to preview.")
19 .font(.gbSans(.subheadline)) 19 .font(.gbSans(.subheadline))
@@ -22,8 +22,10 @@ struct MarkupPreview: View {
22 FormattedBodyView(text: text, format: format) 22 FormattedBodyView(text: text, format: format)
23 .padding(.vertical, 4) 23 .padding(.vertical, 4)
24 } 24 }
25 } label: {
26 Text("Preview")
27 .font(.gbSans(.subheadline))
25 } 28 }
26 .font(.gbSans(.subheadline))
27 .accessibilityIdentifier(identifier) 29 .accessibilityIdentifier(identifier)
28 } 30 }
29 31