Skip to content

feat(path): complete Path implementation and Shape rendering classification - #1258

Merged
Kyle-Ye merged 22 commits into
mainfrom
feature/path_shape
Nov 22, 2026
Merged

Kyle-Ye merged 22 commits into
mainfrom
feature/path_shape

Conversation

@Kyle-Ye

@Kyle-Ye Kyle-Ye commented Nov 22, 2026

Copy link
Copy Markdown
Member

Summary

  • Complete Path and PathBox backed by OpenRenderBox storage, covering subpath construction, rounded and uneven rounded rectangles, arcs, point and batch containment (eoFill and non-zero winding), affine transforms, point mapping, trimming, stroking, interpolation, boolean region and line operations, string parsing and formatting, cgPath conversion, and Protobuf serialization across Darwin and non-Darwin platforms.
  • Add CoreGraphics CGPath rounded-rectangle and string shims on non-Darwin platforms along with Data/CFData and String/CFString CoreFoundation bridges, and remove the obsolete OPENSWIFTUI_CF_CGTYPES build conditional.
  • Complete built-in InsettableShape inset path generation, StrokeStyle(ORBPathStrokeStyle) initialization, and ShapeLayer ShapeType classification for filled rectangles, uniform rounded rectangles, stroked borders, and stroked or custom filled paths.
  • Add --keep-swift-symbols to Scripts/build_xcframework.sh for local slice builds without changing standard distribution stripping.
  • Expand parameterized unit tests for Path, TrimmedPath, FixedRoundedRect, and CGPath helpers, add Path and Shape examples and UI snapshot suites, and restore path, stroke, and border modifiers in existing examples.

Validation

  • Parameterized Path, TrimmedPath, FixedRoundedRect, Data, and String unit test suites passed on macOS and Linux (Swift 6.3.3).
  • ShapeUITests, PathUITests, and BackgroundStyleUITests snapshot comparisons matched SwiftUI baselines across all enabled cases on macOS and iOS 18.5 Simulator.

Dependency

Closes #1163

Classify boxed paths via ORBPath.applyShape into filled rectangles, uniform rounded rectangles, stroked borders, and stroked path fallbacks.
Initialize StrokeStyle directly from ORBPathStrokeStyle for stroked shape classification, and update DarwinPrivateFrameworks and OpenRenderBox revisions.
Remove PathDataGetCGPathCallbacks and use ORBPath.Callbacks.cgPath directly in PathBox.withRBPath, and update DarwinPrivateFrameworks and OpenRenderBox revisions.
Provide _CGPathCreateRoundedRect on non-Darwin platforms to enable FixedRoundedRect.cgPath and Path.cgPath unconditionally, expand cross-platform path test coverage, and update OpenCoreGraphics revision.
… platforms

Add String/CFString bridging helpers and non-Darwin _CGPathParseString and _CGPathCopyDescription shims, removing the remaining platform conditionals from Path.swift.
Select the C PathData union on Darwin and the Swift PathData layout on non-Darwin platforms directly, and update OpenRenderBox revision.
@Kyle-Ye Kyle-Ye added this to the 0.26.0 milestone Nov 22, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-22T10:10:36.102074Z 8ff339f New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@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. 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. labels Nov 22, 2026

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1c6e04ef49

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Kyle-Ye

Kyle-Ye commented Nov 22, 2026

Copy link
Copy Markdown
Member Author

/uitest osui-iag update

@codecov

codecov Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 74.48426% with 235 lines in your changes missing coverage. Please review.
✅ Project coverage is 31.90%. Comparing base (808ef19) to head (8ff339f).

Files with missing lines Patch % Lines
Sources/OpenSwiftUICore/Shape/ShapeLayer.swift 0.00% 107 Missing ⚠️
Sources/OpenSwiftUICore/Shape/Path.swift 85.04% 80 Missing ⚠️
...ources/OpenSwiftUICore/Shape/InsettableShape.swift 0.00% 23 Missing ⚠️
Sources/OpenSwiftUICore/Shape/StrokeStyle.swift 0.00% 12 Missing ⚠️
...es/OpenSwiftUICore/Shim/CGPathNonDarwinShims.swift 95.34% 10 Missing ⚠️
...UICore/Render/DisplayList/DisplayListPrinter.swift 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1258      +/-   ##
==========================================
+ Coverage   31.16%   31.90%   +0.73%     
==========================================
  Files        1018     1020       +2     
  Lines       83439    84061     +622     
==========================================
+ Hits        26007    26816     +809     
+ Misses      57432    57245     -187     

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

@tuist

tuist Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

🛠️ Tuist Run Report 🛠️

Tests 🧪

Scheme Status Ran test modules Commit
OpenSwiftUI ✅ 7 91cb0b75c

Builds 🔨

Scheme Status Duration Commit
OpenSwiftUI ✅ 4m 19s 91cb0b75c

Reported by Tuist, faster builds and reliable tests for Xcode, Gradle, Bazel, and more.

@github-actions github-actions Bot added the area: tooling Developer tooling, package manifests, Tuist, scripts, formatting, or release tooling. label Nov 22, 2026
@Kyle-Ye
Kyle-Ye merged commit ba82037 into main Nov 22, 2026
7 checks passed
@Kyle-Ye
Kyle-Ye deleted the feature/path_shape branch November 22, 2026 10:29
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. area: rendering DisplayList, render backends, renderer hosts, drawing, and effects. area: tests Test suites, UI tests, fixtures, snapshots, and test support code. area: tooling Developer tooling, package manifests, Tuist, scripts, formatting, or release tooling. type: feature New API, behavior, platform support, or user-facing capability.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Complete native Path storage on OpenRenderBox

1 participant