feat: responsive wallet modal with Freighter, Albedo & Rango support - #584
Conversation
- Add Rango wallet to supportedWallets and WALLET_INSTALL_URL in StellarWalletProvider - Rewrite WalletModal with responsive layout (mobile/tablet/desktop) - Add inline SVG wallet icons (no external image files required) - Add radiogroup ARIA role, aria-checked on each wallet option - Add focus-visible ring styles for keyboard navigation - Add animated loading state with Loader2 spinner - Add aria-disabled on Connect Now button - Add data-testid attributes for testing - Add wallet-modal.test.tsx with 20 unit tests covering render, selection, connect, auto-close, and accessibility
|
@oscar24357 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
📝 WalkthroughWalkthroughWalletModal now supports Rango, wallet-specific SVG icons, keyboard-accessible selection, guarded connection actions, loading states, automatic closing after connection, and expanded accessibility tests. ChangesMulti-wallet selector
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
actor User
participant WalletModal
participant StellarWalletProvider
User->>WalletModal: Select wallet by click or keyboard
WalletModal->>WalletModal: Set activeSelection
User->>WalletModal: Activate Connect Now
WalletModal->>StellarWalletProvider: connect(activeSelection)
StellarWalletProvider-->>WalletModal: Update connection state
WalletModal->>WalletModal: Close when isConnected becomes true
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 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 |
There was a problem hiding this comment.
Actionable comments posted: 5
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@apps/web/src/components/organisms/wallet-modal.test.tsx`:
- Around line 13-17: Expand the defaultWallets fixture in the wallet modal
regression test to include every wallet supported by StellarWalletProvider,
specifically xBull, Rabet, and Lobstr, using their provider IDs, names, and
icons. Keep the existing wallet entries unchanged so the test covers the
complete provider-supported list.
- Around line 147-159: Add regression tests alongside the existing
keyboard-selection tests in wallet-modal.test.tsx for the radio group’s
arrow-key behavior: Right/Down should move focus and selection to the next
wallet, while Left/Up should move to the previous wallet, including wraparound
if supported by the component. Use the existing wallet-option test IDs and
assert the selected option’s aria-checked state after each key event.
In `@apps/web/src/components/organisms/wallet-modal.tsx`:
- Around line 78-81: Remove the eager setIsModalOpen(false) call from
StellarWalletProvider.connect before getAddress() resolves, while preserving
modal closure through the wallet-modal.tsx effect when isConnected becomes true.
Ensure failed or pending connections keep the modal open and retain the existing
auto-close behavior after successful connection.
- Around line 94-99: Update the wallet option keyboard behavior around
handleKeyDown and the option rendering so the group follows radiogroup
semantics: keep exactly one option tabbable via roving tabIndex, move focus and
selection to the previous/next option on ArrowUp/Down/Left/Right with
wraparound, and retain Enter/Space selection. Ensure the active option’s
tabIndex and focus state stay synchronized when the selection changes.
In `@apps/web/src/providers/StellarWalletProvider.tsx`:
- Line 169: Add the missing rango.png asset under the public icons directory so
the icon path used by the supportedWallets entry for id "rango" resolves
successfully. Preserve the existing icon reference and filename.
🪄 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: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 460d817b-0c42-4a63-8f79-79441c79b6b0
📒 Files selected for processing (3)
apps/web/src/components/organisms/wallet-modal.test.tsxapps/web/src/components/organisms/wallet-modal.tsxapps/web/src/providers/StellarWalletProvider.tsx
|
Hello maintainer, good evening. Can you please award this points to me on drips..thank you |
|
hello maintainer, can you please award this point to me on drips |
|
dont forget to offramp using https://stellar.fundable.finance/offramp its fast, free and p2p rates |
closes #525
Summary by CodeRabbit
New Features
Bug Fixes
Accessibility