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

[CORE-652] Add chain icon in SingleNetworkSelector + other chain icon related fixes #5794

Conversation

MananTank
Copy link
Member

@MananTank MananTank commented Dec 18, 2024

Problem solved

Short description of the bug fixed or feature added


PR-Codex overview

This PR primarily focuses on updating the ChainIcon component and its usage across various files. The changes include modifying how icons are rendered and adjusting their sizes using class names instead of size props.

Detailed summary

  • Added decoding="async" to an image component.
  • Replaced size prop with className for ChainIcon in multiple components.
  • Introduced a new fallbackChainIcon for better handling of missing icons.
  • Updated ChainIcon implementation to use the Img component.
  • Adjusted styles in several components to enhance layout and appearance.

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

Copy link

linear bot commented Dec 18, 2024

Copy link

vercel bot commented Dec 18, 2024

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 Dec 19, 2024 3:06pm
3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
docs-v2 ⬜️ Skipped (Inspect) Dec 19, 2024 3:06pm
thirdweb_playground ⬜️ Skipped (Inspect) Dec 19, 2024 3:06pm
wallet-ui ⬜️ Skipped (Inspect) Dec 19, 2024 3:06pm

Copy link

changeset-bot bot commented Dec 18, 2024

⚠️ No Changeset found

Latest commit: 00b6c2e

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 – wallet-ui December 18, 2024 16:10 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground December 18, 2024 16:10 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 December 18, 2024 16:10 Inactive
@MananTank MananTank marked this pull request as ready for review December 18, 2024 16:10
@MananTank MananTank requested review from jakubkrehel and a team as code owners December 18, 2024 16:10
@github-actions github-actions bot added the Dashboard Involves changes to the Dashboard. label Dec 18, 2024
Copy link
Member Author

MananTank commented Dec 18, 2024


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

codecov bot commented Dec 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 53.20%. Comparing base (aad6586) to head (00b6c2e).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5794   +/-   ##
=======================================
  Coverage   53.20%   53.20%           
=======================================
  Files        1101     1101           
  Lines       59100    59100           
  Branches     4817     4817           
=======================================
  Hits        31447    31447           
  Misses      26936    26936           
  Partials      717      717           
Flag Coverage Δ *Carryforward flag
legacy_packages 65.68% <ø> (ø) Carriedforward from aad6586
packages 50.39% <ø> (ø)

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

Copy link
Contributor

github-actions bot commented Dec 18, 2024

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 45.02 KB (0%) 901 ms (0%) 3.5 s (+23.62% 🔺) 4.4 s
thirdweb (cjs) 110.76 KB (0%) 2.3 s (0%) 7.3 s (-7.91% 🔽) 9.5 s
thirdweb (minimal + tree-shaking) 5.58 KB (0%) 112 ms (0%) 746 ms (+199.16% 🔺) 858 ms
thirdweb/chains (tree-shaking) 506 B (0%) 10 ms (0%) 108 ms (+167.19% 🔺) 118 ms
thirdweb/react (minimal + tree-shaking) 19.1 KB (0%) 383 ms (0%) 669 ms (-35.49% 🔽) 1.1 s

@MananTank MananTank force-pushed the 12-18-_core-652_add_chain_icon_in_singlenetworkselector_other_chain_icon_related_fixes branch from 46a959d to 8ad0c17 Compare December 18, 2024 17:55
@vercel vercel bot temporarily deployed to Preview – wallet-ui December 18, 2024 17:55 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 December 18, 2024 17:55 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground December 18, 2024 17:55 Inactive
@@ -196,7 +196,7 @@ export const NetworkSelectorButton: React.FC<NetworkSelectorButtonProps> = ({
});
}}
>
<ChainIcon ipfsSrc={chain?.icon?.url} size={20} />
<ChainIcon ipfsSrc={chain?.icon?.url} className="size-5" />
Copy link
Member

Choose a reason for hiding this comment

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

btw this is one of the things we should switch to using the react sdk components for!

Copy link

graphite-app bot commented Dec 19, 2024

Merge activity

… related fixes (#5794)

## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR primarily focuses on updating the `ChainIcon` component's implementation and its usage across various files, specifically changing the way the icon's size is handled and integrating a new fallback mechanism.

### Detailed summary
- Added `decoding="async"` to an `Image` component.
- Replaced `size` prop with `className` for `ChainIcon` across multiple components, adjusting sizes accordingly.
- Updated `ChainIcon` implementation to use a new `Img` component.
- Introduced a fallback image for `ChainIcon` in case of loading failures.
- Added stories for `MultiNetworkSelector` and `SingleNetworkSelector` components.

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

<!-- end pr-codex -->
@MananTank MananTank force-pushed the 12-18-_core-652_add_chain_icon_in_singlenetworkselector_other_chain_icon_related_fixes branch from 8ad0c17 to 00b6c2e Compare December 19, 2024 14:55
@vercel vercel bot temporarily deployed to Preview – wallet-ui December 19, 2024 14:55 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 December 19, 2024 14:55 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground December 19, 2024 14:55 Inactive
@graphite-app graphite-app bot merged commit 00b6c2e into main Dec 19, 2024
32 checks passed
@graphite-app graphite-app bot deleted the 12-18-_core-652_add_chain_icon_in_singlenetworkselector_other_chain_icon_related_fixes branch December 19, 2024 15:06
@vercel vercel bot temporarily deployed to Production – wallet-ui December 19, 2024 15:06 Inactive
@vercel vercel bot temporarily deployed to Production – thirdweb_playground December 19, 2024 15:06 Inactive
@vercel vercel bot temporarily deployed to Production – docs-v2 December 19, 2024 15:06 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