Skip to content

Add OpenSwiftUI Preview macro support - #1018

Merged
Kyle-Ye merged 4 commits into
mainfrom
optimize/preview_macro
Aug 25, 2026
Merged

Kyle-Ye merged 4 commits into
mainfrom
optimize/preview_macro

Conversation

@Kyle-Ye

@Kyle-Ye Kyle-Ye commented Aug 25, 2026

Copy link
Copy Markdown
Member

Summary

  • add an OpenSwiftUI-specific #Preview overload for OpenSwiftUI.View content
  • preserve names and preview traits while registering hosted views with Xcode Previews
  • update the examples and documentation for view and platform-controller overload selection
  • mirror matching OpenSwiftUIMacros sources into binary package releases

Validation

  • add macro expansion coverage for builder bodies, traits, explicit body expressions, empty bodies, and diagnostics
  • verify Xcode Preview rendering with source and locally built binary package integrations

@github-actions github-actions Bot added area: docs Documentation area label. area: example Example apps, previews, sample projects, screenshots, or demo assets. 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 Aug 25, 2026
@Kyle-Ye
Kyle-Ye force-pushed the optimize/preview_macro branch from 885fcda to 415a5b3 Compare August 25, 2026 18:47
@github-actions github-actions Bot added the area: tooling Developer tooling, package manifests, Tuist, scripts, formatting, or release tooling. label Aug 25, 2026
@tuist

tuist Bot commented Aug 25, 2026 •

Copy link
Copy Markdown

🛠️ Tuist Run Report 🛠️

Tests 🧪

Scheme Status Cache hit rate Tests Skipped Ran Commit
OpenSwiftUI ✅ 0 % 82 0 82 08f3bf7ab

Builds 🔨

Scheme Status Duration Commit
OpenSwiftUI ✅ 2m 19s 08f3bf7ab

@codecov

codecov Bot commented Aug 25, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 85 lines in your changes missing coverage. Please review.
✅ Project coverage is 28.14%. Comparing base (d8f2ae2) to head (415a5b3).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
Sources/OpenSwiftUIMacros/PreviewMacro.swift 0.00% 84 Missing ⚠️
...es/OpenSwiftUIMacros/OpenSwiftUIMacrosPlugin.swift 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1018      +/-   ##
==========================================
- Coverage   28.18%   28.14%   -0.05%     
==========================================
  Files         755      756       +1     
  Lines       59781    59866      +85     
==========================================
  Hits        16851    16851              
- Misses      42930    43015      +85     

☔ 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 9fe101b into main Aug 25, 2026
9 checks passed
@Kyle-Ye
Kyle-Ye deleted the optimize/preview_macro branch August 25, 2026 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: docs Documentation area label. area: example Example apps, previews, sample projects, screenshots, or demo assets. area: tests Test suites, UI tests, fixtures, snapshots, and test support code. area: tooling Developer tooling, package manifests, Tuist, scripts, formatting, or release tooling. 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