Update geometry and shape style#910
Conversation
🤖 Augment PR SummarySummary: This PR completes GeometryReader geometry handling and expands shape-style/background/overlay behavior to match SwiftUI semantics, including container-relative shapes and anchored shape styles. Changes:
Technical Notes: Background/overlay style rendering is now anchored to view bounds and constrained by the current container shape, improving environment propagation to primary content. 🤖 Was this summary useful? React with 👍 or 👎 |
| _openSwiftUIUnimplementedFailure() | ||
| Update.perform { | ||
| var rect = r | ||
| placementContext.map { rect.convert(from: $0, to: coordinateSpace) } |
There was a problem hiding this comment.
GeometryProxy.rect(_:in:) returns the input rect unchanged when placementContext is nil, which can make frame(in:) report a local-space rect even when the caller requests a different coordinate space (previously this path returned .zero). Consider handling the nil-context case consistently to avoid silently incorrect frames.
Severity: medium
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.
| _openSwiftUIUnimplementedFailure() | ||
| // TBA: ViewTransform | ||
| transform.convert(.localToSpace(coordinateSpace.coordinateSpace), point: globalPoint) | ||
| } |
There was a problem hiding this comment.
GeometryProxy.convert(globalPoint:to:) takes a globalPoint but calls transform.convert(.localToSpace(...), point: globalPoint), which looks like an inverted conversion direction for this API and could yield incorrect coordinates. If this is intentional, it might be worth clarifying the expected input space here.
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 #910 +/- ##
==========================================
- Coverage 26.35% 26.11% -0.24%
==========================================
Files 710 712 +2
Lines 49537 49960 +423
==========================================
- Hits 13053 13047 -6
- Misses 36484 36913 +429 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Summary
Close #474
ContainerRelativeShapeand container shape propagation.