-
Notifications
You must be signed in to change notification settings - Fork 50
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
[WIP] PoC: Emergetools snapshot testing #1359
Closed
Closed
Conversation
This file contains 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
### Description This PR creates a new `Paywall tester` app in `examples/paywall-tester`. It also adds some basic initial UI (just the bottom tab) to mimic what we do in iOS. This app is part of the main project (not a separate project like MagicWeather/MagicWeatherCompose) ![Screenshot_20230904_122254](https://github.com/RevenueCat/purchases-android/assets/808417/4e3e36cd-bbe2-41e8-94b7-138e5f441f98)
### Description This PR creates a new module `:ui:revenuecatui` as a starting point for paywalls. Additionally, it adds some initial code for the public API.
…ew screen (#1220) ### Description This PR displays the list of offerings in the `Offerings` tab and allows to navigate to a new screen with the offering ID. https://github.com/RevenueCat/purchases-android/assets/808417/bd1f6e61-49bc-4e59-91be-9d1ba7511691
### Description This PR adds a simple paywall to the revenuecatui library and uses it to display the paywall in paywall tester. Still pretty barebones but it's a start :P https://github.com/RevenueCat/purchases-android/assets/808417/b4a4b85c-68dc-4cc0-9019-2baefb50e2e3
### Description We can and should be using coroutines to interact with the main SDK. This updates the paywall tester app and the `revenuecatui ` sdk to use the coroutine versions of the SDK methods.
### Description This just adds a couple of text views as a PoC of setting a paywall in the dashboard and seeing the data in the UI. ![image](https://github.com/RevenueCat/purchases-android/assets/808417/ec95eef0-63e1-4ece-8432-9b521bcfdbdf)
Submits paywall tester to Google Play nightly
…all (#1232) ### Description Mostly a bunch of cleanup and improving the UI in this PR. - Start using colors for texts and buttons. - Start using device locale - Move code to extensions for reusability - Move paywall view UI to `Template2`. First template we're working on - Improve Template2 to look closer to actual UI. - Extract conversion from `Offering` to `PaywallViewState` for easier testing and reusability - Make sure visibility of elements is correct. ![image](https://github.com/RevenueCat/purchases-android/assets/808417/b6b06544-5e53-4e46-b1e0-e14e6fe62694) --------- Co-authored-by: NachoSoto <[email protected]>
### Description Added `Logger` class with some static methods to be able to unify the behavior for logs in the RevenueCatUI sdk.
### Description This PR adds `Coil` as a dependency for the new `RevenueCatUI` library. We will be using this library to load images for now. We may reconsider and implement our own image loader in the future, but this is the quickest for now. ![image](https://github.com/RevenueCat/purchases-android/assets/808417/6388aa66-d00d-4410-a9f4-4c8009bc2569)
### Description This PR reorganizes the the new RevenueCatUI module files. The packages are: - `composables`: For generic composables used in multiple UI locations - `helpers`: Generic helpers - `extensions`: Extensions for existing classes - `data`: Data used to drive the UI and view model
This creates a generic `PaywallBackground` that can be used in any template. ![image](https://github.com/RevenueCat/purchases-android/assets/685609/9b800c1c-705a-4b72-9ba7-153b18ab9b4c) ### Other changes: - Created `Modifier.conditional` - Changed `PaywallData.getUrlStringFromImage` to return `String?` (images are optional) - Added `PaywallBackground` to `Template2`
This allows us to create previews for each template so we can easily iterate on them. --------- Co-authored-by: Toni Rico <[email protected]>
…#1242) ### Description This PR adds code to map different data sources including offerings + paywall data + locale to build a new `TemplateConfiguration` model, which is modeled to be consumed by the UI more easily.
### Description This was a bit annoying so I decided to fix it. We don't want to show an error dialog when the user just cancelled the purchase.
…ay debug menu (#1253) ### Description This improves PaywallTester so we can logIn/logOut and display the debug menu from the app. ![image](https://github.com/RevenueCat/purchases-android/assets/808417/04b7592a-5c5a-4002-b7fc-eb111e8f44a9)
…se` (#1255) ### Description While working on paywalls in #1251, we needed to calculate the price per month for products to get the value of a variable. This PR extracts that logic to the main SDK, providing an optional `Locale` parameter which will be `Locale.getDefault()` by default. This function has been added to the `PricingPhase` class and the `StoreProduct` interface for convenience. #### API Changes - Added `fun formattedPricePerMonth(locale: Locale = Locale.getDefault()): String?` to `StoreProduct`, `GoogleStoreProduct` and `AmazonStoreProduct`. - Added `fun formattedPricePerMonth(locale: Locale = Locale.getDefault()): String` to `PricingPhase`.
### Description Allow triggering paywall tester upload to play console manually.
Note that this is only for the optional URLs, `assetBaseURL` is still required, but I'll handle errors there in a separate PR.
### Description This adds a close button to the paywall that can be displayed when using the `Paywall` composable, the `PaywallDialog` or the `PaywallActivityLauncher`. ![image](https://github.com/RevenueCat/purchases-android/assets/808417/8bb00201-6d1f-45a5-a6cd-8d8cbb241a03)
Unless it needs to be blur, to match iOS behavior.
Equivalent to RevenueCat/purchases-ios#2818 `IntroEligibilityStateView` relies on strings being `null` to determine what string is available, therefore we need to make sure we don't have empty strings in `PaywallData`.
…ecode (#1402) This also adds coverage for `PaywallData` deserialization inside of `Offering`
…ckage (#1416) ### Description In some cases, the purchase button text doesn't change when selecting different packages. However, we were still animating the text resulting in a small flash in the purchase button when changing the selected package. This makes it so, if the purchase button text doesn't change between all the packages, we don't animate it.
### Description Using downloadable Google fonts when displaying the paywall has a small delay where the default font is first used, then changed to the new font the first time the font is used. While we could predownload the font during the initial paywall tester app, this switches to using a bundled font which is loaded immediately. This is the same font we were using previously through google fonts.
Depends on #1409. ![Screenshot 2023-10-27 at 11 15 33](https://github.com/RevenueCat/purchases-android/assets/685609/194a9415-dde1-4d92-a500-fb7878fa89a3)
### Description I noticed that after a configuration change (for example moving from landscape to portrait), the close button didn't work as expected on the dialogs. I tracked it down to the fact that the view model kept the first version of the dismiss callback, so it wasn't calling the new one created after the configuration change. I decided to remove the current approach of using keys to create individual view models and instead I'm adding a method to the view model that gets called every time we try to get the view model. If we detect that the PaywallOptions have changed, we will update it on the view model, ensuring we have the latest version of the callbacks.
tonidero
force-pushed
the
poc_emergetools_snapshot_testing
branch
from
October 31, 2023 13:21
9ee79f0
to
cc0b9e8
Compare
Closing this since a new version has been merged in #1785 |
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.
Description
This branch has a PoC of emerge tools snapshot tests.