Skip to content

feat(drawer): add swipe-to-dismiss on mobile using Vaul#134

Closed
tansawit wants to merge 3 commits intomainfrom
feat/drawer-swipe-to-dismiss
Closed

feat(drawer): add swipe-to-dismiss on mobile using Vaul#134
tansawit wants to merge 3 commits intomainfrom
feat/drawer-swipe-to-dismiss

Conversation

@tansawit
Copy link
Contributor

@tansawit tansawit commented Feb 2, 2026

Add swipe-to-dismiss functionality to the wallet drawer on mobile using Vaul.

Changes

  • Replace Base UI Dialog with Vaul for unified drawer implementation
  • Mobile: slides from bottom with swipe-to-dismiss and tap-overlay-to-dismiss
  • Desktop: slides from right (same visual behavior as before)
  • Simplified code by using single component for both breakpoints

Note

Medium Risk
Moderate UI behavior refactor around open/close and outside-interaction handling; regressions could affect dismissal, focus/scroll locking, or transaction rejection flows.

Overview
Updates the wallet Drawer to use vaul instead of Base UI Dialog, enabling mobile bottom-sheet behavior (including swipe-to-dismiss) while keeping the desktop drawer opening from the right.

Refactors drawer overlay/content styling into separate mobile/desktop classes, adds a mobile-only clickable overlay with keyboard handling, and adjusts outside-interaction handling to prevent accidental dismissals on mobile. Error rendering in AsyncBoundary/drawer fallback is also hardened to handle non-Error throwables.

Written by Cursor Bugbot for commit 729746b. This will update automatically on new commits. Configure here.

@coderabbitai
Copy link

coderabbitai bot commented Feb 2, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/drawer-swipe-to-dismiss

Comment @coderabbitai help to get the list of available commands and usage tips.

@tansawit
Copy link
Contributor Author

tansawit commented Feb 2, 2026

Will mark ready for review once #130 is merged

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Feb 2, 2026

Deploying interwovenkit-staging with  Cloudflare Pages  Cloudflare Pages

Latest commit: 729746b
Status: ✅  Deploy successful!
Preview URL: https://ff76eeb9.interwovenkit-staging.pages.dev
Branch Preview URL: https://feat-drawer-swipe-to-dismiss.interwovenkit-staging.pages.dev

View logs

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Feb 2, 2026

Deploying interwovenkit-testnet with  Cloudflare Pages  Cloudflare Pages

Latest commit: 729746b
Status: ✅  Deploy successful!
Preview URL: https://3860614a.interwovenkit-testnet.pages.dev
Branch Preview URL: https://feat-drawer-swipe-to-dismiss.interwovenkit-testnet.pages.dev

View logs

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Feb 2, 2026

Deploying interwovenkit with  Cloudflare Pages  Cloudflare Pages

Latest commit: 729746b
Status: ✅  Deploy successful!
Preview URL: https://b54ca628.interwovenkit.pages.dev
Branch Preview URL: https://feat-drawer-swipe-to-dismiss.interwovenkit.pages.dev

View logs

@tansawit tansawit force-pushed the feat/drawer-swipe-to-dismiss branch from 84d5e83 to ad4e38d Compare February 2, 2026 09:04
@tansawit tansawit added type:enhancement New feature or request priority:low labels Feb 18, 2026
Replace Base UI Dialog with Vaul for unified drawer implementation.
Mobile slides from bottom with swipe-to-dismiss, desktop slides from right.
@tansawit tansawit force-pushed the feat/drawer-swipe-to-dismiss branch from ad4e38d to e59bfb0 Compare February 18, 2026 08:37
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is ON. A Cloud Agent has been kicked off to fix the reported issue.

@cursor
Copy link

cursor bot commented Feb 18, 2026

Bugbot Autofix prepared fixes for 1 of the 1 bugs found in the latest run.

  • ✅ Fixed: Overlay click triggers double dismiss on mobile
    • Added onInteractOutside handler to VaulDrawer.Content to prevent Radix DismissableLayer from firing on mobile, eliminating the double dismiss issue.

Create PR

Or push these changes by commenting:

@cursor push bbf61c1061
Preview (bbf61c1061)
diff --git a/packages/interwovenkit-react/src/public/app/Drawer.tsx b/packages/interwovenkit-react/src/public/app/Drawer.tsx
--- a/packages/interwovenkit-react/src/public/app/Drawer.tsx
+++ b/packages/interwovenkit-react/src/public/app/Drawer.tsx
@@ -87,7 +87,10 @@
             aria-label="Close drawer"
           />
         )}
-        <VaulDrawer.Content className={isMobile ? styles.mobileContent : styles.desktopContent}>
+        <VaulDrawer.Content
+          className={isMobile ? styles.mobileContent : styles.desktopContent}
+          onInteractOutside={isMobile ? (e) => e.preventDefault() : undefined}
+        >
           <div className={clsx(styles.inner, "body")} ref={setContainer}>
             {isMobile && <ScrollLock />}
             <TxWatcher />

@tansawit
Copy link
Contributor Author

@cursor push bbf61c1

Prevent Radix DismissableLayer from triggering on mobile when custom overlay is clicked by adding onInteractOutside handler. This eliminates duplicate handleCloseDrawer calls that were causing double analytics events and double reject() calls on pending requests.

Applied via @cursor push command
@tansawit tansawit closed this Feb 25, 2026
@simcheolhwan simcheolhwan deleted the feat/drawer-swipe-to-dismiss branch February 25, 2026 10:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority:low type:enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants