Skip to content

[Playground] Feature: Headless components#5535

Merged
graphite-app[bot] merged 1 commit into
mainfrom
kien/headless-ui-playground
Dec 10, 2024
Merged

[Playground] Feature: Headless components#5535
graphite-app[bot] merged 1 commit into
mainfrom
kien/headless-ui-playground

Conversation

@kien-ngo

@kien-ngo kien-ngo commented Nov 28, 2024

Copy link
Copy Markdown
Contributor

CNCT-2588


PR-Codex overview

This PR focuses on enhancing the playground-web application by adding new components for NFT and account functionalities, improving user interface elements, and integrating headless UI components for seamless wallet interactions.

Detailed summary

  • Added ArticleCardIndex for displaying information about Headless UI.
  • Introduced new navigation links for Headless UI.
  • Expanded Account and NFT components with additional features and examples.
  • Created new pages for NFT Components and Account Components.
  • Enhanced query parameters for useQuery in account-related components.
  • Developed multiple examples for NFT and Account components, showcasing usage and customization options.

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

@changeset-bot

changeset-bot Bot commented Nov 28, 2024

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: e1fd832

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 – docs-v2 November 28, 2024 13:10 Inactive
@vercel

vercel Bot commented Nov 28, 2024

Copy link
Copy Markdown

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 Dec 10, 2024 7:34am
thirdweb_playground ✅ Ready (Inspect) Visit Preview 1 resolved Dec 10, 2024 7:34am
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 10, 2024 7:34am
wallet-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 10, 2024 7:34am

@graphite-app

graphite-app Bot commented Nov 28, 2024

Copy link
Copy Markdown
Contributor

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.

@vercel vercel Bot temporarily deployed to Preview – wallet-ui November 28, 2024 13:10 Inactive
@vercel vercel Bot temporarily deployed to Preview – thirdweb-www November 28, 2024 13:10 Inactive

kien-ngo commented Nov 28, 2024

Copy link
Copy Markdown
Contributor Author

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

@github-actions github-actions Bot added the Playground Changes involving the Playground codebase. label Nov 28, 2024
@kien-ngo kien-ngo changed the title update Playground: Headless components Nov 28, 2024
@kien-ngo kien-ngo marked this pull request as ready for review November 28, 2024 13:11
Comment thread apps/playground-web/src/components/headless-ui/account-examples.tsx Outdated
@github-actions

github-actions Bot commented Nov 28, 2024

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 44.93 KB (0%) 899 ms (0%) 399 ms (+13.29% 🔺) 1.3 s
thirdweb (cjs) 110.71 KB (0%) 2.3 s (0%) 1.2 s (+32.94% 🔺) 3.4 s
thirdweb (minimal + tree-shaking) 5.58 KB (0%) 112 ms (0%) 141 ms (+360.97% 🔺) 253 ms
thirdweb/chains (tree-shaking) 506 B (0%) 10 ms (0%) 19 ms (+119.94% 🔺) 29 ms
thirdweb/react (minimal + tree-shaking) 19.01 KB (0%) 381 ms (0%) 187 ms (+182.61% 🔺) 568 ms

@kien-ngo kien-ngo force-pushed the kien/headless-ui-playground branch from f0b150e to 1c90623 Compare November 28, 2024 13:17
@github-actions github-actions Bot added packages SDK Involves changes to the thirdweb SDK labels Nov 28, 2024
Comment thread apps/playground-web/src/components/headless-ui/account-examples.tsx Outdated
@codecov

codecov Bot commented Nov 28, 2024

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 51.23%. Comparing base (d35eaa6) to head (f25d1d8).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5535      +/-   ##
==========================================
+ Coverage   51.20%   51.23%   +0.03%     
==========================================
  Files        1093     1092       -1     
  Lines       57364    57346      -18     
  Branches     4677     4677              
==========================================
+ Hits        29374    29383       +9     
+ Misses      27274    27247      -27     
  Partials      716      716              
Flag Coverage Δ *Carryforward flag
legacy_packages 65.68% <ø> (ø) Carriedforward from d35eaa6
packages 47.85% <100.00%> (+0.03%) ⬆️

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

Files with missing lines Coverage Δ
...rdweb/src/react/web/ui/prebuilt/Account/avatar.tsx 66.12% <100.00%> (+2.97%) ⬆️
...hirdweb/src/react/web/ui/prebuilt/Account/name.tsx 81.63% <100.00%> (+2.08%) ⬆️

... and 1 file with indirect coverage changes

@kien-ngo kien-ngo force-pushed the kien/account-balance-in-usd branch from 5f95189 to b31951c Compare December 2, 2024 10:15
@kien-ngo kien-ngo force-pushed the kien/headless-ui-playground branch from 1a11ea7 to 4808d98 Compare December 2, 2024 10:15
@kien-ngo kien-ngo force-pushed the kien/account-balance-in-usd branch 2 times, most recently from ebfc761 to 7beaa25 Compare December 2, 2024 10:33
@kien-ngo kien-ngo force-pushed the kien/headless-ui-playground branch from 4808d98 to bdbf2d3 Compare December 2, 2024 10:34
@gregfromstl gregfromstl changed the title Playground: Headless components [Playground] Feature: Headless components Dec 3, 2024
@kien-ngo kien-ngo force-pushed the kien/account-balance-in-usd branch 5 times, most recently from a650e2f to a5e6ce9 Compare December 4, 2024 03:58
@kien-ngo kien-ngo force-pushed the kien/headless-ui-playground branch from bdbf2d3 to 0148fd5 Compare December 4, 2024 03:59
Comment thread apps/playground-web/src/components/headless-ui/account-examples.tsx Outdated

kien-ngo commented Dec 9, 2024

Copy link
Copy Markdown
Contributor Author

CNCT-2588

Comment thread apps/playground-web/src/app/connect/ui/nft/page.tsx Outdated
/>
}
fallbackComponent={
<AccountAddress

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wonder if this should be the fallback by default. feels like most ppl would want that

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does making it return a different component, makes it impure? Personally I'm happy with making things a bit redundant (or verbose, if you will) in return for what we call a true headless component

@joaquim-verges joaquim-verges left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looking good ser!

@graphite-app

graphite-app Bot commented Dec 10, 2024

Copy link
Copy Markdown
Contributor

Merge activity

  • Dec 10, 2:14 AM EST: A user added this pull request to the Graphite merge queue.
  • Dec 10, 2:22 AM EST: The Graphite merge queue couldn't merge this PR because it was not satisfying all requirements (Failed CI: 'Vercel – thirdweb-www', 'E2E Tests (npm, webpack)', 'E2E Tests (yarn, vite)', 'E2E Tests (yarn, webpack)', 'E2E Tests (yarn, esbuild)', 'E2E Tests (bun, webpack)').
  • Dec 10, 2:34 AM EST: A user added this pull request to the Graphite merge queue.
  • Dec 10, 2:34 AM EST: A user merged this pull request with the Graphite merge queue.

CNCT-2588

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on enhancing the `playground-web` application by adding new components and improving existing ones related to NFT and account functionalities, showcasing headless UI components for better Web3 integration.

### Detailed summary
- Added `ArticleCardIndex` in `page.tsx`.
- Introduced new navigation link for "Headless UI".
- Expanded `Account` and `NFT` components with detailed examples.
- Improved `useQuery` parameters in `avatar.tsx` and `name.tsx`.
- Created several new components in `nft-examples.tsx` and `account-examples.tsx` for displaying NFT and account information.

> ✨ 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

packages Playground Changes involving the Playground codebase. SDK Involves changes to the thirdweb SDK

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants