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.
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
Add UI Preview Mode to SDK #4693
Add UI Preview Mode to SDK #4693
Changes from 5 commits
0fd4f32
8951d39
8a5dff6
a41010a
575d7e1
ef24688
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
I wonder if we could act a bit smarter here and instead of assigning basically a random period to each product, we could try to get the package type provided by the offerings (which has the duration). In case the package type is
custom
, we could then do something "smart" like analyzing the product id for some keywords likeweek
,month
,year
.... To assign the duration. And then if we don't find any, as a fallback, assign a random period.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.
I like the idea, but the randomness could add friction if you want to see a discount and all
random()
s happen to be false. (You'll need to go back and reopen the preview / the app.)What do you think about having a fixed (set of) product type(s) always having a discount, e.g.
monthly
andyearly
?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.
I totally see your point about the friction due to the randomness. I also believe that what we show in previews should be more deterministic.
On the other hand, I do imagine some clients wanting to show the exact information of their products on the previews. However, the introduced randomness does not solve this problem either.
WDYT @aboedo?
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.
Just for some context: this is something I believe we will do at some point. We could on top of that allow users to configure the preview before/when showing it, e.g. with a setting that controls discounts. However these are not solutions for in this PR haha.
This is not a blocker for me btw!
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.
Makes sense, I can imagine the frustration and the confusion if the paywall looks different between opens.
Agreed with Joop that eventually we'll want to get realistic data in there, but in the meantime probably the easiest way to go would be to have a way to tell the SDK what to show.
That way we could do something like what the dashboard does, where it allows you to select whether to preview with intro offer eligible or not.
Probably not something that needs to go into the MVP of this feature and can be added on later before shipping to prod.
And it will set us up nicely for doing something similar for Customer Center, where we'll inevitably need to find a way to select whether to show the CC as a user with an active subscription would see it vs empty subs