Skip to content

feat(toggle): implement toggle styles for iOS and macOS - #1148

Merged
Kyle-Ye merged 28 commits into
mainfrom
feature/toggle_style
Oct 15, 2026
Merged

Kyle-Ye merged 28 commits into
mainfrom
feature/toggle_style

Conversation

@Kyle-Ye

@Kyle-Ye Kyle-Ye commented Oct 14, 2026

Copy link
Copy Markdown
Member

Summary

  • Select toggle styles for each platform and control context, and add macOS checkbox rendering and button selection backgrounds.
  • Preserve mixed state and add toggle accessibility traits, values, actions, hand gesture shortcuts, and native AppKit button accessibility integration.
  • Add temporal layout and archived state types used by interactive toggle configuration.
  • Document public toggle APIs and add snapshot coverage for each public style.

@Kyle-Ye
Kyle-Ye requested a review from Mx-Iris as a code owner October 14, 2026 19:55
@Kyle-Ye

Kyle-Ye commented Oct 14, 2026

Copy link
Copy Markdown
Member Author

/uitest osui-iag update only-testing=OpenSwiftUIUITests/ToggleUITests

@github-actions github-actions Bot added area: accessibility Accessibility APIs, settings, semantics, or behavior. area: tests Test suites, UI tests, fixtures, snapshots, and test support code. area: view View APIs, modifiers, AnyView, ForEach, DynamicView, and related behavior. type: feature New API, behavior, platform support, or user-facing capability. labels Oct 14, 2026
@tuist

tuist Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

🛠️ Tuist Run Report 🛠️

Tests 🧪

Scheme Status Ran test modules Commit
OpenSwiftUI ✅ 7 4b2af5ce4

Builds 🔨

Scheme Status Duration Commit
OpenSwiftUI ✅ 49.3s 4b2af5ce4

@codecov

codecov Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0.17873% with 1117 lines in your changes missing coverage. Please review.
✅ Project coverage is 29.57%. Comparing base (ee1cf1d) to head (b9df442).
⚠️ Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
...s/OpenSwiftUI/View/ArchivedView/ArchivedView.swift 0.00% 233 Missing ⚠️
Sources/OpenSwiftUI/Layout/TemporalStack.swift 0.00% 173 Missing ⚠️
.../OpenSwiftUI/View/Toggle/CheckboxToggleStyle.swift 0.00% 118 Missing ⚠️
...I/Accessibility/AccessibilityAppIntentAction.swift 0.00% 96 Missing ⚠️
Sources/OpenSwiftUI/View/Toggle/ToggleStyle.swift 0.00% 94 Missing ⚠️
...tUI/Accessibility/AccessibilityConfiguration.swift 0.00% 69 Missing ⚠️
Sources/OpenSwiftUI/View/Toggle/Toggle.swift 0.00% 53 Missing ⚠️
...s/OpenSwiftUI/View/Toggle/DefaultToggleStyle.swift 0.00% 45 Missing ⚠️
...wiftUI/Event/Gesture/ExternalGestureModifier.swift 0.00% 38 Missing ⚠️
...nSwiftUI/Accessibility/AccessibilityPlatform.swift 0.00% 29 Missing ⚠️
... and 20 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1148      +/-   ##
==========================================
- Coverage   30.43%   29.57%   -0.87%     
==========================================
  Files         913      937      +24     
  Lines       71182    74325    +3143     
==========================================
+ Hits        21662    21978     +316     
- Misses      49520    52347    +2827     

☔ 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 9eba1a2 into main Oct 15, 2026
8 checks passed
@Kyle-Ye
Kyle-Ye deleted the feature/toggle_style branch October 15, 2026 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: accessibility Accessibility APIs, settings, semantics, or behavior. area: tests Test suites, UI tests, fixtures, snapshots, and test support code. area: view View APIs, modifiers, AnyView, ForEach, DynamicView, and related behavior. 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