Fix image rendering and add vector glyph support#816
Conversation
🤖 Augment PR SummarySummary: This PR improves SF Symbol/vector-glyph image rendering and adds initial vector-glyph support. Changes:
Technical Notes: Multi-layer symbol rendering is intentionally deferred; current implementation focuses on correct lookup, sizing/metrics, and single-layer template rendering. 🤖 Was this summary useful? React with 👍 or 👎 |
| _openSwiftUIUnimplementedFailure() | ||
| // TODO: RBSymbolAnimator/RBSymbolUpdate | ||
| // We use a plain implementation for now | ||
| _openSwiftUIUnimplementedWarning() |
There was a problem hiding this comment.
_openSwiftUIUnimplementedWarning() prints on every call and (in DEBUG && OPENSWIFTUI_DEVELOPMENT) escalates to _openSwiftUIUnimplementedFailure, so invoking it in renderVectorGlyph can become very noisy or crash in dev builds when rendering SF Symbols.
Severity: medium
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #816 +/- ##
===========================================
- Coverage 27.48% 13.93% -13.55%
===========================================
Files 661 626 -35
Lines 42429 37921 -4508
===========================================
- Hits 11661 5286 -6375
- Misses 30768 32635 +1867 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Summary
candidateNameinstead ofnamein vectorInfo lookupresolveVectorto correctly setisTemplate: true, handle background shape/size, and add redaction supportadjustForBackgroundto useCUIVectorGlyphGraphicVariantOptionsproperly and move#if OPENSWIFTUI_LINK_COREUIguards inside methodsrenderVectorGlyphimplementation (single-layer foreground style, TODO for full RBSymbolUpdate multi-layer rendering)Test plan
swift test --filter OpenSwiftUICompatibilityTeststo verify snapshot testsswift buildto confirm compilationsymbolVarient) passes