Skip to content

feat: add gradient APIs and paint support - #1226

Merged
Kyle-Ye merged 18 commits into
mainfrom
feature/gradient
Oct 28, 2026
Merged

Kyle-Ye merged 18 commits into
mainfrom
feature/gradient

Conversation

@Kyle-Ye

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

Copy link
Copy Markdown
Member

Summary

  • Implement Gradient, AnyGradient, color sampling, and gradient shape styles.
  • Add resolved gradient animation, paint serialization, and GraphicsContext shading.
  • Integrate gradient paints with shape-style rendering, color conversion, and widget tint.
  • Add shared gradient examples and API regression coverage.

Refs #502

@github-actions github-actions Bot added area: graphics Color, shape, gradient, image, symbols, and graphics primitives. area: rendering DisplayList, render backends, renderer hosts, drawing, and effects. type: feature New API, behavior, platform support, or user-facing capability. labels Oct 25, 2026
@Kyle-Ye Kyle-Ye linked an issue Oct 25, 2026 that may be closed by this pull request
@github-actions github-actions Bot added area: animation Animation, transitions, transactions, or timing behavior. area: example Example apps, previews, sample projects, screenshots, or demo assets. area: tests Test suites, UI tests, fixtures, snapshots, and test support code. labels Oct 25, 2026
@tuist

tuist Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

🛠️ Tuist Run Report 🛠️

Tests 🧪

Scheme Status Ran test modules Commit
OpenSwiftUI ✅ 7 83854e233

Builds 🔨

Scheme Status Duration Commit
OpenSwiftUI ✅ 56.1s 83854e233

@codecov

codecov Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 43.78834% with 733 lines in your changes missing coverage. Please review.
✅ Project coverage is 31.57%. Comparing base (352f856) to head (d27dd9f).

Files with missing lines Patch % Lines
...enSwiftUICore/Graphic/Gradient/GradientStyle.swift 17.15% 367 Missing ⚠️
...OpenSwiftUICore/Graphic/Gradient/AnyGradient.swift 0.00% 147 Missing ⚠️
...rces/OpenSwiftUICore/Graphic/GraphicsContext.swift 0.00% 68 Missing ⚠️
...ICore/Graphic/Gradient/GradientColorProvider.swift 0.00% 38 Missing ⚠️
...tUICore/Shape/ShapeStyle/ShapeStyleRendering.swift 0.00% 33 Missing ⚠️
Sources/OpenSwiftUICore/Graphic/Color/Paint.swift 56.60% 23 Missing ⚠️
...ftUICore/Graphic/Gradient/GradientColorSpace.swift 0.00% 16 Missing ⚠️
.../OpenSwiftUICore/Shape/ShapeStyle/ShapeStyle.swift 0.00% 14 Missing ⚠️
.../OpenSwiftUICore/Graphic/Color/ConstantColor.swift 50.00% 9 Missing ⚠️
...SwiftUICore/Graphic/Color/CGColorConversions.swift 0.00% 6 Missing ⚠️
... and 3 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1226      +/-   ##
==========================================
+ Coverage   31.21%   31.57%   +0.35%     
==========================================
  Files         977      981       +4     
  Lines       78984    80196    +1212     
==========================================
+ Hits        24655    25322     +667     
- Misses      54329    54874     +545     

☔ 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 added this to the 0.25.0 milestone Oct 27, 2026
@Kyle-Ye
Kyle-Ye merged commit 72b3a34 into main Oct 28, 2026
7 checks passed
@Kyle-Ye
Kyle-Ye deleted the feature/gradient branch October 28, 2026 16:37
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: example Example apps, previews, sample projects, screenshots, or demo assets. area: graphics Color, shape, gradient, image, symbols, and graphics primitives. area: rendering DisplayList, render backends, renderer hosts, drawing, and effects. area: tests Test suites, UI tests, fixtures, snapshots, and test support code. 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 Gradient support

1 participant