Skip to content

feat(effects): add geometry and color effect APIs - #1139

Merged
Kyle-Ye merged 14 commits into
mainfrom
feature/effect
Oct 11, 2026
Merged

Kyle-Ye merged 14 commits into
mainfrom
feature/effect

Conversation

@Kyle-Ye

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

Copy link
Copy Markdown
Member

Summary

  • Implement affine and projection transforms, and add geometry, color, blur, and blend mode modifiers to VisualEffect.
  • Add brightness, contrast, grayscale, hue rotation, and saturation effects with matching View modifiers.
  • Add transform, rotation, and scale modifiers to HoverEffectContent, and remove unsupported hover SPI aliases.
  • Add repeating scale and rotation animations, and move View.rotation3DEffect to OpenSwiftUI.

Validation

  • Scoped compilation and public/SPI interface checks.
  • Targeted runtime probes for effect values, animation endpoints, parameters, and archive output.

@github-actions github-actions Bot added area: animation Animation, transitions, transactions, or timing behavior. area: rendering DisplayList, render backends, renderer hosts, drawing, and effects. type: feature New API, behavior, platform support, or user-facing capability. labels Oct 11, 2026

@augmentcode augmentcode Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deep Code Review Agent🐛

Review completed with 2 suggestions.

Reviewed commit: e96e3b6

///
/// - Returns: An effect that applies `blendMode` to this view.
public func blendMode(_ blendMode: BlendMode) -> some VisualEffect {
rendererEffect(_BlendModeEffect(blendMode: blendMode))

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VisualEffect.rendererEffect requires its effect argument to be Sendable, but _BlendModeEffect is explicitly given an unavailable Sendable conformance above; this new wrapper therefore relies on an unavailable conformance and can fail to type-check when the new API is compiled.

Severity: high


🤖 Was this useful? React with 👍 or 👎

set { amount = newValue }
}

package func effectValue(size: CGSize) -> DisplayList.Effect {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These new renderer effects add user-facing filter behavior and VisualEffect entry points, but the PR doesn't add committed tests for the DisplayList filter values or public modifiers; existing effect tests only cover scale/rotation animation, so regressions in the new color/blur/blend APIs can pass unnoticed. Other locations where this applies: Sources/OpenSwiftUICore/Render/RendererEffect/ContrastEffect.swift:29, Sources/OpenSwiftUICore/Render/RendererEffect/GrayscaleEffect.swift:29, Sources/OpenSwiftUICore/Render/RendererEffect/HueRotationEffect.swift:29, Sources/OpenSwiftUICore/Render/RendererEffect/SaturationEffect.swift:29.

Severity: medium


🤖 Was this useful? React with 👍 or 👎

@augmentcode

augmentcode Bot commented Oct 11, 2026

Copy link
Copy Markdown
🤖 Augment PR Summary

Summary: Expands SwiftUI-compatible geometry and color effect APIs.

  • Adds affine and projection geometry effects with matching View modifiers.
  • Adds transform, rotation, 3D rotation, and scale modifiers to VisualEffect.
  • Adds animatable brightness, contrast, grayscale, hue rotation, and saturation effects.
  • Exposes these color effects through matching View and VisualEffect modifiers.
  • Adds VisualEffect blur and blend mode modifiers.
  • Adds transform, rotation, and scale modifiers to HoverEffectContent.
  • Adds private repeating scale and rotation animations using appearance animations.
  • Moves View.rotation3DEffect to OpenSwiftUI and removes unsupported hover SPI aliases.
Technical Notes: Reuses existing geometry and display-list pipelines, retains deprecated visual-effect SPI aliases, and uses only affine components for visual projection-transform inputs.

🤖 Was this summary useful? React with 👍 or 👎

@augmentcode augmentcode Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. No suggestions at this time.

Comment augment review to trigger a new review at any time.

@tuist

tuist Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

🛠️ Tuist Run Report 🛠️

Tests 🧪

Scheme Status Ran test modules Commit
Unknown ⏳ 7 e31b37397
OpenSwiftUI ✅ 7 e31b37397

Builds 🔨

Scheme Status Duration Commit
OpenSwiftUI ✅ 1m 41s e31b37397

@codecov

codecov Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 144 lines in your changes missing coverage. Please review.
✅ Project coverage is 30.69%. Comparing base (5def810) to head (e96e3b6).

Files with missing lines Patch % Lines
...penSwiftUI/Render/GeometryEffect/ScaleEffect.swift 0.00% 28 Missing ⚠️
...iftUI/Render/GeometryEffect/Rotation3DEffect.swift 0.00% 23 Missing ⚠️
...wiftUI/Render/GeometryEffect/TransformEffect.swift 0.00% 17 Missing ⚠️
...SwiftUI/Render/GeometryEffect/RotationEffect.swift 0.00% 16 Missing ⚠️
...ICore/Render/RendererEffect/BrightnessEffect.swift 0.00% 8 Missing ⚠️
...tUICore/Render/RendererEffect/ContrastEffect.swift 0.00% 8 Missing ⚠️
...UICore/Render/RendererEffect/GrayscaleEffect.swift 0.00% 8 Missing ⚠️
...Core/Render/RendererEffect/HueRotationEffect.swift 0.00% 8 Missing ⚠️
...ICore/Render/RendererEffect/SaturationEffect.swift 0.00% 8 Missing ⚠️
...iftUI/Render/GeometryEffect/ProjectionEffect.swift 0.00% 6 Missing ⚠️
... and 7 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1139      +/-   ##
==========================================
+ Coverage   26.41%   30.69%   +4.27%     
==========================================
  Files         830      906      +76     
  Lines       62143    71600    +9457     
==========================================
+ Hits        16416    21978    +5562     
- Misses      45727    49622    +3895     

☔ 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 f4486db into main Oct 11, 2026
6 checks passed
@Kyle-Ye
Kyle-Ye deleted the feature/effect branch October 11, 2026 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: animation Animation, transitions, transactions, or timing behavior. area: rendering DisplayList, render backends, renderer hosts, drawing, and effects. 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