[WIP] Add useConnectModal
PR-Codex overview
This PR adds a new feature to the Connect Wallet functionality in the Thirdweb SDK.
Detailed summary
- Added
shouldSetActiveoption to control setting active wallet - Updated
ConnectModalto handle the new option - Introduced
useConnectModalhook for modal interaction
The following files were skipped due to too many changes:
packages/thirdweb/src/react/web/ui/ConnectWallet/useConnectModal.tsx
✨ Ask PR-Codex anything about this PR by commenting with
/codex {your question}
🦋 Changeset detected
Latest commit: ab37dab7be9dfa87489f70fe39a20360258e6ad1
The changes in this PR will be included in the next version bump.
This PR includes changesets to release 9 packages
| Name | Type |
|---|---|
| thirdweb | Minor |
| @thirdweb-dev/sdk | Patch |
| playground-web | Patch |
| @thirdweb-dev/cli | Patch |
| @thirdweb-dev/react-core | Patch |
| @thirdweb-dev/react | Patch |
| @thirdweb-dev/unity-js-bridge | Patch |
| @thirdweb-dev/wallets | Patch |
| @thirdweb-dev/auth | Patch |
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
CodSpeed Performance Report
Merging #2943 will not alter performance
Comparing cnct-967 (ab37dab) with main (a76c638)
Summary
✅ 9 untouched benchmarks
size-limit report 📦
| Path | Size | Loading time (3g) | Running time (snapdragon) | Total time |
|---|---|---|---|---|
| thirdweb (esm) | 39.21 KB (0%) | 785 ms (0%) | 1.1 s (+72.79% 🔺) | 1.9 s |
| thirdweb (cjs) | 88.59 KB (0%) | 1.8 s (0%) | 3.2 s (+49.27% 🔺) | 5 s |
| thirdweb (minimal + tree-shaking) | 4.75 KB (0%) | 95 ms (0%) | 133 ms (+30.76% 🔺) | 228 ms |
| thirdweb/chains (tree-shaking) | 423 B (0%) | 10 ms (0%) | 102 ms (+153.07% 🔺) | 112 ms |
| thirdweb/react (minimal + tree-shaking) | 15.63 KB (0%) | 313 ms (0%) | 237 ms (+9.98% 🔺) | 550 ms |
Codecov Report
Attention: Patch coverage is 63.63636% with 16 lines in your changes are missing coverage. Please review.
Project coverage is 62.32%. Comparing base (
a76c638) to head (ab37dab).
Additional details and impacted files
@@ Coverage Diff @@
## main #2943 +/- ##
=======================================
Coverage 62.32% 62.32%
=======================================
Files 803 803
Lines 60078 60100 +22
Branches 3222 3221 -1
=======================================
+ Hits 37441 37458 +17
- Misses 21968 21973 +5
Partials 669 669
| Flag | Coverage Δ | *Carryforward flag | |
|---|---|---|---|
| legacy_packages | 65.61% <ø> (ø) |
Carriedforward from 8b188a5 | |
| packages | 61.59% <63.63%> (+<0.01%) |
:arrow_up: |
*This pull request uses carry forward flags. Click here to find out more.
| Files | Coverage Δ | |
|---|---|---|
| .../react/web/providers/wallet-ui-states-provider.tsx | 90.66% <100.00%> (+0.12%) |
:arrow_up: |
| ...b/src/react/web/ui/ConnectWallet/ConnectButton.tsx | 57.85% <100.00%> (ø) |
|
| .../react/web/ui/ConnectWallet/Modal/ConnectModal.tsx | 79.43% <93.33%> (+1.77%) |
:arrow_up: |
| ...web/ui/ConnectWallet/Modal/ConnectModalContent.tsx | 14.28% <0.00%> (-0.33%) |
:arrow_down: |
| ...ct/web/ui/ConnectWallet/locale/getConnectLocale.ts | 70.96% <50.00%> (+4.30%) |
:arrow_up: |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| thirdweb_playground | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | May 22, 2024 3:26pm |