Repository navigation
Remove balance label, adjust spacing, fix fiat decimals - #484
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
✅ Files skipped from review due to trivial changes (2)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughUpdates the Balance component's display by removing the "My balance" header text and adjusting spacing. Enhances the Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Deploying wallet-bitcoin with
|
| Latest commit: |
f9c5e6c
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://8218fe38.wallet-bitcoin.pages.dev |
| Branch Preview URL: | https://wt-remove-balance-20260327.wallet-bitcoin.pages.dev |
✓ Review PassedUI/display improvements look good:
Icon updates: Back and Close icons appear to have design improvements (simplified paths). ✓ Suggestion: Verify the hide/show balance toggle works correctly after margin changes—the balance display element should still be accessible. Test coverage looks thorough. Minor note: JPY zero-decimals test is marked as unchecked—if not urgent, consider adding it to the test plan. |
Deploying wallet-mutinynet with
|
| Latest commit: |
f9c5e6c
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://a3e41a8f.arkade-wallet.pages.dev |
| Branch Preview URL: | https://wt-remove-balance-20260327.arkade-wallet.pages.dev |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/lib/format.ts`:
- Around line 87-99: The function prettyNumber treats 0 as falsy and returns '0'
early, preventing decimal formatting for zero; change the guard in prettyNumber
to only bypass formatting when num is null or undefined (e.g., num === null ||
num === undefined) and optionally handle NaN explicitly (e.g., return '0' for
NaN) so that 0 is passed through to Intl.NumberFormat and will render fixed
decimals per maximum/minimumFractionDigits and useGrouping options.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: c4b348ab-19bd-4a84-9e4c-3b80e3857083
📒 Files selected for processing (5)
src/components/Balance.tsxsrc/icons/Back.tsxsrc/icons/Close.tsxsrc/ionic.csssrc/lib/format.ts
|
Arkana PR Review ✅ Balance UI Polish Improvements:
Code Changes:
Testing:
Overall: Small, safe changes that improve polish. Ready to merge. |
Review: Remove balance label, adjust spacing, fix fiat decimals✅ Clean refactor
Minor point:
✅ Mergeable — straightforward styling + format fix. |
|
Fix merge conflicts and LFG! |
Remove "My balance" label from wallet homepage balance display. Adjust margin from 3rem/2rem to 2.5rem/1rem for tighter layout. Add minimumFractionDigits to prettyNumber so fiat always shows two decimal places (e.g. "17.30" instead of "17.3").
…rmatting Change falsy check to explicit null/undefined/NaN guard so zero values pass through Intl.NumberFormat and respect minimumFractionDigits (e.g. 0 renders as '0.00' for fiat).
The 'My balance' label was removed from the Balance component. Update e2e and unit tests to match.
7720cfa to
f9c5e6c
Compare
Review: wallet#484Title: Remove balance label, adjust spacing, fix fiat decimals SummaryClean UI improvement—removes redundant "My balance" label, tightens spacing, and fixes fiat formatting to always display 2 decimals. Observations✅ Good
Security & Protocol
Status: Looks good. Recommend testing the layout in both single/dual-currency modes before merge. |
|
Review: #484 - Remove balance label, adjust spacing, fix fiat decimals ✅ Changes are good:
No security or protocol concerns. This is a pure wallet UI improvement. |
Summary
3rem 0 2rem 0→2.5rem 0 1rem 0for a tighter layout (buttons closer to balance)minimumFractionDigitssupport toprettyNumberChanged files
src/components/Balance.tsx— removed label, updated margin, passminimumFractionDigitsfor fiatsrc/lib/format.ts— added optionalminimumFractionDigitsparam toprettyNumberTest plan
Summary by CodeRabbit
Bug Fixes
Tests