Fix workflow paywall safe area clipping#6816
Merged
Merged
Conversation
b5ab340 to
ec0d193
Compare
vegaro
approved these changes
May 27, 2026
vegaro
left a comment
Member
There was a problem hiding this comment.
I did test it and it looks good. One thing I noticed is that in the PaywallsV2View .edgesIgnoringSafeArea(.top) is conditiona to only when a header or hero image is present, but I did test with a multi page paywall that has header and one without and seems to be working fine. Did I miss anything?
Move alignment: .top into the function so the offset(y:) calculation and its required alignment are always kept together, preventing accidental breakage if the call site is changed. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The frame(maxWidth:maxHeight:alignment:) wrapper constrained the mask's reported layout size to (w, h), clipping the bottom safe area portion of the rectangle and causing a white stripe. Instead, document the coupling with a comment so the call site alignment and offset math stay visibly linked. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Move mask(alignment: .top) and the offset(y:) into a private View extension so both are co-located and the call site has no alignment parameter to accidentally change. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
c30e75f to
f9b8180
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Checklist
purchases-androidand hybridsMotivation
Workflow paywall pages ignore the bottom safe area so their backgrounds extend edge-to-edge. The transition container was using
.clipped(), which trimmed that overflow and exposed the presenting view as a white stripe at the bottom during and after transitions.Description
Replace
.clipped()on theGeometryReaderpage stack with a customtransitionClipMask(proxy:)modifier defined in a privateViewextension.The mask still clips horizontal slide transitions to the view width, but its rectangle is expanded to cover the full safe area: height is
proxy.size.height + safeAreaInsets.top + safeAreaInsets.bottom, offset upward bysafeAreaInsets.top, and anchored withmask(alignment: .top). This lets page backgrounds render through both safe areas while keeping transitions horizontally bounded.The
mask(alignment: .top)and theoffset(y: -safeAreaInsets.top)calculation are co-located in the same extension method so they cannot be accidentally decoupled.Tested manually with PaywallsTester (
TUIST_LAUNCH_ARGUMENTS="-EnableWorkflowsEndpoint") on iPhone 17 Pro Max (iOS 26) — single-page and multi-page workflow paywalls with and without header/hero images, verifying no white stripe at the bottom and no top safe area clipping.Note
Low Risk
Localized SwiftUI layout change in workflow paywall presentation; no auth, purchase, or data-path changes.
Overview
Fixes a workflow paywall layout bug where edge-to-edge page backgrounds showed a white stripe at the bottom during and after step transitions.
On the
GeometryReaderpage stack inWorkflowPaywallView,.clipped()is removed and replaced with a privatetransitionClipMask(proxy:)modifier. The mask still bounds horizontal slide transitions to the view width, but the mask rectangle is sized to include top and bottom safe area insets (with a top-aligned offset) so full-bleed backgrounds can draw through the safe areas without exposing the presenter underneath.Package.resolvedalso drops several unused Swift package pins (e.g. FlyingFox, OHHTTPStubs, SimpleDebugger, SnapshotPreviews).Reviewed by Cursor Bugbot for commit f9b8180. Bugbot is set up for automated code reviews on this repo. Configure here.