Skip to content

Commit 9c13b43

Browse files
crazytanclaude
andcommitted
Add UX tweaks to task rows: tooltips, pointer cursor, delete button
- Show pointing hand cursor when hovering over the checkbox button - Add tooltips to checkbox ("Mark as complete/incomplete"), plus ("Add subtask"), and delete ("Delete task") buttons - Add visible-on-hover delete button (trash icon) to the right of the add subtask button, hidden for completed tasks Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 1044930 commit 9c13b43

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

TaskMenu/Views/TaskRowView.swift

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,14 @@ struct TaskRowView: View {
8989
.scaleEffect(checkmarkScale)
9090
}
9191
.buttonStyle(.plain)
92+
.onHover { hovering in
93+
if hovering {
94+
NSCursor.pointingHand.push()
95+
} else {
96+
NSCursor.pop()
97+
}
98+
}
99+
.help(task.isCompleted ? "Mark as incomplete" : "Mark as complete")
92100
.accessibilityIdentifier("task.checkbox.\(task.id)")
93101

94102
VStack(alignment: .leading, spacing: 2) {
@@ -120,8 +128,20 @@ struct TaskRowView: View {
120128
.frame(width: 24, height: 24)
121129
}
122130
.buttonStyle(.plain)
131+
.help("Add subtask")
123132
.opacity(isHovering ? 1 : 0)
124133
}
134+
135+
if isHovering && !task.isCompleted {
136+
Button(action: onDelete) {
137+
Image(systemName: "trash")
138+
.font(.system(size: 12, weight: .medium))
139+
.foregroundStyle(.secondary)
140+
.frame(width: 24, height: 24)
141+
}
142+
.buttonStyle(.plain)
143+
.help("Delete task")
144+
}
125145
}
126146
.padding(.vertical, TaskRowLayout.verticalPadding)
127147
.padding(.leading, TaskRowLayout.leadingPadding)

0 commit comments

Comments
 (0)