Skip to content

feat(ui): add mobile slide-up sheet for buy and sell modals (#865) - #901

Merged
Chucks1093 merged 2 commits into
accesslayerorg:devfrom
Oluwasuyi-Oluwatimilehin-Daniel:feature/865-mobile-slide-up-sheet
Sep 4, 2026
Merged

feat(ui): add mobile slide-up sheet for buy and sell modals (#865)#901
Chucks1093 merged 2 commits into
accesslayerorg:devfrom
Oluwasuyi-Oluwatimilehin-Daniel:feature/865-mobile-slide-up-sheet

Conversation

@Oluwasuyi-Oluwatimilehin-Daniel

Copy link
Copy Markdown
Contributor

Summary

Converts the buy and sell key dialogs into responsive, mobile-first slide-up bottom sheets on viewports below 768px while preserving centered modals on desktop viewports.

Changes

  • TradeDialog:
    • Integrated useIsMobile() hook to detect mobile viewports (<768px).
    • Rendered BottomSheet, BottomSheetContent, and BottomSheetHandle on mobile with slide-up transitions (slide-in-from-bottom-8).
    • Constrained mobile sheet height with max-h-[calc(100vh-80px)] overflow-y-auto leaving at least 80px of page visible above the sheet.
    • Retained standard centered Dialog on desktop viewports (>=768px).
    • Preserved keyboard traps, auto-focus, submission locks, and fee preview logic across both variants.
  • useIsMobile:
    • Added safety checks for window.matchMedia availability across SSR and test environments.
  • Testing:
    • Added TradeDialog.mobileBottomSheet.test.tsx covering mobile sheet rendering, desktop centered modal rendering, dynamic viewport resizing, swipe-down dismissal gestures, height bounds, and submit-lock states.

Acceptance Criteria Verification

  • Bottom sheet shown on viewports below 768px
  • Centred modal shown on viewports 768px and above
  • Slide-up animation plays on open
  • Swipe-down dismisses the sheet
  • Page visible above the sheet on mobile (>=80px visible at the top)

Closes #865

…yerorg#865)

- Detect mobile viewport (< 768px) via useIsMobile and render buy/sell modals as BottomSheet
- Provide slide-up CSS transform transition and drag handle for swipe-down to dismiss
- Ensure max height leaves at least 80px visible at the top of the viewport on mobile
- Continue rendering standard centered Dialog on desktop viewports (>= 768px)
- Add comprehensive integration and unit tests for mobile BottomSheet
@drips-wave

drips-wave Bot commented Aug 31, 2026

Copy link
Copy Markdown

@Oluwasuyi-Oluwatimilehin-Daniel 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! 🚀

Learn more about application limits

@Chucks1093
Chucks1093 merged commit 9b00907 into accesslayerorg:dev Sep 4, 2026
1 check passed
Ajibose added a commit to Ajibose/accesslayer-client that referenced this pull request Sep 4, 2026
Resolves conflicts from the mobile bottom-sheet refactor (accesslayerorg#901), which
extracted TradeDialog's desktop-only inline JSX into a shared
`bodyContent` variable reused by both the sheet and the dialog. Ported
this PR's LaunchPenaltyWarning/SellFeeBreakdown additions into that
shared `bodyContent` instead of keeping a duplicated inline copy.

Also resolves the same additive slippageTolerance.utils.ts/test.ts
conflict as accesslayerorg#872 vs accesslayerorg#877 (both sides just append), and a purely
additive package.json conflict (canvas-confetti deps from accesslayerorg#892).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HCiPXzfWN9jdJAfNQQ6nbW
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.

Add a mobile slide-up sheet for the buy and sell modals on viewports below 768px

2 participants