This PR implements a UX improvement to help new users unfamiliar with Stellar by adding an informational tooltip icon next to every visible "XLM" label throughout the application.
The tooltip provides clear, concise information explaining that XLM (Lumens) is the native currency of the Stellar network and is used to pay transaction fees and maintain minimum account balances.
- Reusable, accessible tooltip component
- Keyboard navigable (Enter, Space, Escape)
- Mobile-friendly with proper touch targets (44x44px minimum)
- Click-outside-to-close functionality
- Smooth animations using Framer Motion
- Proper ARIA attributes for screen readers
The info icon has been added to:
- ✅ Balance display (next to XLM asset)
- ✅ Payment form amount input (helper text)
- ✅ KYC warning messages
- ✅ Confirmation dialog (amount, fee, and total fields)
- Consistent with existing design system
- Uses design tokens from
tokens.js - Responsive breakpoints for mobile devices
- Proper spacing that doesn't interfere with layout
- Dark mode compatible
- Full keyboard navigation support
- ARIA labels and roles
- Focus management
- Screen reader compatible
- Minimum touch target sizes (WCAG 2.1 Level AA)
- ✅ Rendering and display states
- ✅ Tooltip show/hide behavior
- ✅ Keyboard navigation (Enter, Space, Escape)
- ✅ Click outside behavior
- ✅ Touch events for mobile
- ✅ ARIA attributes validation
- ✅ Animation behavior
- ✅ Multiple instances handling
- ✅ Edge cases and cleanup
- ✅ Balance display integration
- ✅ Payment form integration
- ✅ KYC warning integration
- ✅ Keyboard navigation flow
- ✅ Form submission compatibility
- ✅ Layout and spacing preservation
All tests pass and maintain existing coverage thresholds.
- Desktop: Full tooltip with optimal positioning
- Tablet: Adjusted sizing and spacing
- Mobile: Touch-optimized with larger tap targets
- Small screens (320px): Tooltip repositioning to prevent overflow
- WCAG 2.1 Level AA compliant
- Keyboard accessible
- Screen reader compatible
- Proper focus management
- Adequate color contrast
- Touch target sizes meet guidelines
frontend/src/components/XLMInfoIcon.jsx- Main componentfrontend/tests/XLMInfoIcon.test.jsx- Unit testsfrontend/tests/XLMInfoIcon.integration.test.jsx- Integration testsfrontend/docs/XLM_INFO_TOOLTIP.md- Feature documentation
frontend/src/App.jsx- Integrated icon in balance and payment formfrontend/src/components/ConfirmSendDialog.jsx- Added icon to confirmation dialogfrontend/src/index.css- Added tooltip styles
-
Checkout the branch:
git checkout feature/xlm-info-tooltip
-
Install dependencies (if needed):
npm install
-
Run tests:
npm test -
Start the development server:
npm run dev
-
Manual testing:
- Create an account
- Check balance - verify info icon appears next to XLM
- Click the info icon - tooltip should appear
- Press Escape - tooltip should close
- Navigate with Tab key - icon should be focusable
- Fill payment form - verify helper text with icon
- Submit payment - verify icon in confirmation dialog
- Test on mobile device or responsive mode
The info icon appears next to XLM in the balance list.
Helper text with info icon below the amount input field.
Info icons appear next to XLM amounts in the payment summary.
Clear explanation of what XLM is and its purpose.
- Code follows project style guidelines
- Self-review completed
- Comments added for complex logic
- Documentation updated
- No new warnings generated
- Unit tests added and passing
- Integration tests added and passing
- Accessibility tested
- Mobile responsive tested
- Keyboard navigation tested
- Dark mode compatible
- No breaking changes to existing functionality
- Accessibility: Verify ARIA attributes and keyboard navigation
- Mobile UX: Test touch interactions and responsive behavior
- Layout: Ensure no spacing or alignment issues
- Performance: Check for any rendering issues
- Tests: Review test coverage and edge cases
Comprehensive documentation has been added in frontend/docs/XLM_INFO_TOOLTIP.md covering:
- Implementation details
- Integration points
- Styling approach
- Accessibility features
- Testing strategy
- Browser compatibility
- Maintenance guidelines
- Icon Choice: Used ℹ️ emoji for universal recognition
- Placement: Inline with text to maintain context
- Tooltip Position: Above the icon to avoid covering content
- Animation: Subtle fade and scale for smooth UX
- Color: Uses primary color from design system
- Size: Balanced between visibility and non-intrusiveness
None
- Add i18n support for tooltip content
- Allow customization of tooltip position
- Add analytics tracking for tooltip interactions
- Extend to other currencies (USDC, EURC, etc.)
- This is a purely additive feature with no breaking changes
- All existing tests continue to pass
- The component is designed to be reusable for future currency info tooltips
- Performance impact is minimal (event listeners are properly cleaned up)
Closes #[issue-number] (if applicable)
Ready for review! 🚀