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

[TOOL-3525] Dashboard: Add delete account in account settings page #6339

Merged
merged 1 commit into from
Feb 28, 2025

Conversation

MananTank
Copy link
Member

@MananTank MananTank commented Feb 25, 2025


PR-Codex overview

This PR focuses on refactoring the team retrieval logic in the TeamRootPage and middleware to use the getDefaultTeam function. It also enhances the account settings page by integrating default team information and updating the delete account functionality to handle various states.

Detailed summary

  • Replaced team fetching logic in TeamRootPage with getDefaultTeam().
  • Updated middleware to redirect to the default team using getDefaultTeam().
  • Modified AccountSettingsPage to include defaultTeamSlug and defaultTeamName.
  • Enhanced DangerSettingCard to manage confirmation dialog state.
  • Updated AccountSettingsPageUI to pass default team info and handle account deletion.
  • Implemented detailed error handling for account deletion in DeleteAccountCard.

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

Copy link

linear bot commented Feb 25, 2025

Copy link

changeset-bot bot commented Feb 25, 2025

⚠️ No Changeset found

Latest commit: 853ed47

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

Copy link

vercel bot commented Feb 25, 2025

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 Feb 28, 2025 9:12pm
4 Skipped Deployments
Name Status Preview Comments Updated (UTC)
docs-v2 ⬜️ Skipped (Inspect) Feb 28, 2025 9:12pm
login ⬜️ Skipped (Inspect) Feb 28, 2025 9:12pm
thirdweb_playground ⬜️ Skipped (Inspect) Feb 28, 2025 9:12pm
wallet-ui ⬜️ Skipped (Inspect) Feb 28, 2025 9:12pm

@vercel vercel bot temporarily deployed to Preview – wallet-ui February 25, 2025 18:28 Inactive
@vercel vercel bot temporarily deployed to Preview – login February 25, 2025 18:28 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 February 25, 2025 18:28 Inactive
@github-actions github-actions bot added the Dashboard Involves changes to the Dashboard. label Feb 25, 2025
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground February 25, 2025 18:28 Inactive
@MananTank MananTank changed the title [TOOL-3525] Dashboard: Add Delete Account in account settings page [TOOL-3525] Dashboard: Add Delete Account in account settings page - DONT MERGE Feb 25, 2025
Copy link
Member Author


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • merge-queue - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

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

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

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

Copy link
Contributor

github-actions bot commented Feb 25, 2025

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 46.87 KB (0%) 938 ms (0%) 151 ms (+131.81% 🔺) 1.1 s
thirdweb (cjs) 127.15 KB (0%) 2.6 s (0%) 233 ms (+48.93% 🔺) 2.8 s
thirdweb (minimal + tree-shaking) 5.6 KB (0%) 112 ms (0%) 58 ms (+1012.39% 🔺) 170 ms
thirdweb/chains (tree-shaking) 506 B (0%) 10 ms (0%) 22 ms (+1153.88% 🔺) 32 ms
thirdweb/react (minimal + tree-shaking) 19.38 KB (0%) 388 ms (0%) 61 ms (+373.4% 🔺) 448 ms

@vercel vercel bot temporarily deployed to Preview – thirdweb_playground February 26, 2025 23:33 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui February 26, 2025 23:33 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 February 26, 2025 23:33 Inactive
@vercel vercel bot temporarily deployed to Preview – login February 26, 2025 23:34 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground February 27, 2025 17:17 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui February 27, 2025 17:17 Inactive
@vercel vercel bot temporarily deployed to Preview – login February 27, 2025 17:17 Inactive
@MananTank MananTank changed the title [TOOL-3525] Dashboard: Add Delete Account in account settings page - DONT MERGE [TOOL-3525] Dashboard: Add Delete Account in account settings page Feb 28, 2025
@MananTank MananTank marked this pull request as ready for review February 28, 2025 16:08
@MananTank MananTank requested review from a team as code owners February 28, 2025 16:08
Copy link

codecov bot commented Feb 28, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 54.60%. Comparing base (f576581) to head (853ed47).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6339   +/-   ##
=======================================
  Coverage   54.60%   54.60%           
=======================================
  Files         874      874           
  Lines       54525    54525           
  Branches     3680     3680           
=======================================
  Hits        29772    29772           
  Misses      24658    24658           
  Partials       95       95           
Flag Coverage Δ
packages 54.60% <ø> (ø)

@MananTank MananTank changed the title [TOOL-3525] Dashboard: Add Delete Account in account settings page [TOOL-3525] Dashboard: Add delete account in account settings page Feb 28, 2025
Copy link

graphite-app bot commented Feb 28, 2025

Merge activity

…6339)

<!--

## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"

If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):

## Notes for the reviewer

Anything important to call out? Be sure to also clarify these in your comments.

## How to test

Unit tests, playground, etc.

-->

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on enhancing the management of teams and accounts in the application. It introduces a new method to fetch the default team and updates various components to utilize this information, improving user experience and functionality.

### Detailed summary
- Added `getDefaultTeam` function to fetch the default team using an API call.
- Updated `TeamRootPage` to use `getDefaultTeam` instead of fetching all teams.
- Modified middleware to redirect using the default team.
- Refactored account settings page to include `defaultTeamSlug` and `defaultTeamName`.
- Enhanced `DangerSettingCard` to manage confirmation dialog state.
- Updated `AccountSettingsPageUI` to handle account deletion with relevant alerts for errors.
- Added UI components for handling account deletion status responses in the storybook.

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

<!-- end pr-codex -->
@vercel vercel bot temporarily deployed to Preview – wallet-ui February 28, 2025 21:05 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 February 28, 2025 21:05 Inactive
@vercel vercel bot temporarily deployed to Preview – login February 28, 2025 21:05 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground February 28, 2025 21:05 Inactive
@graphite-app graphite-app bot merged commit 853ed47 into main Feb 28, 2025
32 checks passed
@graphite-app graphite-app bot deleted the tool-3525 branch February 28, 2025 21:13
@vercel vercel bot temporarily deployed to Production – wallet-ui February 28, 2025 21:13 Inactive
@vercel vercel bot temporarily deployed to Production – login February 28, 2025 21:13 Inactive
@vercel vercel bot temporarily deployed to Production – docs-v2 February 28, 2025 21:13 Inactive
@vercel vercel bot temporarily deployed to Production – thirdweb_playground February 28, 2025 21:13 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.

2 participants