Skip to content

Add GeometryActionModifier APIs#915

Merged
Kyle-Ye merged 3 commits into
mainfrom
feature/on_geometrychange
Jun 22, 2026
Merged

Add GeometryActionModifier APIs#915
Kyle-Ye merged 3 commits into
mainfrom
feature/on_geometrychange

Conversation

@Kyle-Ye

@Kyle-Ye Kyle-Ye commented Jun 21, 2026

Copy link
Copy Markdown
Member

Summary

Close #478

  • Add OpenSwiftUI geometry action modifier APIs and provider plumbing.
  • Add binder state handling for geometry-derived value updates.
  • Add a shared geometry action modifier example.

@github-actions github-actions Bot added area: example Example apps, previews, sample projects, screenshots, or demo assets. area: layout Layout, geometry, safe area, alignment, stacks, or sizing. area: view View APIs, modifiers, AnyView, ForEach, DynamicView, and related behavior. type: feature New API, behavior, platform support, or user-facing capability. labels Jun 21, 2026
@codecov

codecov Bot commented Jun 21, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 106 lines in your changes missing coverage. Please review.
✅ Project coverage is 25.93%. Comparing base (ee1226c) to head (44aef80).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...Modifier/ViewModifier/GeometryActionModifier.swift 0.00% 106 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main     #915       +/-   ##
===========================================
+ Coverage   13.81%   25.93%   +12.12%     
===========================================
  Files         676      720       +44     
  Lines       44380    50774     +6394     
===========================================
+ Hits         6130    13170     +7040     
+ Misses      38250    37604      -646     

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

@github-actions github-actions Bot added the area: data-flow State, binding, environment, preference, observation, or property data flow. label Jun 21, 2026
@Kyle-Ye Kyle-Ye changed the title [codex] Add GeometryActionModifier APIs Add GeometryActionModifier APIs Jun 21, 2026
@Kyle-Ye Kyle-Ye force-pushed the feature/on_geometrychange branch from f70eea8 to ca8fa2a Compare June 21, 2026 16:19
@Kyle-Ye

Kyle-Ye commented Jun 21, 2026

Copy link
Copy Markdown
Member Author

/uitest update

@Kyle-Ye Kyle-Ye marked this pull request as ready for review June 21, 2026 16:37
@augmentcode

augmentcode Bot commented Jun 21, 2026

Copy link
Copy Markdown
🤖 Augment PR Summary

Summary: Adds SwiftUI-compatible geometry action modifier APIs to run closures when geometry-derived values change.

Changes:

  • Introduces _GeometryActionModifier (v4) and _GeometryActionModifier2 (v6) plus GeometryActionBinder plumbing.
  • Computes an Equatable/Sendable value from GeometryProxy, tracks reset phases, and uses cycle detectors to prevent repeated updates per frame.
  • Enqueues geometry-change actions via Update.enqueueAction and marks the binder attribute as transactional.
  • Adds View.onGeometryChange(for:of:action:) overloads for new-value-only and old/new-value callbacks.
  • Adds a shared example view and a new UI snapshot test for the modifier.
  • Makes UnaryViewModifier/MultiViewModifier default list-building hooks public/available so cross-module modifiers can rely on them.

🤖 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. 1 suggestion posted.

Fix All in Augment

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

@Kyle-Ye Kyle-Ye force-pushed the feature/on_geometrychange branch from ca8fa2a to 0c7a174 Compare June 21, 2026 16:44
@Kyle-Ye

Kyle-Ye commented Jun 21, 2026

Copy link
Copy Markdown
Member Author

/uitest update

@Kyle-Ye Kyle-Ye force-pushed the feature/on_geometrychange branch from 0c7a174 to 44aef80 Compare June 21, 2026 16:46
@Kyle-Ye

Kyle-Ye commented Jun 21, 2026

Copy link
Copy Markdown
Member Author

/uitest update

@github-actions github-actions Bot added the area: tests Test suites, UI tests, fixtures, snapshots, and test support code. label Jun 21, 2026
@Kyle-Ye

Kyle-Ye commented Jun 22, 2026

Copy link
Copy Markdown
Member Author

/uitest ios update

@Kyle-Ye Kyle-Ye merged commit 64924bc into main Jun 22, 2026
13 checks passed
@Kyle-Ye Kyle-Ye deleted the feature/on_geometrychange branch June 22, 2026 15:12
@Kyle-Ye Kyle-Ye linked an issue Jun 22, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: data-flow State, binding, environment, preference, observation, or property data flow. area: example Example apps, previews, sample projects, screenshots, or demo assets. area: layout Layout, geometry, safe area, alignment, stacks, or sizing. area: tests Test suites, UI tests, fixtures, snapshots, and test support code. area: view View APIs, modifiers, AnyView, ForEach, DynamicView, and related behavior. 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 onGeometryChange modifier

1 participant