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

Add useConnectModal #2943

Merged
merged 13 commits into from May 22, 2024
Merged

Add useConnectModal #2943

merged 13 commits into from May 22, 2024

Conversation

MananTank
Copy link
Member

@MananTank MananTank commented May 6, 2024

PR-Codex overview

This PR introduces a new useConnectModal hook for opening a Connect UI in a modal. It enhances wallet connectivity experience with modal prompts.

Detailed summary

  • Added useConnectModal hook for modal Connect UI
  • Modified various components to support the new hook
  • Updated ConnectModalContent to handle setting active wallet
  • Added shouldSetActive prop to ConnectModalContent
  • Updated ConnectButton to include shouldSetActive prop in ConnectModal
  • Created ConnectModalOptions type for ConnectModal
  • Added Modal component for useConnectModal
  • Included UseConnectModalOptions for configuring useConnectModal

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}

Copy link

linear bot commented May 6, 2024

Copy link

changeset-bot bot commented May 6, 2024

🦋 Changeset detected

Latest commit: ab37dab

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

@MananTank MananTank marked this pull request as draft May 6, 2024 21:13
Copy link

codspeed-hq bot commented May 6, 2024

CodSpeed Performance Report

Merging #2943 will not alter performance

Comparing cnct-967 (ab37dab) with main (a76c638)

Summary

✅ 9 untouched benchmarks

Copy link
Contributor

github-actions bot commented May 6, 2024

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

Copy link

codecov bot commented May 6, 2024

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%) ⬆️

*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%) ⬆️
...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%) ⬆️
...web/ui/ConnectWallet/Modal/ConnectModalContent.tsx 14.28% <0.00%> (-0.33%) ⬇️
...ct/web/ui/ConnectWallet/locale/getConnectLocale.ts 70.96% <50.00%> (+4.30%) ⬆️

@MananTank MananTank marked this pull request as ready for review May 20, 2024 16:12
@MananTank MananTank changed the title [WIP] Add useConnectModal Add useConnectModal May 20, 2024
@MananTank MananTank marked this pull request as draft May 20, 2024 16:32
@MananTank MananTank marked this pull request as ready for review May 20, 2024 16:42
@MananTank MananTank requested a review from jnsdls May 20, 2024 17:57
Copy link

vercel bot commented May 21, 2024

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

@MananTank MananTank added this pull request to the merge queue May 22, 2024
Merged via the queue into main with commit 2774d1f May 22, 2024
17 checks passed
@MananTank MananTank deleted the cnct-967 branch May 22, 2024 17:42
@jnsdls jnsdls mentioned this pull request May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants