Skip to content

Refine mouse button shortcut toggles#164

Merged
pablopunk merged 1 commit into
mainfrom
refactor/mouse-button-toggles
Jun 11, 2026
Merged

Refine mouse button shortcut toggles#164
pablopunk merged 1 commit into
mainfrom
refactor/mouse-button-toggles

Conversation

@pablopunk

@pablopunk pablopunk commented Jun 11, 2026

Copy link
Copy Markdown
Owner

Summary

  • replace the Left/Right/Both mouse shortcut picker with independent Left and Right toggles
  • preserve internal MouseButton.both behavior and saved preference compatibility
  • make shortcut rows use equal-width columns and narrow the settings window
  • regenerate light/dark marketing screenshots and mouse feature crops

Validation

  • xcodebuild -project "Swift Shift.xcodeproj" -scheme "Swift Shift" -configuration Debug build
  • .agents/skills/screenshots/bin/capture-swiftshift-screenshots.sh

Summary by CodeRabbit

  • UI Improvements
    • Adjusted main window width for optimized layout
    • Restructured keyboard and mouse trigger selection interface with improved responsiveness
    • Enhanced accessibility support with updated metadata and help text
    • Improved trigger conflict error messaging for clearer user feedback

@vercel

vercel Bot commented Jun 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
swiftshift-app Ready Ready Preview, Comment Jun 11, 2026 3:03pm

@coderabbitai

coderabbitai Bot commented Jun 11, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 04e624f7-82c8-4e39-8e62-6cfef9aa83d5

📥 Commits

Reviewing files that changed from the base of the PR and between 36c4e11 and dc9b712.

⛔ Files ignored due to path filters (4)
  • www/src/images/mouse-dark.jpg is excluded by !**/*.jpg
  • www/src/images/mouse-light.jpg is excluded by !**/*.jpg
  • www/src/images/screenshot-dark.jpg is excluded by !**/*.jpg
  • www/src/images/screenshot-light.jpg is excluded by !**/*.jpg
📒 Files selected for processing (2)
  • Swift Shift/src/Constants.swift
  • Swift Shift/src/View/ShortcutView.swift

Walkthrough

This PR refactors ShortcutView's trigger UI to use flexible grid layouts instead of fixed-width stacks. The keyboard and mouse trigger rows now share a LazyVGrid-based layout with flexible column definitions. The ShortcutRecorderView expands to fill available width, and keyboard enablement visuals are simplified. The mouse button picker is rewritten to support only left/right selection, backed by two new helper functions that centralize selection state logic and enforce constraints. Window width is reduced by 20 points, and trigger error handling is generalized to a common API.

Possibly related PRs

  • pablopunk/SwiftShift#159: Implements .both mouse-chord enablement and shortcut handling that aligns with the mouse button selection logic refactored in this PR.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codesandbox

codesandbox Bot commented Jun 11, 2026

Copy link
Copy Markdown

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

@pablopunk pablopunk merged commit cbedc78 into main Jun 11, 2026
6 of 7 checks passed
@pablopunk pablopunk deleted the refactor/mouse-button-toggles branch June 11, 2026 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant