You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* feat: add close_workflow button action
Ports RevenueCat/purchases-android#3453 to iOS. Adds a new
`close_workflow` button action that always dismisses the entire paywall,
regardless of workflow step or whether triggered from inside a sheet.
The action flows through the existing pipeline:
- `PaywallComponent.ButtonComponent.Action.closeWorkflow` (serialization)
- `ButtonComponentViewModel.Action.closeWorkflow` (view model)
- `closeWorkflowAction` environment key (set at RootView, propagates
through sheets where local onDismiss only closes the sheet)
- `ButtonComponentView` reads the env key and calls it on tap
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix: preserve close_workflow behavior without public API change
* fix: make close_workflow dismiss the full workflow
* fix: include close workflow marker in button equality
* fix: apply closeWorkflowAction after bottomSheet so sheets inherit it
The environment modifier must be outer to bottomSheet — views created
inside BottomSheetOverlayModifier.body are siblings of content and only
inherit from the modifier's outer context, not from inner modifiers on
the content itself.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* test: add close_workflow mapping and equality regression tests
- ButtonComponentCodableTests: assert that close_workflow and navigate_back
buttons with identical .action values are nonetheless unequal via
isCloseWorkflowAction (Equatable and Hashable both verified)
- ButtonComponentViewModelMappingTests (new file): assert that a decoded
close_workflow button maps to .closeWorkflow in the view model (interaction
value "close_workflow"), and navigate_back maps to .navigateBack
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix: add ButtonComponentViewModelMappingTests.swift to RevenueCat.xcodeproj
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix: add ButtonComponentViewModelMappingTests.swift file reference to xcodeproj
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Review fixes: consistent optional chain, single-decode for close_workflow, drop fragile hash assertion
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Simplify: set closeWorkflowAction env in LoadedPaywallsV2View, drop param from ComponentsView and RootView
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
0 commit comments