Skip to content

Conversation

@jnsdls
Copy link
Member

@jnsdls jnsdls commented Nov 22, 2024

TL;DR

Refactored ecosystem creation flow to use server actions and removed the confirmation dialog.

What changed?

  • Created a new server action createEcosystem to handle ecosystem creation
  • Extracted BASE_URL constant for reusability
  • Removed the confirmation dialog from the creation form
  • Simplified form submission to directly create ecosystems
  • Added more specific error handling with user-friendly toast messages
  • Changed component props to use teamSlug instead of ecosystemLayoutPath

How to test?

  1. Navigate to the ecosystem creation page
  2. Fill out the ecosystem form with a name and logo
  3. Select permission type (PARTNER_WHITELIST or ANYONE)
  4. Submit the form
  5. Verify redirect to Stripe billing portal
  6. Verify appropriate error messages display for various error scenarios

Why make this change?

To streamline the ecosystem creation process by implementing server-side actions and providing better error handling. This change improves the user experience by removing the extra confirmation step while maintaining secure server-side processing of ecosystem creation.


PR-Codex overview

This PR focuses on refactoring the EcosystemCreatePage and its related components to improve the handling of team-specific data when creating an ecosystem, including changes to form submission and URL management.

Detailed summary

  • Removed ecosystemLayoutPath prop from EcosystemCreatePage.
  • Introduced teamSlug prop in EcosystemCreatePage and CreateEcosystemForm.
  • Updated BASE_URL logic in env.ts.
  • Refactored createEcosystem action for better error handling and token management.
  • Simplified form submission process in CreateEcosystemForm.

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

@vercel
Copy link

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

@changeset-bot
Copy link

changeset-bot bot commented Nov 22, 2024

⚠️ No Changeset found

Latest commit: e9ea476

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 November 22, 2024 03:13 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 November 22, 2024 03:13 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui November 22, 2024 03:13 Inactive
@graphite-app
Copy link
Contributor

graphite-app bot commented Nov 22, 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 Nov 22, 2024
Copy link
Member Author

jnsdls commented Nov 22, 2024

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

@jnsdls jnsdls marked this pull request as ready for review November 22, 2024 03:13
@jnsdls jnsdls force-pushed the _Dashboard_Feature_Integrate_ecosystem_creation_with_Stripe_billing branch from 25cc194 to a7d70bf Compare November 22, 2024 03:14
@jnsdls jnsdls requested a review from gregfromstl November 22, 2024 03:14
@vercel vercel bot temporarily deployed to Preview – docs-v2 November 22, 2024 03:14 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui November 22, 2024 03:14 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground November 22, 2024 03:14 Inactive
@jnsdls jnsdls force-pushed the _Dashboard_Feature_Integrate_ecosystem_creation_with_Stripe_billing branch from a7d70bf to d9d657e Compare November 22, 2024 03:15
@vercel vercel bot temporarily deployed to Preview – wallet-ui November 22, 2024 03:15 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground November 22, 2024 03:15 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 November 22, 2024 03:15 Inactive
@codecov
Copy link

codecov bot commented Nov 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 43.86%. Comparing base (d98c133) to head (e9ea476).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5488   +/-   ##
=======================================
  Coverage   43.86%   43.86%           
=======================================
  Files        1076     1076           
  Lines       55972    55972           
  Branches     3910     3910           
=======================================
  Hits        24551    24551           
  Misses      30738    30738           
  Partials      683      683           
Flag Coverage Δ *Carryforward flag
legacy_packages 65.68% <ø> (ø) Carriedforward from d98c133
packages 38.59% <ø> (ø)

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

---- 🚨 Try these New Features:

@jnsdls jnsdls force-pushed the _Dashboard_Feature_Integrate_ecosystem_creation_with_Stripe_billing branch from d9d657e to bb03c1d Compare November 22, 2024 03:19
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground November 22, 2024 03:19 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui November 22, 2024 03:19 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 November 22, 2024 03:19 Inactive
@jnsdls jnsdls added the DO NOT MERGE This pull request is still in progress and is not ready to be merged. label Nov 22, 2024 — with Graphite App
@github-actions
Copy link
Contributor

github-actions bot commented Nov 22, 2024

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 44.97 KB (0%) 900 ms (0%) 743 ms (-24.86% 🔽) 1.7 s
thirdweb (cjs) 105.01 KB (0%) 2.2 s (0%) 1.4 s (-14.61% 🔽) 3.5 s
thirdweb (minimal + tree-shaking) 5.6 KB (0%) 113 ms (0%) 74 ms (+138.23% 🔺) 186 ms
thirdweb/chains (tree-shaking) 506 B (0%) 10 ms (0%) 9 ms (-69.37% 🔽) 19 ms
thirdweb/react (minimal + tree-shaking) 18.38 KB (0%) 368 ms (0%) 169 ms (+80.2% 🔺) 537 ms

@jnsdls jnsdls force-pushed the _Dashboard_Feature_Integrate_ecosystem_creation_with_Stripe_billing branch from bb03c1d to 56ba315 Compare November 22, 2024 07:23
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground November 22, 2024 07:23 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui November 22, 2024 07:23 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 November 22, 2024 07:23 Inactive
@jnsdls jnsdls removed the DO NOT MERGE This pull request is still in progress and is not ready to be merged. label Nov 22, 2024
@graphite-app
Copy link
Contributor

graphite-app bot commented Nov 22, 2024

Merge activity

…#5488)

### TL;DR
Refactored ecosystem creation flow to use server actions and removed the confirmation dialog.

### What changed?
- Created a new server action `createEcosystem` to handle ecosystem creation
- Extracted `BASE_URL` constant for reusability
- Removed the confirmation dialog from the creation form
- Simplified form submission to directly create ecosystems
- Added more specific error handling with user-friendly toast messages
- Changed component props to use `teamSlug` instead of `ecosystemLayoutPath`

### How to test?
1. Navigate to the ecosystem creation page
2. Fill out the ecosystem form with a name and logo
3. Select permission type (PARTNER_WHITELIST or ANYONE)
4. Submit the form
5. Verify redirect to Stripe billing portal
6. Verify appropriate error messages display for various error scenarios

### Why make this change?
To streamline the ecosystem creation process by implementing server-side actions and providing better error handling. This change improves the user experience by removing the extra confirmation step while maintaining secure server-side processing of ecosystem creation.

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on refactoring the `EcosystemCreatePage` and related components to streamline the creation of ecosystems, updating function signatures, and improving the handling of the creation process.

### Detailed summary
- Removed `ecosystemLayoutPath` prop from `EcosystemCreatePage`.
- Added `teamSlug` prop to `EcosystemCreatePage` and `CreateEcosystemForm`.
- Updated `createEcosystem` function to handle authentication and API calls.
- Enhanced error handling in the `CreateEcosystemForm`.
- Removed unused imports and state management related to confirmation dialogs.

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

<!-- end pr-codex -->
@jnsdls jnsdls force-pushed the _Dashboard_Feature_Integrate_ecosystem_creation_with_Stripe_billing branch from 56ba315 to e9ea476 Compare November 22, 2024 07:44
@vercel vercel bot temporarily deployed to Preview – docs-v2 November 22, 2024 07:44 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground November 22, 2024 07:44 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui November 22, 2024 07:44 Inactive
@graphite-app graphite-app bot merged commit e9ea476 into main Nov 22, 2024
30 of 31 checks passed
@graphite-app graphite-app bot deleted the _Dashboard_Feature_Integrate_ecosystem_creation_with_Stripe_billing branch November 22, 2024 07:48
@vercel vercel bot temporarily deployed to Production – docs-v2 November 22, 2024 07:48 Inactive
@vercel vercel bot temporarily deployed to Production – wallet-ui November 22, 2024 07:48 Inactive
@vercel vercel bot temporarily deployed to Production – thirdweb_playground November 22, 2024 07:48 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