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 {
194194 if !commentText.isEmpty {
195195 MarkupPreview(text: commentText, format: commentFormat,
196196 identifier: "issue-comment-preview")
197 .font(.gbSans(.subheadline))
197198 }
198199 }
199200 }
gitbay/Views/MRs/MRView.swift +1
@@ -559,6 +559,7 @@ struct MRView: View {
559559 if !commentText.isEmpty {
560560 MarkupPreview(text: commentText, format: commentFormat,
561561 identifier: "mr-comment-preview")
562 .font(.gbSans(.subheadline))
562563 }
563564 }
564565 }
gitbay/Views/Shared/MarkupPreview.swift +4 −2
@@ -13,7 +13,7 @@ struct MarkupPreview: View {
1313 @State private var expanded = false
1414
1515 var body: some View {
16 DisclosureGroup("Preview", isExpanded: $expanded) {
16 DisclosureGroup(isExpanded: $expanded) {
1717 if text.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty {
1818 Text("Nothing to preview.")
1919 .font(.gbSans(.subheadline))
@@ -22,8 +22,10 @@ struct MarkupPreview: View {
2222 FormattedBodyView(text: text, format: format)
2323 .padding(.vertical, 4)
2424 }
25 } label: {
26 Text("Preview")
27 .font(.gbSans(.subheadline))
2528 }
26 .font(.gbSans(.subheadline))
2729 .accessibilityIdentifier(identifier)
2830 }
2931