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

[React] Fix: Balance label space #4778

Closed
wants to merge 2 commits into from
Closed

Conversation

gregfromstl
Copy link
Member

@gregfromstl gregfromstl commented Sep 23, 2024

Problem solved

Short description of the bug fixed or feature added


PR-Codex overview

This PR focuses on improving the user interface of the connect wallet feature by fixing spacing issues in the native balance label and updating the biome.json configuration to include a new linter rule.

Detailed summary

  • Fixed spacing in the native balance label in packages/thirdweb/src/react/web/ui/ConnectWallet/Details.tsx.
  • Updated biome.json to add useConsistentCurlyBraces: "off" under the nursery linter rules.

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

Copy link

vercel bot commented Sep 23, 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 Sep 23, 2024 10:53pm
thirdweb_playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 23, 2024 10:53pm
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 23, 2024 10:53pm
wallet-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 23, 2024 10:53pm

Copy link

changeset-bot bot commented Sep 23, 2024

🦋 Changeset detected

Latest commit: 7629c44

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

This PR includes changesets to release 1 package
Name Type
thirdweb 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

Copy link

graphite-app bot commented Sep 23, 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.

Copy link
Contributor

github-actions bot commented Sep 23, 2024

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 41.91 KB (0%) 839 ms (0%) 3 s (+47.67% 🔺) 3.8 s
thirdweb (cjs) 101.47 KB (0%) 2.1 s (0%) 7.2 s (+13.66% 🔺) 9.2 s
thirdweb (minimal + tree-shaking) 4.82 KB (0%) 97 ms (0%) 162 ms (-66.58% 🔽) 258 ms
thirdweb/chains (tree-shaking) 498 B (0%) 10 ms (0%) 197 ms (+29.61% 🔺) 207 ms
thirdweb/react (minimal + tree-shaking) 16.73 KB (0%) 335 ms (0%) 1.5 s (+10.66% 🔺) 1.8 s

Copy link

codecov bot commented Sep 23, 2024

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Project coverage is 49.06%. Comparing base (2d34771) to head (7629c44).
Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
...hirdweb/src/react/web/ui/ConnectWallet/Details.tsx 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4778      +/-   ##
==========================================
- Coverage   49.07%   49.06%   -0.01%     
==========================================
  Files        1054     1054              
  Lines       56855    56866      +11     
  Branches     3889     3889              
==========================================
  Hits        27902    27902              
- Misses      28320    28331      +11     
  Partials      633      633              
Flag Coverage Δ *Carryforward flag
legacy_packages 65.68% <ø> (ø) Carriedforward from 2d34771
packages 45.13% <0.00%> (-0.02%) ⬇️

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

Files with missing lines Coverage Δ
...hirdweb/src/react/web/ui/ConnectWallet/Details.tsx 7.31% <0.00%> (-0.01%) ⬇️

... and 1 file with indirect coverage changes

"rules": {
"nursery": {
"noProcessEnv": "warn",
"useConsistentCurlyBraces": "off"
Copy link
Member

Choose a reason for hiding this comment

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

no

Comment on lines +263 to 264
{formatBalanceOnButton(Number(balanceQuery.data.displayValue))}{" "}
{balanceQuery.data.symbol}
Copy link
Member

Choose a reason for hiding this comment

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

use string concat instead

Suggested change
{formatBalanceOnButton(Number(balanceQuery.data.displayValue))}{" "}
{balanceQuery.data.symbol}
{`${formatBalanceOnButton(Number(balanceQuery.data.displayValue))} ${balanceQuery.data.symbol}`}

@@ -366,7 +366,7 @@ function DetailsModal(props: {
formatNumber(Number(balanceQuery.data.displayValue), 5)
) : (
<Skeleton height="1em" width="100px" />
)}
)}{" "}
Copy link
Member

Choose a reason for hiding this comment

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

u can string concat the value + symbol and show the skeleton for both (probably better anyways)

@jnsdls jnsdls deleted the fix/balance-label-space branch September 30, 2024 22:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants