Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .Jules/palette.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,11 @@
**Rule:** Rows inside `.onMove` / `.onDrag` containers (chord & sequence lists, profile sidebar, macro steps, command wheel actions) intentionally use `.onTapGesture`. Wrapping them in a `Button` can swallow the mouse-down that starts a drag on macOS, and each row already has an explicit, labeled Edit button for keyboard/VoiceOver users. Never wrap a view that contains its own buttons in another `Button`. PRs doing either will be closed.
## 2026-09-26 - [Maintainer] Stay in scope; never touch debug logging
**Rule:** Do not delete or comment out `#if DEBUG` `print` statements (MappingEngine, LED, ProfileManager, etc.) and do not commit helper scripts. Each PR must change only the files its title describes. Do not add labels/tooltips to buttons that already show the same visible text.

## 2024-11-20 - [Dynamic Accessibility Labels for Form Lists]
**Learning:** Icon-only buttons used to delete items in form lists (like Webhook Headers using minus.circle.fill) lack context if they just say "Remove header", which creates ambiguous accessibility labels for VoiceOver.
**Action:** Interpolate the item's key or context (e.g., `key`) into both `.help()` and `.accessibilityLabel()` strings for item removal buttons in form loops (e.g., `"Remove \(key) header"`).

## 2024-11-20 - [Contextual Accessibility Labels for Linked Controllers]
**Learning:** Using `binding.name` to interpolate the controller's name into a removal button's accessibility label failed because `binding` (a `LinkedControllerBinding`) did not have a `.name` property. It had a `.displayName` property instead.
**Action:** When updating dynamic tooltips/accessibility labels for custom models (like Linked Controllers), always verify the model's actual property names (e.g., using `grep` or `sed -n`) before interpolating them.
Original file line number Diff line number Diff line change
Expand Up @@ -651,8 +651,8 @@ struct MacroStepEditorSheet: View {
Image(systemName: "minus.circle.fill").foregroundColor(.red)
}
.buttonStyle(.plain)
.help("Remove header")
.accessibilityLabel("Remove header")
.help("Remove \(key) header")
.accessibilityLabel("Remove \(key) header")
}
}
HStack {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -461,8 +461,8 @@ struct ActionMappingEditor: View {
.foregroundColor(.red)
}
.buttonStyle(.plain)
.help("Remove header")
.accessibilityLabel("Remove header")
.help("Remove \(key) header")
.accessibilityLabel("Remove \(key) header")
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -653,8 +653,8 @@ struct ChordMappingSheet: View, ControllerTypeProviding {
.foregroundColor(.red)
}
.buttonStyle(.plain)
.help("Remove header")
.accessibilityLabel("Remove header")
.help("Remove \(key) header")
.accessibilityLabel("Remove \(key) header")
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ struct LayerLinkedAppsSheet: View {
.foregroundColor(.red)
}
.buttonStyle(.borderless)
.help("Remove")
.accessibilityLabel("Remove Linked App")
.help("Remove \(bundleId)")
.accessibilityLabel("Remove \(bundleId)")
}
.padding(.vertical, 4)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ struct LinkedAppsSheet: View {
.foregroundColor(.red)
}
.buttonStyle(.borderless)
.help("Remove")
.accessibilityLabel("Remove Linked App")
.help("Remove \(bundleId)")
.accessibilityLabel("Remove \(bundleId)")
}
.padding(.vertical, 4)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ struct LinkedControllersSheet: View {
.foregroundColor(.red)
}
.buttonStyle(.borderless)
.help("Remove")
.accessibilityLabel("Remove Linked Controller")
.help("Remove \(binding.displayName)")
.accessibilityLabel("Remove \(binding.displayName)")
}
.padding(.vertical, 4)
}
Expand Down
Loading