Skip to content
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

Show active coupon on billing page #4917

Merged
merged 1 commit into from
Oct 4, 2024

Conversation

MananTank
Copy link
Member

@MananTank MananTank commented Oct 3, 2024

Problem solved

Short description of the bug fixed or feature added


PR-Codex overview

This PR primarily focuses on refactoring the CouponCard component into ApplyCouponCard and CouponDetailsCard for better clarity and separation of concerns. It also updates the Billing component to use CouponSection instead of CouponCard.

Detailed summary

  • Renamed CouponCard to ApplyCouponCard and created CouponDetailsCard.
  • Updated Billing component to use <CouponSection /> instead of <CouponCard />.
  • Enhanced SettingsCard button handling with dynamic class names and variant options.
  • Added Storybook stories for CouponDetailsCard and ApplyCouponCard.
  • Improved the DangerSettingCard by adding customizable class names.
  • Updated coupon handling logic with optimistic updates for better UX.
  • Enhanced type definitions for coupons and updated API interactions.

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

Copy link

vercel bot commented Oct 3, 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 4, 2024 0:34am
3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
docs-v2 ⬜️ Skipped (Inspect) Oct 4, 2024 0:34am
thirdweb_playground ⬜️ Skipped (Inspect) Oct 4, 2024 0:34am
wallet-ui ⬜️ Skipped (Inspect) Oct 4, 2024 0:34am

@vercel vercel bot temporarily deployed to Preview – docs-v2 October 3, 2024 23:40 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui October 3, 2024 23:40 Inactive
Copy link

changeset-bot bot commented Oct 3, 2024

⚠️ No Changeset found

Latest commit: a94f981

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 vercel bot temporarily deployed to Preview – thirdweb_playground October 3, 2024 23:40 Inactive
Copy link

graphite-app bot commented Oct 3, 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.

@github-actions github-actions bot added the Dashboard Involves changes to the Dashboard. label Oct 3, 2024
@MananTank MananTank changed the title Show added coupons on billing page Show active coupon on billing page Oct 3, 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

@MananTank MananTank marked this pull request as ready for review October 3, 2024 23:40
Copy link

codecov bot commented Oct 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 47.61%. Comparing base (27375af) to head (a94f981).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4917   +/-   ##
=======================================
  Coverage   47.61%   47.61%           
=======================================
  Files        1057     1057           
  Lines       57221    57221           
  Branches     3924     3924           
=======================================
  Hits        27246    27246           
  Misses      29286    29286           
  Partials      689      689           
Flag Coverage Δ *Carryforward flag
legacy_packages 65.68% <ø> (ø) Carriedforward from 27375af
packages 43.37% <ø> (ø)

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

@MananTank MananTank force-pushed the 10-04-show_added_coupons_on_billing_page branch from c261b61 to d3d956f Compare October 3, 2024 23:42
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground October 3, 2024 23:42 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui October 3, 2024 23:42 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 October 3, 2024 23:42 Inactive
Copy link
Contributor

github-actions bot commented Oct 3, 2024

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 41.95 KB (0%) 840 ms (0%) 253 ms (+143.31% 🔺) 1.1 s
thirdweb (cjs) 101.63 KB (0%) 2.1 s (0%) 404 ms (+21.45% 🔺) 2.5 s
thirdweb (minimal + tree-shaking) 4.82 KB (0%) 97 ms (0%) 62 ms (+418.5% 🔺) 158 ms
thirdweb/chains (tree-shaking) 498 B (0%) 10 ms (0%) 40 ms (+1290.18% 🔺) 50 ms
thirdweb/react (minimal + tree-shaking) 17.23 KB (0%) 345 ms (0%) 68 ms (+36.35% 🔺) 412 ms

Copy link

graphite-app bot commented Oct 4, 2024

Merge activity

## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on refactoring and enhancing coupon-related components in the `Billing` section of the dashboard. It involves renaming components, improving props handling, and adding new functionalities for coupon application and management.

### Detailed summary
- Renamed `CouponCard` to `CouponSection` in `Billing/index.tsx`.
- Updated `SettingsCard` to use dynamic class names for buttons.
- Added new stories for `CouponDetailsCardUI` and `ApplyCouponCardUI`.
- Implemented optimistic updates for coupon application and deletion.
- Enhanced `CouponCard` to `ApplyCouponCard` with new props for coupon application.
- Introduced `CouponDetailsCardUI` for displaying active coupon details.
- Improved error handling and loading states in coupon-related components.

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

<!-- end pr-codex -->
@jnsdls jnsdls force-pushed the 10-04-show_added_coupons_on_billing_page branch from d3d956f to a94f981 Compare October 4, 2024 00:24
@vercel vercel bot temporarily deployed to Preview – docs-v2 October 4, 2024 00:24 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground October 4, 2024 00:24 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui October 4, 2024 00:24 Inactive
@graphite-app graphite-app bot merged commit a94f981 into main Oct 4, 2024
31 checks passed
@graphite-app graphite-app bot deleted the 10-04-show_added_coupons_on_billing_page branch October 4, 2024 00:34
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.

2 participants