Skip to content

feat(preview): implement PreviewProvider APIs - #1175

Merged
Kyle-Ye merged 5 commits into
mainfrom
feature/preview_provider
Oct 17, 2026
Merged

Kyle-Ye merged 5 commits into
mainfrom
feature/preview_provider

Conversation

@Kyle-Ye

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

Copy link
Copy Markdown
Member

Summary

  • Implement PreviewProvider, preview configuration APIs and modifiers, and per-child preview extraction.
  • Enable legacy providers in Xcode previews on iOS devices and simulators, macOS, and visionOS while preserving preview settings and context.
  • Add a legacy provider example alongside the macro preview.

Closes #1157

@github-actions github-actions Bot added area: compatibility Compatibility, availability, legacy support, and cross-version behavior. area: example Example apps, previews, sample projects, screenshots, or demo assets. area: view View APIs, modifiers, AnyView, ForEach, DynamicView, and related behavior. type: feature New API, behavior, platform support, or user-facing capability. labels Oct 17, 2026
@tuist

tuist Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

🛠️ Tuist Run Report 🛠️

Tests 🧪

Scheme Status Ran test modules Commit
OpenSwiftUI ✅ 7 b0372e0e6

Builds 🔨

Scheme Status Duration Commit
OpenSwiftUI ✅ 1m 15s b0372e0e6

@codecov

codecov Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0.68027% with 146 lines in your changes missing coverage. Please review.
✅ Project coverage is 29.40%. Comparing base (4916d29) to head (0be4461).

Files with missing lines Patch % Lines
...penSwiftUI/Integration/LegacyPreviewProvider.swift 0.00% 57 Missing ⚠️
Sources/OpenSwiftUI/Preview/PreviewProvider.swift 0.00% 57 Missing ⚠️
Sources/OpenSwiftUI/Test/ViewContentTest.swift 0.00% 31 Missing ⚠️
...ICore/View/VariadicView/VariadicViewChildren.swift 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1175      +/-   ##
==========================================
- Coverage   29.42%   29.40%   -0.03%     
==========================================
  Files         943      946       +3     
  Lines       74697    74842     +145     
==========================================
+ Hits        21982    22005      +23     
- Misses      52715    52837     +122     

☔ 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 4221d0b into main Oct 17, 2026
7 checks passed
@Kyle-Ye
Kyle-Ye deleted the feature/preview_provider branch October 17, 2026 20:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: compatibility Compatibility, availability, legacy support, and cross-version behavior. area: example Example apps, previews, sample projects, screenshots, or demo assets. 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.

Add PreviewProvider support

1 participant