Skip to content

fix(material): fall back to system colors for foreground material style - #1174

Merged
Kyle-Ye merged 1 commit into
mainfrom
bugfix/material
Oct 17, 2026
Merged

Kyle-Ye merged 1 commit into
mainfrom
bugfix/material

Conversation

@Kyle-Ye

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

Copy link
Copy Markdown
Member

Summary

  • Resolves ForegroundMaterialStyle with system colors instead of stopping with an unimplemented failure. visionOS windows report a vibrant trait, so default foreground content uses this style on visionOS.
  • Removes the Example and HostingExample workarounds that cleared the background material on visionOS.

Closes #1173. Part of #1171.

visionOS windows report a vibrant trait, so the UIKit environment sets a
background material and default foreground content resolves to
ForegroundMaterialStyle. Its _apply crashed as unimplemented. Resolve it
with SystemColorsStyle until material vibrancy is implemented, and remove
the Example workarounds that cleared the background material on visionOS.
@github-actions github-actions Bot added area: example Example apps, previews, sample projects, screenshots, or demo assets. area: graphics Color, shape, gradient, image, symbols, and graphics primitives. platform: visionOS visionOS-specific behavior or support. type: bug Something is not working correctly. 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 32d0e21aa

Builds 🔨

Scheme Status Duration Commit
OpenSwiftUI ✅ 1m 15s 32d0e21aa

@Kyle-Ye
Kyle-Ye merged commit 4916d29 into main Oct 17, 2026
6 checks passed
@Kyle-Ye
Kyle-Ye deleted the bugfix/material branch October 17, 2026 17:48
@codecov

codecov Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 29.42%. Comparing base (1f04a1d) to head (c96346b).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...es/OpenSwiftUICore/Shape/ShapeStyle/Material.swift 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1174      +/-   ##
==========================================
- Coverage   29.43%   29.42%   -0.01%     
==========================================
  Files         943      943              
  Lines       74695    74697       +2     
==========================================
- Hits        21983    21982       -1     
- Misses      52712    52715       +3     

☔ 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: example Example apps, previews, sample projects, screenshots, or demo assets. area: graphics Color, shape, gradient, image, symbols, and graphics primitives. platform: visionOS visionOS-specific behavior or support. type: bug Something is not working correctly.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix the foreground material style crash on visionOS

1 participant