-
Notifications
You must be signed in to change notification settings - Fork 335
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] Navigation bar component #4775
base: main
Are you sure you want to change the base?
Conversation
case .stickyFooter(let viewModel): | ||
StickyFooterComponentView(viewModel: viewModel) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sticky footer is not a standalone component (not in the component tree) so removed it from here. I did this in this PR since the navigation bar fell in the same category 🤷♂️
1 build increased size
Paywalls 1.0 (1)
|
Item | Install Size Change |
---|---|
DYLD.String Table | ⬆️ 81.6 kB |
Code Signature | ⬆️ 5.6 kB |
DYLD.Exports | ⬆️ 2.6 kB |
📝 RevenueCat.PaywallComponent.NavigationBarComponent.NavigationBarC... | ⬆️ 1.7 kB |
🗑 RCPurchases.applicationDidBecomeActive | ⬇️ -900 B |
🛸 Powered by Emerge Tools
Comment trigger: Size diff threshold of 100.00kB exceeded
@@ -28,7 +28,6 @@ enum PaywallComponentViewModel { | |||
case button(ButtonComponentViewModel) | |||
case package(PackageComponentViewModel) | |||
case purchaseButton(PurchaseButtonComponentViewModel) | |||
case stickyFooter(StickyFooterComponentViewModel) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as other spot... removed here because sticky footer is never going to be in the normal view stack tree thingy
|
||
public extension PaywallComponent { | ||
|
||
final class NavigationBarComponent: PaywallComponentBase { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we name this StickyHeaderComponent
? Or maybe HeaderComponent
if it's not sticky? This would be more consistent with our StickyFooterComponent
, and also avoid confusion on the Android side.
On Android, this would be a "Top App Bar". The "Navigation Bar" on Android is the bar at the bottom, controlled by the OS, containing the gesture handle thing or back/recents/home buttons.
public let leadingStack: PaywallComponent.StackComponent? | ||
public let trailingStack: PaywallComponent.StackComponent? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feels a bit like iOS implementation details are leaking. From a platform agnostic point of view, I would expect that this component is just a single (horizontal) stack.
Motivation
Allow configuration of native navigation bars.
Description
Added an optional
NavigationBarComponent
to the base paywall configNavigationViewIfNeeded
Added a custom
NavigationViewIfNeeded
viewPaywallView
is in already in a navigation stackNavigationStack
(orNavigationView
)presentingFrom
and its values areautomatic
,navigation
, andmodal
(or something like that). we can default toautomatic
but allow the developer to explicitly say if needed.Demo
Screen.Recording.2025-02-09.at.8.15.51.PM.mov