Skip to content

feat(event): add macOS responder command support - #1245

Merged
Kyle-Ye merged 5 commits into
mainfrom
feature/command
Nov 3, 2026
Merged

Kyle-Ye merged 5 commits into
mainfrom
feature/command

Conversation

@Kyle-Ye

@Kyle-Ye Kyle-Ye commented Nov 2, 2026

Copy link
Copy Markdown
Member

Summary

  • Add onCommand and onMoveCommand to handle selector and arrow-key commands in focused views.
  • Connect NSHostingView to command dispatch and menu validation, with a forwarding target for registered selectors.
  • Add a macOS example for arrow keys, Escape, menu actions, and disabled command handling.

Validation

  • The example passes type checking with SwiftUI and OpenSwiftUI.

@Kyle-Ye
Kyle-Ye requested a review from Mx-Iris as a code owner November 2, 2026 19:31
@github-actions github-actions Bot added area: event-gesture Events, gestures, tracing, or interaction plumbing. area: example Example apps, previews, sample projects, screenshots, or demo assets. area: hosting-bridge SwiftUI bridge, UIHosting/NSHosting, representables, and platform host views. platform: macOS macOS-specific behavior or support. type: feature New API, behavior, platform support, or user-facing capability. labels Nov 2, 2026
@tuist

tuist Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

🛠️ Tuist Run Report 🛠️

Tests 🧪

Scheme Status Ran test modules Commit
OpenSwiftUI ✅ 7 69919a3b6

Builds 🔨

Scheme Status Duration Commit
OpenSwiftUI ✅ 49.5s 69919a3b6

@codecov

codecov Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 14.49275% with 59 lines in your changes missing coverage. Please review.
✅ Project coverage is 31.60%. Comparing base (80211c5) to head (77c05bf).

Files with missing lines Patch % Lines
...ntegration/Hosting/AppKit/View/NSHostingView.swift 25.00% 30 Missing ⚠️
...tUI/Event/Command/ResponderCommandPreference.swift 0.00% 22 Missing ⚠️
...ources/OpenSwiftUI/Event/Command/MoveCommand.swift 0.00% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1245      +/-   ##
==========================================
+ Coverage   31.59%   31.60%   +0.01%     
==========================================
  Files        1011     1013       +2     
  Lines       82255    82320      +65     
==========================================
+ Hits        25990    26021      +31     
- Misses      56265    56299      +34     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Kyle-Ye
Kyle-Ye merged commit e693ac1 into main Nov 3, 2026
7 checks passed
@Kyle-Ye
Kyle-Ye deleted the feature/command branch November 3, 2026 03:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: event-gesture Events, gestures, tracing, or interaction plumbing. area: example Example apps, previews, sample projects, screenshots, or demo assets. area: hosting-bridge SwiftUI bridge, UIHosting/NSHosting, representables, and platform host views. platform: macOS macOS-specific behavior or support. type: feature New API, behavior, platform support, or user-facing capability.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant