Skip to content

fix: New Issue modal unusable on mobile#519

Open
oaquique wants to merge 1 commit intoPeppermint-Lab:mainfrom
oaquique:fix/mobile-new-issue-modal-488
Open

fix: New Issue modal unusable on mobile#519
oaquique wants to merge 1 commit intoPeppermint-Lab:mainfrom
oaquique:fix/mobile-new-issue-modal-488

Conversation

@oaquique
Copy link

@oaquique oaquique commented Mar 6, 2026

Summary

Fixes #488 — On mobile (Android/iOS), clicking "New Issue" from the sidebar menu opens the modal behind the sidebar overlay, and closing the sidebar also unmounts the modal.

Root cause: CreateTicketModal was rendered inside SidebarContent, which on mobile lives inside a Sheet component. Two problems resulted:

  • The Sheet uses z-50 while the Dialog used z-10, so the modal appeared behind the overlay
  • Since the modal's React state lived inside the Sheet's component tree, closing the sidebar unmounted the modal entirely

Fix:

  • Moved CreateTicketModal from AppSidebar to the ShadLayout, outside the sidebar DOM tree but still inside SidebarProvider
  • Used a custom DOM event (open-create-ticket) to communicate between the sidebar's keyboard handler and the modal
  • Bumped the Dialog z-index from z-10 to z-[60] (above the Sheet's z-50)
  • Auto-close the mobile sidebar when the modal is triggered via setOpenMobile(false)

Test plan

  • On mobile (or responsive dev tools), open the sidebar and tap "New Issue" — sidebar should close and the modal should appear with full focus
  • Press the "c" keyboard shortcut on desktop — modal should open as before
  • Verify the modal's dropdowns (client, engineer, type) still work correctly
  • Verify closing the modal works (X button, clicking outside, ESC key)

Move CreateTicketModal out of the sidebar component tree into the
layout so it is not unmounted when the mobile Sheet closes. Bump
the Dialog z-index above the Sheet overlay and auto-close the
sidebar when the modal is triggered.
@vercel
Copy link

vercel bot commented Mar 6, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Mar 6, 2026 1:34am

@vercel vercel bot temporarily deployed to Preview – docs March 6, 2026 01:34 Inactive
@vercel vercel bot temporarily deployed to Preview – peppermint March 6, 2026 01:34 Inactive
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.

Unable to create new issue on Android (firefox/chromium)

1 participant