Simplify shortcuts panel with one-per-category cycling#1722
Simplify shortcuts panel with one-per-category cycling#1722MyronKoch wants to merge 2 commits intorxhanson:mainfrom
Conversation
Replace individual shortcut fields for each grid position with a single shortcut per category. Rectangle already cycles through all positions when the same shortcut is pressed repeatedly (via subsequentExecutionMode and *Repeated protocols), so individual position shortcuts are redundant. Before: ~30 shortcut fields in the additional section After: ~8 clean rows (Thirds, Fourths, Sixths, Eighths + 4 Move) Each category shortcut binds to the first action in its category and cycles through every position on repeated presses. For example, the Thirds shortcut cycles: First Third -> Center Third -> Last Third -> First Two Thirds -> Center Two Thirds -> Last Two Thirds. This dramatically improves the settings panel usability, particularly for users with many grid sizes enabled on large displays or multi-monitor arrays where fine-grained window positioning is essential. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add [weak self] to notification subscription closure to prevent PrefsViewController from being retained for the app lifetime - Set translatesAutoresizingMaskIntoConstraints = false on labelStack and row views to avoid autoresizing mask conflicts with stack view Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
With the premise that additional shortcuts are added in the ellipsis button popover in the General tab, it's still logical and acceptable to me to keep all of the existing shortcuts in the Shortcuts tab. However, for the General tab popover, if the 12ths/16ths shortcuts are added in, then that would indeed start getting out of hand. My preferred path forward for adding something like this in is again to make it configurable, though. A checkbox at the top of the popover that hides all non-first shortcut recorders in the popover would likely make it a lot more manageable. |
|
Thanks for the feedback, Ryan. That makes sense - keeping all existing shortcuts in the Shortcuts tab preserves the familiar layout. I've incorporated the popover-based approach into PR #1720 instead: cycling shortcut recorders for Ninths, Twelfths, and Sixteenths live in the General tab's ellipsis popover, with a "Show additional sizes in menu" checkbox controlling the menu submenus. That keeps things manageable without cluttering the Shortcuts tab. Closing this one in favor of the consolidated approach in #1720. |
Summary
Motivation
The current preferences panel lists every individual grid position (sixths, eighths, ninths, etc.) with its own shortcut field, which is overwhelming - especially as more grid sizes are added. Most users want a single shortcut per category that cycles through positions on repeated presses (e.g., press Ctrl+Opt+3 to get first third, press again for center third, again for last third). This is how the left/right half shortcuts already work. This PR extends that pattern to all grid categories and simplifies the UI accordingly.
This is especially valuable for users with large or high-resolution displays (50" 4K TVs, ultrawides) who use many grid categories but don't want to memorize dozens of shortcuts.
How it works
Each category row binds to the first action in that category (e.g.,
.firstThirdfor Thirds). When the user presses the shortcut repeatedly, Rectangle's existing `*Repeated` protocol cycles through all positions in the category. The UI shows a single `MASShortcutView` labeled with the category name (e.g., "Thirds", "Fourths", "Sixths").Changes
PrefsViewController.swift- Programmatically builds category rows in the additional shortcuts section instead of one-per-position IBOutlet rows. Original IBOutlets retained for storyboard compatibility. Left column: Thirds, Fourths, Sixths. Right column: Eighths, Twelfths, Sixteenths. Plus a Move to Edge section.Test plan
🤖 Generated with Claude Code