Skip to content

Conversation

@MananTank
Copy link
Member

@MananTank MananTank commented Oct 14, 2024

Problem solved

Short description of the bug fixed or feature added


PR-Codex overview

This PR introduces the handling of payment setup in the ApplyCouponCard and CouponSection components. It adds functionality to prompt users to add a payment method when applying a coupon if no valid payment is set up.

Detailed summary

  • Added isPaymentSetup and onAddPayment props to ApplyCouponCard and ApplyCouponCardUI.
  • Updated CouponSection to include isPaymentSetup and onAddPayment props.
  • Modified onSubmit in ApplyCouponCardUI to call onAddPayment if no payment is set up.
  • Changed bottomText in ApplyCouponCardUI based on payment setup status.
  • Updated modal handling in Billing component to manage payment modal visibility.
  • Updated CouponSection rendering to trigger payment modal when no valid payment is set.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

@changeset-bot
Copy link

changeset-bot bot commented Oct 14, 2024

⚠️ No Changeset found

Latest commit: 6ceb24b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link

vercel bot commented Oct 14, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 14, 2024 8:51pm
3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
docs-v2 ⬜️ Skipped (Inspect) Oct 14, 2024 8:51pm
thirdweb_playground ⬜️ Skipped (Inspect) Oct 14, 2024 8:51pm
wallet-ui ⬜️ Skipped (Inspect) Oct 14, 2024 8:51pm

@vercel vercel bot temporarily deployed to Preview – docs-v2 October 14, 2024 20:04 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground October 14, 2024 20:04 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui October 14, 2024 20:04 Inactive
@graphite-app
Copy link
Contributor

graphite-app bot commented Oct 14, 2024

Your org has enabled the Graphite merge queue for merging into main

Add the label “merge-queue” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix.

You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link.

@MananTank MananTank marked this pull request as ready for review October 14, 2024 20:04
@github-actions github-actions bot added the Dashboard Involves changes to the Dashboard. label Oct 14, 2024
Copy link
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @MananTank and the rest of your teammates on Graphite Graphite

@codecov
Copy link

codecov bot commented Oct 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 47.77%. Comparing base (e06b40e) to head (6ceb24b).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5011   +/-   ##
=======================================
  Coverage   47.77%   47.77%           
=======================================
  Files        1058     1058           
  Lines       57276    57276           
  Branches     3946     3946           
=======================================
  Hits        27362    27362           
  Misses      29223    29223           
  Partials      691      691           
Flag Coverage Δ *Carryforward flag
legacy_packages 65.68% <ø> (ø) Carriedforward from e06b40e
packages 43.57% <ø> (ø)

*This pull request uses carry forward flags. Click here to find out more.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 14, 2024

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 42.07 KB (0%) 842 ms (0%) 363 ms (+26.27% 🔺) 1.3 s
thirdweb (cjs) 101.87 KB (0%) 2.1 s (0%) 635 ms (-4.47% 🔽) 2.7 s
thirdweb (minimal + tree-shaking) 4.84 KB (0%) 97 ms (0%) 71 ms (+32.03% 🔺) 168 ms
thirdweb/chains (tree-shaking) 498 B (0%) 10 ms (0%) 101 ms (+1028.31% 🔺) 111 ms
thirdweb/react (minimal + tree-shaking) 17.24 KB (0%) 345 ms (0%) 160 ms (+98.04% 🔺) 505 ms

@graphite-app
Copy link
Contributor

graphite-app bot commented Oct 14, 2024

Merge activity

jnsdls pushed a commit that referenced this pull request Oct 14, 2024
…ent method setup (#5011)

## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on enhancing the `ApplyCouponCard` and `CouponSection` components to handle payment setups more effectively, allowing users to be prompted to add a payment method when applying coupons.

### Detailed summary
- Added `isPaymentSetup` and `onAddPayment` props to `ApplyCouponCard` and `ApplyCouponCardUI`.
- Implemented logic to call `onAddPayment` if no payment setup exists.
- Updated `CouponSection` to accept `isPaymentSetup` and `onAddPayment` props.
- Replaced modal opening logic with state management in the `Billing` component.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
@jnsdls jnsdls force-pushed the 10-15-show_payment_modal_when_applying_a_coupon_if_account_has_no_validpayment_method_setup branch from 8a64f3b to e8ab274 Compare October 14, 2024 20:14
@vercel vercel bot temporarily deployed to Preview – docs-v2 October 14, 2024 20:14 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui October 14, 2024 20:14 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground October 14, 2024 20:14 Inactive
jnsdls pushed a commit that referenced this pull request Oct 14, 2024
…ent method setup (#5011)

## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR enhances the `ApplyCouponCard` and `CouponSection` components to manage payment setup states. It introduces new props to control payment modal visibility and modifies coupon application logic based on payment status.

### Detailed summary
- Added `isPaymentSetup` and `onAddPayment` props to `ApplyCouponCard` and `CouponSection`.
- Updated `ApplyCouponCardUI` to handle payment setup state and trigger modal when no payment is set up.
- Modified `Billing` component to manage payment modal state.
- Adjusted `CouponSection` to invoke payment modal when needed.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
@jnsdls jnsdls force-pushed the 10-15-show_payment_modal_when_applying_a_coupon_if_account_has_no_validpayment_method_setup branch from e8ab274 to 99e4aad Compare October 14, 2024 20:29
@vercel vercel bot temporarily deployed to Preview – wallet-ui October 14, 2024 20:30 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground October 14, 2024 20:30 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 October 14, 2024 20:30 Inactive
jnsdls pushed a commit that referenced this pull request Oct 14, 2024
…ent method setup (#5011)

## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on enhancing the `ApplyCouponCard` and `CouponSection` components to handle payment setup states more effectively, allowing users to add payment methods when attempting to apply coupons.

### Detailed summary
- Added `isPaymentSetup` and `onAddPayment` props to `ApplyCouponCard` and `ApplyCouponCardUI`.
- Updated `ApplyCouponCardUI` to call `onAddPayment` if payment is not set up.
- Modified `CouponSection` to accept `isPaymentSetup` and `onAddPayment` props.
- Replaced modal handling with state management for payment modal in `Billing` component.
- Updated `CouponSection` rendering in `Billing` to pass the new props.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
@jnsdls jnsdls force-pushed the 10-15-show_payment_modal_when_applying_a_coupon_if_account_has_no_validpayment_method_setup branch from 99e4aad to 31056b3 Compare October 14, 2024 20:31
@vercel vercel bot temporarily deployed to Preview – wallet-ui October 14, 2024 20:31 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground October 14, 2024 20:31 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 October 14, 2024 20:31 Inactive
jnsdls pushed a commit that referenced this pull request Oct 14, 2024
…ent method setup (#5011)

## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on enhancing the `ApplyCouponCard` and `CouponSection` components to handle payment setup states and manage payment modal visibility more effectively.

### Detailed summary
- Added `isPaymentSetup` and `onAddPayment` props to `ApplyCouponCardUI` and `ApplyCouponCard`.
- Updated `ApplyCouponCard` to conditionally call `onAddPayment`.
- Modified `CouponSection` to receive `isPaymentSetup` and `onAddPayment`.
- Replaced modal handling with state in `Billing`.
- Adjusted `CouponSection` usage in `Billing` to manage payment modal visibility.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
@jnsdls jnsdls force-pushed the 10-15-show_payment_modal_when_applying_a_coupon_if_account_has_no_validpayment_method_setup branch from 31056b3 to f74c7d4 Compare October 14, 2024 20:33
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground October 14, 2024 20:34 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui October 14, 2024 20:34 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 October 14, 2024 20:34 Inactive
jnsdls pushed a commit that referenced this pull request Oct 14, 2024
…ent method setup (#5011)

## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR introduces a payment setup feature in the `ApplyCouponCard` component, allowing users to add payment methods before applying coupons. It enhances the UI and functionality related to payment methods and coupon application.

### Detailed summary
- Added `isPaymentSetup` and `onAddPayment` props to `ApplyCouponCardUI` and `CouponSection`.
- Updated `ApplyCouponCard` to handle payment setup checks.
- Modified `onSubmit` in `ApplyCouponCardUI` to prompt for payment if not set up.
- Adjusted modal handling for payment methods in `Billing` component.
- Updated stories to reflect changes in payment setup logic.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
@jnsdls jnsdls force-pushed the 10-15-show_payment_modal_when_applying_a_coupon_if_account_has_no_validpayment_method_setup branch from f74c7d4 to cf7e4e9 Compare October 14, 2024 20:39
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground October 14, 2024 20:39 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 October 14, 2024 20:39 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui October 14, 2024 20:39 Inactive
…ent method setup (#5011)

## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR enhances the `ApplyCouponCard` and `CouponSection` components by introducing new props for handling payment setup. It allows the UI to conditionally display messages and trigger payment modals based on the payment status.

### Detailed summary
- Added `isPaymentSetup` and `onAddPayment` props to `ApplyCouponCardUI`.
- Updated `ApplyCouponCard` to handle new props.
- Modified the `onSubmit` method to check payment setup status.
- Enhanced `CouponSection` to receive and use new props.
- Replaced modal handling with state management in `Billing`.
- Updated `CouponSection` to trigger payment modal when needed.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
@jnsdls jnsdls force-pushed the 10-15-show_payment_modal_when_applying_a_coupon_if_account_has_no_validpayment_method_setup branch from cf7e4e9 to 6ceb24b Compare October 14, 2024 20:41
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground October 14, 2024 20:42 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui October 14, 2024 20:42 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 October 14, 2024 20:42 Inactive
@graphite-app graphite-app bot merged commit 6ceb24b into main Oct 14, 2024
31 checks passed
@graphite-app graphite-app bot deleted the 10-15-show_payment_modal_when_applying_a_coupon_if_account_has_no_validpayment_method_setup branch October 14, 2024 20:52
@vercel vercel bot temporarily deployed to Production – thirdweb_playground October 14, 2024 20:52 Inactive
@vercel vercel bot temporarily deployed to Production – docs-v2 October 14, 2024 20:52 Inactive
@vercel vercel bot temporarily deployed to Production – wallet-ui October 14, 2024 20:52 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Dashboard Involves changes to the Dashboard.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants