Stop text wrapping in the Changes tab on iPhone

This commit is contained in:
Ian Gulliver
2026-10-21 22:21:09 -07:00
parent f0f44893c8
commit 0efdc8651f
+47 -19
View File
@@ -242,33 +242,61 @@ private struct ChangesHead: View {
@Environment(Overlays.self) private var overlays
var body: some View {
HStack(alignment: .center, spacing: 12) {
VStack(alignment: .leading, spacing: 4) {
if let n = model.pinned {
SnapWhere(n: n)
}
summary
.font(Fonts.font(11))
.foregroundStyle(Palette.muted)
.textSelection(.enabled)
ViewThatFits(in: .horizontal) {
HStack(alignment: .center, spacing: 12) {
info
Spacer(minLength: 0)
controls
}
Spacer(minLength: 0)
if let taskId = store.selectedTaskId, let drafts = store.drafts {
let n = drafts.lineComments(taskId).filter(lineCommentReady(store.images, taskId)).count
if n > 0 {
Button("Send \(n) \(n == 1 ? "comment" : "comments")") {
sendComments(taskId, drafts)
VStack(alignment: .leading, spacing: 6) {
info
ViewThatFits(in: .horizontal) {
toggle
ScrollView(.horizontal) {
toggle
}
.buttonStyle(WebButtonStyle(primary: true))
.fixedSize()
.help("Send the line comments to the task's agent as one message")
.fixedSize(horizontal: false, vertical: true)
}
send
}
toggle
}
.modifier(HeaderBar())
}
private var info: some View {
VStack(alignment: .leading, spacing: 4) {
if let n = model.pinned {
SnapWhere(n: n)
}
summary
.font(Fonts.font(11))
.foregroundStyle(Palette.muted)
.textSelection(.enabled)
}
}
private var controls: some View {
HStack(spacing: 12) {
send
toggle
}
}
@ViewBuilder
private var send: some View {
if let taskId = store.selectedTaskId, let drafts = store.drafts {
let n = drafts.lineComments(taskId).filter(lineCommentReady(store.images, taskId)).count
if n > 0 {
Button("Send \(n) \(n == 1 ? "comment" : "comments")") {
sendComments(taskId, drafts)
}
.buttonStyle(WebButtonStyle(primary: true))
.fixedSize()
.help("Send the line comments to the task's agent as one message")
}
}
}
private func sendComments(_ taskId: String, _ drafts: Drafts) {
let sent = drafts.takeLineComments(taskId, ready: lineCommentReady(store.images, taskId))
let keys = sent.map { lineCommentImageKey(taskId, $0.anchor) }