Skip to content

feat(web): mobile responsive swap card layout (#426)#474

Merged
Mimah97 merged 2 commits into
Vatix-Protocol:mainfrom
godekina:feat/mobile-responsive-swap-card
Jun 30, 2026
Merged

feat(web): mobile responsive swap card layout (#426)#474
Mimah97 merged 2 commits into
Vatix-Protocol:mainfrom
godekina:feat/mobile-responsive-swap-card

Conversation

@godekina

@godekina godekina commented Jun 29, 2026

Copy link
Copy Markdown

app/page.tsx | Single-column on mobile, side-by-side md:flex-row chart + widget on tablet/desktop, max-w-5xl wrapper
app/layout.tsx | Added viewportFit: 'cover' for iOS safe-area inset support
components/SwapWidget.tsx | w-full md:w-[448px], responsive px-3 sm:px-4, backdrop overlay for token picker tap-to-close, aria-haspopup/aria-expanded on picker buttons, min-h-[44px] on dropdown options, min-h-[52px] sm:min-h-[44px] on the CTA
components/SwapCard.tsx | Removed max-w-sm, rounded-2xl, p-4 sm:p-5, settings button gets h-9 w-9 touch target + aria-expanded, min-h-[52px] button on mobile
components/SwapSettings.tsx | flex-wrap on slippage buttons so they wrap on narrow screens, removed max-w-sm, min-h-[40px] on all buttons
components/SwapConfirmModal.tsx | pb-[env(safe-area-inset-bottom,1rem)] for iOS notch, sm:mx-auto centering
components/Navbar.tsx | Full mobile hamburger menu with aria-expanded, aria-controls, aria-label; desktop links hidden with hidden sm:flex; mobile dropdown with min-h-[44px] link tap targets
components/Navbar.test.tsx | 13 new tests: hamburger open/close, aria attributes, accessibility, desktop links
components/SwapWidget.test.tsx | 26 new tests: layout classes, token picker backdrop/aria, touch targets, loading/error/empty states

closes #426

Gideon Odekina and others added 2 commits June 29, 2026 20:43
Implements mobile-first responsive layout across all swap UI components.

Changes:

- page.tsx: single-column on mobile, side-by-side chart+widget on md+ (max-w-5xl)

- SwapWidget: w-full mobile / md:w-[448px] desktop, responsive px, touch-friendly

- SwapWidget: TokenPickerButton adds backdrop overlay for mobile tap-to-close

- SwapWidget: aria-haspopup + aria-expanded on token picker buttons

- SwapWidget: min-h-[44px] on dropdown options, min-h-[52px] CTA on mobile

- SwapCard: removed max-w-sm constraint, rounded-2xl, min-h-[52px] button

- SwapCard: settings button gets h-9 w-9 touch target + aria-expanded

- SwapSettings: flex-wrap slippage buttons, removed max-w-sm, min-h-[40px] btns

- SwapConfirmModal: safe-area-inset-bottom for iOS notch, sm:mx-auto centering

- Navbar: mobile hamburger menu with aria-expanded, aria-controls, aria-label

- Navbar: desktop links hidden on mobile (hidden sm:flex), mobile dropdown panel

- Navbar: mobile nav links have min-h-[44px] touch targets

- layout.tsx: viewportFit=cover for iOS safe-area support

- Add Navbar.test.tsx (13 tests: hamburger menu, a11y, desktop rendering)

- Add SwapWidget.test.tsx (26 tests: layout, token picker, states, touch targets)
@Mimah97 Mimah97 merged commit d682689 into Vatix-Protocol:main Jun 30, 2026
0 of 4 checks passed
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.

Mobile responsive swap card layout

2 participants