Skip to content

Fix workflow paywall safe area clipping#6816

Merged
facumenzella merged 4 commits into
mainfrom
codex/codex-20260518-174513
May 27, 2026
Merged

Fix workflow paywall safe area clipping#6816
facumenzella merged 4 commits into
mainfrom
codex/codex-20260518-174513

Conversation

@facumenzella

@facumenzella facumenzella commented May 19, 2026

Copy link
Copy Markdown
Member

Checklist

  • If applicable, unit tests
  • If applicable, create follow-up issues for purchases-android and hybrids

Motivation

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 the GeometryReader page stack with a custom transitionClipMask(proxy:) modifier defined in a private View extension.

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 by safeAreaInsets.top, and anchored with mask(alignment: .top). This lets page backgrounds render through both safe areas while keeping transitions horizontally bounded.

The mask(alignment: .top) and the offset(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 GeometryReader page stack in WorkflowPaywallView, .clipped() is removed and replaced with a private transitionClipMask(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.resolved also 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.

@facumenzella facumenzella changed the title [codex] Fix workflow paywall safe area clipping Fix workflow paywall safe area clipping May 19, 2026
@facumenzella facumenzella force-pushed the codex/codex-20260518-174513 branch from b5ab340 to ec0d193 Compare May 19, 2026 03:51
@facumenzella facumenzella marked this pull request as ready for review May 19, 2026 14:42
@facumenzella facumenzella requested a review from a team as a code owner May 19, 2026 14:42
@facumenzella facumenzella requested a review from vegaro May 19, 2026 14:42

@vegaro vegaro left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Comment thread RevenueCatUI/Templates/V2/WorkflowPaywallView.swift Outdated
facumenzella and others added 4 commits May 27, 2026 16:19
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>
@facumenzella facumenzella force-pushed the codex/codex-20260518-174513 branch from c30e75f to f9b8180 Compare May 27, 2026 14:20
@facumenzella facumenzella requested a review from a team as a code owner May 27, 2026 14:20
@facumenzella facumenzella enabled auto-merge (squash) May 27, 2026 14:21
@facumenzella facumenzella merged commit 7957076 into main May 27, 2026
18 of 20 checks passed
@facumenzella facumenzella deleted the codex/codex-20260518-174513 branch May 27, 2026 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants