Skip to content

Redesign swap interface with calm stacked card aesthetic#6

Open
henghonglee wants to merge 1 commit into
mainfrom
claude/implement-redesign-swap-interface-LJXPnonx-VMdRs
Open

Redesign swap interface with calm stacked card aesthetic#6
henghonglee wants to merge 1 commit into
mainfrom
claude/implement-redesign-swap-interface-LJXPnonx-VMdRs

Conversation

@henghonglee
Copy link
Copy Markdown
Contributor

Summary

  • Visual refresh: Warm trust-forward palette (cream canvas #F5F1EA, walnut CTA #2A1F1A), DM Sans typography, new border-radius tokens (card: 24px, field: 16px, pill: 9999px)
  • Unified asset selector: Replaced Chain.tsx top tab bar with an AssetPill + bottom sheet (AssetSheet) listing all assets × chains (XSGD·Polygon, USDC·Solana, USDT·Tron) in a flat list
  • Consolidated address input: Merged PolygonAddress.tsx, SolAddress.tsx, and inline Tron input into a single ReceiveAddressField component that auto-fills via the appropriate wallet hook based on selected chain
  • UI primitives extracted: Button, Card, AmountInput, AssetPill, AssetSheet in src/ui/ for reuse
  • Solana providers lifted to App.tsx: Wallet hooks now available regardless of selected asset (previously only mounted when Solana was active)
  • Order.tsx restyled: Status banner uses surface card with accent-colored dot instead of bg-slate-600; QR wrapped in bg-inset rounded-card; copy button uses walnut Button primitive
  • Removed "You pay" mirror input: Replaced with compact "Pay with Lightning BTC" row and static meta row (settlement ~30s)

Files created

  • src/ui/Button.tsx — primary (walnut) + secondary (outline) variants
  • src/ui/Card.tsx — rounded-card surface with border hairline
  • src/ui/AmountInput.tsx — hero amount input with AssetPill slot
  • src/ui/AssetPill.tsx — asset logo + chain dot + label + chevron
  • src/ui/AssetSheet.tsx — bottom sheet with flat asset list
  • src/ReceiveAddressField.tsx — unified address input with auto-fill

Files deleted

  • src/Chain.tsx — replaced by asset-driven chain state in Swap.tsx
  • src/Connect.tsx — Solana providers moved to App.tsx
  • src/PolygonAddress.tsx — folded into ReceiveAddressField
  • src/SolAddress.tsx — folded into ReceiveAddressField

Test plan

  • Page renders with cream #F5F1EA background and white card; DM Sans active in devtools
  • Tapping asset pill opens bottom sheet with three rows; selecting one closes sheet and swaps the pill label + receive address strategy
  • Polygon: Connect via Web3Modal, address auto-fills
  • Solana: Connect via wallet adapter modal, address auto-fills
  • Tron: Manual address input with Paste button, no connect UI
  • Enter amount ≥ 0.01 + valid address → walnut "Create order" button enables
  • Amount < 0.01 or empty address → button stays disabled
  • Submit fires correct mutation; Order view renders with restyled surfaces, QR in cream-inset card, accent status dot
  • Mobile (375px): card has proper margins, bottom sheet covers ~75% viewport, tap targets ≥ 44px

https://claude.ai/code/session_01QuxfFxKtWjRBhqwgFF6Bvr

Replace the chain tab bar and per-chain address components with a unified
asset selector sheet and consolidated receive address field. Add design
tokens (cream/walnut palette, DM Sans typography, card/field/pill radii),
extract Button/Card/AmountInput/AssetPill/AssetSheet primitives into
src/ui/, move Solana wallet providers up to App.tsx so they're available
regardless of selected chain, restyle Order.tsx status view to match new
tokens, and delete Chain.tsx/Connect.tsx/PolygonAddress.tsx/SolAddress.tsx.

https://claude.ai/code/session_01QuxfFxKtWjRBhqwgFF6Bvr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants