Commit 44445decd7
44445decd74ce7715e8f13071232771b5cb56522
parent: 99c913d081
Verified · cmc
cmc <hello@cleberg.net> · 2026-09-23 01:27 UTC
Keep build meta on one line; clear the keyboard off previews
The build row's meta line truncates the ref in the middle and never
breaks the short sha. Editors dismiss the keyboard on a downward drag,
and expanding a preview dismisses it.
Layout: unified · split
gitbay/Views/Builds/BuildListView.swift
+3
| @@ -81,9 +81,12 @@ private struct BuildRow: View { |
| 81 | HStack(spacing: 6) { |
81 | HStack(spacing: 6) { |
| 82 | Text(build.job) |
82 | Text(build.job) |
| 83 | Text(build.ref) |
83 | Text(build.ref) |
| |
84 | .truncationMode(.middle) |
| 84 | Text(build.shortSHA) |
85 | Text(build.shortSHA) |
| 85 | .font(.gbMono(.caption)) |
86 | .font(.gbMono(.caption)) |
| |
87 | .fixedSize() |
| 86 | } |
88 | } |
| |
89 | .lineLimit(1) |
| 87 | .font(.gbSans(.caption)) |
90 | .font(.gbSans(.caption)) |
| 88 | .foregroundStyle(.secondary) |
91 | .foregroundStyle(.secondary) |
| 89 | } |
92 | } |
gitbay/Views/Issues/IssueView.swift
+1
| @@ -41,6 +41,7 @@ struct IssueView: View { |
| 41 | } |
41 | } |
| 42 | } |
42 | } |
| 43 | .overlay { LoadStateOverlay(state: model.state) } |
43 | .overlay { LoadStateOverlay(state: model.state) } |
| |
44 | .scrollDismissesKeyboard(.interactively) |
| 44 | .navigationTitle("#\(model.number)") |
45 | .navigationTitle("#\(model.number)") |
| 45 | .navigationBarTitleDisplayMode(.inline) |
46 | .navigationBarTitleDisplayMode(.inline) |
| 46 | .toolbar { toolbar } |
47 | .toolbar { toolbar } |
gitbay/Views/MRs/MRListView.swift
+1
| @@ -145,6 +145,7 @@ private struct MRCreateSheet: View { |
| 145 | } |
145 | } |
| 146 | } |
146 | } |
| 147 | } |
147 | } |
| |
148 | .scrollDismissesKeyboard(.interactively) |
| 148 | .navigationTitle("New Merge Request") |
149 | .navigationTitle("New Merge Request") |
| 149 | .navigationBarTitleDisplayMode(.inline) |
150 | .navigationBarTitleDisplayMode(.inline) |
| 150 | .toolbar { |
151 | .toolbar { |
gitbay/Views/MRs/MRView.swift
+1
| @@ -71,6 +71,7 @@ struct MRView: View { |
| 71 | } |
71 | } |
| 72 | } |
72 | } |
| 73 | .overlay { LoadStateOverlay(state: model.state) } |
73 | .overlay { LoadStateOverlay(state: model.state) } |
| |
74 | .scrollDismissesKeyboard(.interactively) |
| 74 | .navigationTitle("!\(model.number)") |
75 | .navigationTitle("!\(model.number)") |
| 75 | .navigationBarTitleDisplayMode(.inline) |
76 | .navigationBarTitleDisplayMode(.inline) |
| 76 | .toolbar { toolbar } |
77 | .toolbar { toolbar } |
gitbay/Views/Releases/ReleaseListView.swift
+1
| @@ -118,6 +118,7 @@ private struct ReleaseCreateSheet: View { |
| 118 | } |
118 | } |
| 119 | } |
119 | } |
| 120 | } |
120 | } |
| |
121 | .scrollDismissesKeyboard(.interactively) |
| 121 | .navigationTitle("New Release") |
122 | .navigationTitle("New Release") |
| 122 | .navigationBarTitleDisplayMode(.inline) |
123 | .navigationBarTitleDisplayMode(.inline) |
| 123 | .toolbar { |
124 | .toolbar { |
gitbay/Views/Repos/FileEditSheet.swift
+1
| @@ -44,6 +44,7 @@ struct FileEditSheet: View { |
| 44 | } |
44 | } |
| 45 | } |
45 | } |
| 46 | } |
46 | } |
| |
47 | .scrollDismissesKeyboard(.interactively) |
| 47 | .navigationTitle("Edit") |
48 | .navigationTitle("Edit") |
| 48 | .navigationBarTitleDisplayMode(.inline) |
49 | .navigationBarTitleDisplayMode(.inline) |
| 49 | .toolbar { |
50 | .toolbar { |
gitbay/Views/Shared/ComposeSheet.swift
+1
| @@ -81,6 +81,7 @@ struct ComposeSheet: View { |
| 81 | } |
81 | } |
| 82 | } |
82 | } |
| 83 | } |
83 | } |
| |
84 | .scrollDismissesKeyboard(.interactively) |
| 84 | .navigationTitle(heading) |
85 | .navigationTitle(heading) |
| 85 | .navigationBarTitleDisplayMode(.inline) |
86 | .navigationBarTitleDisplayMode(.inline) |
| 86 | .toolbar { |
87 | .toolbar { |
gitbay/Views/Shared/MarkupPreview.swift
+7
| @@ -27,6 +27,13 @@ struct MarkupPreview: View { |
| 27 | .font(.gbSans(.subheadline)) |
27 | .font(.gbSans(.subheadline)) |
| 28 | } |
28 | } |
| 29 | .accessibilityIdentifier(identifier) |
29 | .accessibilityIdentifier(identifier) |
| |
30 | // The keyboard would cover the rendered text. |
| |
31 | .onChange(of: expanded) { _, isExpanded in |
| |
32 | if isExpanded { |
| |
33 | UIApplication.shared.sendAction(#selector(UIResponder.resignFirstResponder), |
| |
34 | to: nil, from: nil, for: nil) |
| |
35 | } |
| |
36 | } |
| 30 | } |
37 | } |
| 31 | |
38 | |
| 32 | /// The format a file's contents render in, or nil for a file shown as |
39 | /// The format a file's contents render in, or nil for a file shown as |