Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Paywalls V2] Fix footer spacing issues #4730

Merged
merged 2 commits into from
Jan 29, 2025
Merged

Conversation

joshdholtz
Copy link
Member

Motivation

Footer was showing empty space between footer and safe space on the bottom

Description

  • Ignoring edges on bottom instead of top (which I think was a typo)
  • Added a spacer to the bottom of the footer to expand space to fill out the safe space

👇 This is what the Spacer() fixes

Before After
Simulator Screenshot - iPhone 16 - 2025-01-28 at 23 13 08 Screenshot 2025-01-28 at 11 12 54 PM

@@ -241,15 +241,15 @@ private struct LoadedPaywallsV2View: View {
ComponentsView(
componentViewModels: [paywallState.componentViewModel],
onDismiss: self.onDismiss
)
)
Copy link
Member

Choose a reason for hiding this comment

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

This gives a lint warning

}
.environmentObject(self.selectedPackageContext)
.frame(maxHeight: .infinity, alignment: .topLeading)
.backgroundStyle(
self.paywallState.componentsConfig.background
.asDisplayable(uiConfigProvider: uiConfigProvider).backgroundStyle
)
.edgesIgnoringSafeArea(.top)
.edgesIgnoringSafeArea(.bottom)
Copy link
Member

@ajpallares ajpallares Jan 29, 2025

Choose a reason for hiding this comment

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

Yeah, this makes sense. Having .edgesIgnoringSafeArea(.top) could mean trouble when the paywall got presented in full cover (where content could go under the status bar)

Copy link
Contributor

@tonidero tonidero left a comment

Choose a reason for hiding this comment

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

I just have a question... But code seems ok to me!

@joshdholtz joshdholtz merged commit 0dc908e into main Jan 29, 2025
10 checks passed
@joshdholtz joshdholtz deleted the paywalls-v2/fix-footer branch January 29, 2025 14:38
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.

3 participants