✨ Radial menu customizability#934
Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces customizability for the radial menu, allowing users to configure actions as either standard WindowActions or references to existing keybinds. When linked to a keybind, changes to the keybind are automatically reflected in the radial menu. The implementation also includes a visual guide in the settings window to help users understand the radial menu layout.
Key changes:
- Replaced optional
WindowAction?with non-optionalWindowActionthroughout the codebase, using.noActionand.noSelectionas explicit states - Improved type safety by changing angle calculations from
CGFloattoAngletype - Modified radial menu logic to use user-configured actions when customization is enabled
- Added localization strings for new customization features
Reviewed changes
Copilot reviewed 37 out of 37 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| Loop/Stashing/StashedWindowStore.swift | Changed action comparison from isSameManipulation to direct ID comparison for consistency with new action model |
| Loop/Stashing/StashManager.swift | Updated action comparison logic to use ID-based equality check |
| Loop/Localizable.xcstrings | Added localization strings for radial menu customization features and updated version to 1.1 |
| Loop/Extensions/View+Extensions.swift | Added onChange(of:initial:) helper methods to support executing actions on both initial appearance and subsequent changes |
| Loop/Extensions/Defaults+Extensions.swift | Added enableRadialMenuCustomization defaults key to toggle customization feature |
| Loop/Extensions/CGGeometry+Extensions.swift | Improved type safety by changing angle(to:) return type from CGFloat to Angle |
| Loop/Core/Observers/MouseInteractionObserver.swift | Updated to use user-configured radial menu actions and handle failed keybind resolution with proper fallback |
| Loop/Core/Observers/MiddleClickTrigger.swift | Changed callback signature from WindowAction? to WindowAction for type safety |
| Loop/Core/Observers/KeybindTrigger.swift | Updated to use non-optional WindowAction with explicit .noSelection state |
| Loop/Core/Observers/Helpers/TriggerDelayTimer.swift | Replaced optional WindowAction? with non-optional default value |
| Loop/Core/Observers/Helpers/DoubleClickTimer.swift | Updated callback signature to use non-optional WindowAction |
| Loop/Core/LoopManager.swift | Simplified logic by removing nil checks for startingAction, now guaranteed to be non-nil |
| Loop.xcodeproj/project.pbxproj | Removed SwiftFormat build phase from project configuration |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
# Conflicts: # Loop/Extensions/View+Extensions.swift # Loop/Settings Window/SettingsWindowManager.swift
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 43 out of 43 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Each custom action can:
When radial menu customization is active, a visual guide will appear over the radial menu in the settings window to help visualize each action.