Skip to content

[NOT MERGING YET] make details animation smoother #331

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

Draft
wants to merge 25 commits into
base: main
Choose a base branch
from

Conversation

alfondotnet
Copy link
Member

No description provided.

alfondotnet and others added 25 commits February 17, 2025 10:15
Refactors away the legacy <slot> API into a more V5 syntax using
snippets
First pass at revamping our purchase flow.

Keep in mind this PR goes against a branch `fon/new-sdk-views`. I'd love
feedback on what we have until now
move to rem for spacing values for responsiveness
- Fixes alignment of button in mobile view
- Renames `<Modal />` component to `<LayoutSection />`
- Brings down gapXLarge of Desktop to 24px as per Iga's Request
- Breaks down stories into Mobile and Desktop
Changes the checkout flow by using two new endpoints:
  - `/checkout/start`: Called after entering the billing email. It returns the operation ID and the required parameters to initialize the Stripe Elements components.
  - `/checkout/complete`: Called after submitting the payment method form. It creates the corresponding `SetupIntent` or `PayentIntent` and returns the client secret to confirm it in the SDK.

- feat: Leave checkout form if a non-recoverable error occurs (e.g. product already purchased)
- fix: Destroy paymentElement when unmounting the `state-needs-payment-info`
- chore: Update `webbilling-demo` lock file
- chore: Extract stripe-related logic into a dedicated service
- chore: Improve error handling during payment info collection
- fix: Set font family in Stripe Elements
- chore: rename `data` field to `gateway_params`
- chore: Remove unnecessary fields from `CheckoutCompleteResponse`
- feat: Pick `elements_configuration` from the checkout start response
- chore: Remove environment var `VITE_STORYBOOK_RESTRICTED_SECRET`
- chore: Fix purchase flow stories and unit tests
- feat: Replace the `PurchaseEndpoint` method with `CheckoutStartEndpoint` and `CheckoutCompleteEndpoint`
- chore: Remove `svelte-stripe` dependency
Some bug bash fixes:

- The arrow to "expand" should change when luminosity does
- Border of email input should be 1px 
- Fixes how a non monthly product shows and one with trial in present
offer


I am waiting for design update of how to present the trial information
…er (#324)

Adds support for passing an HTML Element and have the purchase flow rendered there instead of taking the whole screen
This PR:

- Fixes issue when closing modal. `onDestroy` is not being called so
scroll is not returned to the app
- Fixes issue introduced by
https://github.com/RevenueCat/purchases-js/pull/324/files#diff-890948e5715657ae559e6221fa767a9c6c771e193ddc37fc42add8c8ab491e6eL23
whereby the modal won't take the full screen when having scrolled down
(since it's absolute 100%/100%). It fixes the issue by returning
conditionally the previous styles, based on `isInElement`
@alfondotnet alfondotnet changed the base branch from main to fon/new-sdk-views February 19, 2025 23:36
@RevenueCat-Danger-Bot
Copy link

1 Error
🚫 Label the PR using one of the change type labels. If you are not sure which label to use, choose pr:other.
Label Description
pr:feat A new feature. Use along with pr:breaking to force a major release.
pr:fix A bug fix. Use along with pr:force_minor to force a minor release.
pr:other Other changes. Catch-all for anything that doesn't fit the above categories. Releases that only contain this label will not be released. Use along with pr:force_patch, or pr:force_minor to force a patch or minor release.
pr:RevenueCatUI Use along any other tag to mark a PR that only contains RevenueCatUI changes
pr:next_release Preparing a new release
pr:dependencies Updating a dependency
pr:phc_dependencies Updating purchases-hybrid-common dependency

Generated by 🚫 Danger

Base automatically changed from fon/new-sdk-views to main March 10, 2025 09:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants