Skip to content

[#353] [frontend] Progressive skeleton-to-content transitions for swap modules - #1

Open
UzyKhs wants to merge 179 commits into
mainfrom
fix/353-frontend-progressive-skeleton-to-content-transitions-for-swap-modules
Open

[#353] [frontend] Progressive skeleton-to-content transitions for swap modules#1
UzyKhs wants to merge 179 commits into
mainfrom
fix/353-frontend-progressive-skeleton-to-content-transitions-for-swap-modules

Conversation

@UzyKhs

@UzyKhs UzyKhs commented Apr 24, 2026

Copy link
Copy Markdown
Owner

Closes StellarRoute#353

Summary

  • add a reusable progressive loading transition hook for swap surfaces
  • apply progressive skeleton hold-and-reveal transitions to QuoteSummary, RouteDisplay, SimulationPanel, and PriceInfoPanel
  • add transition behavior tests for QuoteSummary and RouteDisplay
  • fix Header wallet import casing so frontend build resolves shared wallet button on case-sensitive paths

Validation

  • targeted swap transition tests passed
  • frontend unit suite run passed for executed files
  • build blocker for wallet import resolved

khanavi272-spec and others added 30 commits March 25, 2026 18:38
- Implement comprehensive formatting utilities with locale support
- Add locale settings to user preferences with persistence
- Update components to use localized formatting
- Create locale selector UI component
- Add comprehensive test suite (36/36 tests passing)
- Support 7 locales: en-US, en-GB, de-DE, fr-FR, es-ES, ja-JP, zh-CN
- Handle crypto-specific precision and currency formatting
- Implement SwapValidationSchema in lib/swap-validation.ts to unify amount, pair, and slippage logic.
- Standardize error messages in SWAP_VALIDATION_MESSAGES for consistency across components.
- Refactor SwapCard, SwapWithPairSelector, and DemoSwap to use the new schema.
- Update slippage utilities to support warning levels (low/high).
- Expand test suite to cover NaN, out-of-bounds, and future extensibility.
…ivity panels (StellarRoute#193)

## Overview
Add polished skeleton loaders to reduce layout shift and improve perceived
performance while data loads for the core trading interface components.

## Changes
- QuoteSummary: New skeleton component with animated placeholders for rate,
  network fee, and price impact fields
- RouteDisplay: New skeleton component with animated placeholders for route
  path visualization and alternative routes section
- ActivityTableSkeleton: New component rendering 5 skeleton rows matching
  the transaction table structure

## Features
- ✅ No layout shift during loading transitions (CLS = 0)
- ✅ Minimum 300-500ms skeleton display prevents flicker even on fast responses
- ✅ Visual consistency with existing design system (Tailwind + shadcn/ui)
- ✅ Responsive design works seamlessly across 320px mobile to 1024px+ desktop
- ✅ Dark mode support with proper contrast ratios
- ✅ Accessibility: Keyboard navigation and screen reader compatible

## Components Modified
- frontend/components/swap/QuoteSummary.tsx: Added isLoading prop
- frontend/components/swap/RouteDisplay.tsx: Added isLoading prop
- frontend/components/swap/SwapCard.tsx: Integrated loading states with 500ms timing
- frontend/components/TransactionHistory.tsx: Added skeleton with 300ms delay

## New Files
- frontend/components/swap/QuoteSummarySkeleton.tsx
- frontend/components/swap/RouteDisplaySkeleton.tsx
- frontend/components/shared/ActivityTableSkeleton.tsx
- frontend/components/swap/QuoteSummary.test.tsx
- frontend/components/swap/RouteDisplay.test.tsx
- frontend/components/shared/ActivityTableSkeleton.test.tsx
- frontend/components/TransactionHistory.test.tsx
- SKELETON_LOADING_TESTING.md (comprehensive testing guide)

## Testing
- 18+ unit tests covering all skeleton components
- Load state transitions verified with layout stability checks
- Responsive design tested on mobile (320px), tablet (768px), desktop (1024px+)
- Dark mode verified with proper contrast
- Flicker prevention validated with network throttling

## Acceptance Criteria
- ✅ Skeletons exist for quote card, routes list, and activity table
- ✅ Layout remains stable during loading transitions
- ✅ Loading state timing does not flicker on fast responses
- ✅ Visual style is consistent with existing design system

## Wave Notes
- Ready for Stellar Wave program inclusion
- Complexity: Trivial
- Fully documented with testing guide
Benalex8797 and others added 30 commits April 23, 2026 19:01
Performance budget checks for swap page bundle and TTI
Accessibility test automation for critical swap flows
Backend Stabilization and Unified Liquidity Model Migration
…e semantics, and predictive cache prewarming
…oss-venue-quote-diff-inspector-with-deterministic-reconciliation-ui

[326] [frontend] Cross-venue quote diff inspector with deterministic reconciliation UI
…ult-tolerant-websocket-state-machine-with-deterministic-replay-in-tests

[330] [frontend] Fault-tolerant websocket state machine with deterministic replay in tests
…ive-routing-engine

implemented multi-source consensus, adaptive routing, exactly-once semantics, and predictive cache prewarming
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.

[frontend] Progressive skeleton-to-content transitions for swap modules