Skip to content

Conversation

@joaquim-verges
Copy link
Member

@joaquim-verges joaquim-verges commented Nov 10, 2024

Problem solved

Short description of the bug fixed or feature added


PR-Codex overview

This PR focuses on enhancing the NFT component and its related functionalities in the thirdweb library, introducing new props for better loading and fallback handling, and refining the overall structure and documentation of various components.

Detailed summary

  • Deleted several test files related to NFT and wallet integration.
  • Updated NFT component structure to use NFTProvider for context management.
  • Introduced loadingComponent and fallbackComponent props in NFTMedia, NFTName, and NFTDescription.
  • Modified documentation for components to reflect changes and improve clarity.
  • Changed function annotations to improve consistency across the codebase.
  • Revised sidebar links and organization in various documentation files.
  • Enhanced error handling in NFT fetching logic.
  • Updated example usages in documentation to reflect new component structure.

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

@vercel
Copy link

vercel bot commented Nov 10, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 20, 2024 0:21am
thirdweb_playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 20, 2024 0:21am
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 20, 2024 0:21am
wallet-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 20, 2024 0:21am

@changeset-bot
Copy link

changeset-bot bot commented Nov 10, 2024

🦋 Changeset detected

Latest commit: 0e5d120

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
thirdweb Minor

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

@graphite-app
Copy link
Contributor

graphite-app bot commented Nov 10, 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 Portal Involves changes to the Portal (docs) codebase. packages labels Nov 10, 2024
Copy link
Member Author

joaquim-verges commented Nov 10, 2024

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

@github-actions
Copy link
Contributor

github-actions bot commented Nov 10, 2024

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 44.97 KB (+0.16% 🔺) 900 ms (+0.16% 🔺) 3.6 s (+87.62% 🔺) 4.5 s
thirdweb (cjs) 105.01 KB (-0.02% 🔽) 2.2 s (-0.02% 🔽) 6.1 s (+27.65% 🔺) 8.2 s
thirdweb (minimal + tree-shaking) 5.6 KB (-0.14% 🔽) 113 ms (-0.14% 🔽) 254 ms (-26.38% 🔽) 366 ms
thirdweb/chains (tree-shaking) 506 B (0%) 10 ms (0%) 58 ms (-4.07% 🔽) 68 ms
thirdweb/react (minimal + tree-shaking) 18.38 KB (-0.15% 🔽) 368 ms (-0.15% 🔽) 431 ms (+2.7% 🔺) 798 ms

@codecov
Copy link

codecov bot commented Nov 10, 2024

Codecov Report

Attention: Patch coverage is 71.30435% with 33 lines in your changes missing coverage. Please review.

Project coverage is 43.81%. Comparing base (f368793) to head (0e5d120).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...s/thirdweb/src/react/web/ui/prebuilt/NFT/media.tsx 57.57% 14 Missing ⚠️
...s/thirdweb/src/react/web/ui/prebuilt/NFT/hooks.tsx 78.37% 8 Missing ⚠️
...es/thirdweb/src/react/web/ui/prebuilt/NFT/name.tsx 71.42% 6 Missing ⚠️
...hirdweb/src/react/web/ui/prebuilt/NFT/provider.tsx 72.22% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5374      +/-   ##
==========================================
- Coverage   45.49%   43.81%   -1.69%     
==========================================
  Files        1070     1069       -1     
  Lines       55770    55726      -44     
  Branches     4034     3882     -152     
==========================================
- Hits        25372    24415     -957     
- Misses      29711    30628     +917     
+ Partials      687      683       -4     
Flag Coverage Δ *Carryforward flag
legacy_packages 65.68% <ø> (ø) Carriedforward from f368793
packages 38.50% <71.30%> (-2.10%) ⬇️

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

Files with missing lines Coverage Δ
packages/thirdweb/src/client/client.ts 100.00% <ø> (ø)
...ions/erc721/lazyMinting/read/getBatchesToReveal.ts 80.95% <ø> (ø)
...nsions/modules/common/checkModulesCompatibility.ts 88.50% <ø> (ø)
...s/thirdweb/src/extensions/prebuilts/deploy-pack.ts 82.75% <ø> (ø)
.../thirdweb/src/extensions/thirdweb/write/publish.ts 91.13% <ø> (ø)
...rdweb/src/react/core/hooks/others/useChainQuery.ts 6.01% <ø> (ø)
...eb/src/react/core/providers/connection-manager.tsx 57.89% <ø> (ø)
...ckages/thirdweb/src/react/core/utils/walletIcon.ts 57.95% <ø> (ø)
...hirdweb/src/react/web/hooks/wallets/useProfiles.ts 10.52% <ø> (ø)
...dweb/src/react/web/providers/thirdweb-provider.tsx 100.00% <ø> (ø)
... and 27 more

... and 23 files with indirect coverage changes

---- 🚨 Try these New Features:

## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR primarily focuses on refactoring the `NFT` component and its related functionalities to improve performance, enhance control over fetching logic, and simplify usage by removing the need for `React.Suspense`. It also introduces new props for better loading and error handling.

### Detailed summary
- Deleted several test files and an unused `NFT.tsx` file.
- Introduced `NFTProvider`, `NFTMedia`, `NFTName`, and `NFTDescription` components.
- Added `loadingComponent` and `fallbackComponent` props for better handling of loading states and errors.
- Updated references in tests to use new component structure.
- Renamed and adjusted documentation comments to reflect new functionality.
- Improved sidebar organization by updating links and names for consistency.
- Enhanced utility functions and hooks for better NFT data fetching and context management.

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

<!-- end pr-codex -->
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. merge-queue Adds the pull request to Graphite's merge queue. packages Portal Involves changes to the Portal (docs) codebase. SDK Involves changes to the thirdweb SDK

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants