From 292d1d1da3cef264ff5734206e835f66c4a807b5 Mon Sep 17 00:00:00 2001 From: Matthew Valancy Date: Tue, 16 Jun 2026 17:39:33 -0700 Subject: [PATCH] fix(mobile): make the work-item edit modal a usable full-screen sheet on phones MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Tapping a card in list view opened WorkItemDetailsModal, which on a phone was a cramped centered card with a fixed two-column body — and (because it rendered inside the z-20 main-wrapper while the bottom nav/top bar are z-30) the nav and project selector painted ON TOP of it. It didn't fit and looked broken. - Portal the modal to document.body so it escapes the page stacking context and actually covers everything (matches the other dialogs here). - Phones: full-screen sheet (w/h-full, no rounding) with a sticky header so Save/Close stay reachable while scrolling. Desktop unchanged: centered max-w-3xl card. - The two-column body (content | actions) now stacks on phones (flex-col md:flex-row); the right Actions column is w-full md:w-36. Desktop centered-card layout verified unchanged. Smoke 5/5; mobile specs 10/10; typecheck clean. Co-Authored-By: Claude Opus 4.8 (1M context) --- .../web/src/components/WorkItemDetailsModal.tsx | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/packages/web/src/components/WorkItemDetailsModal.tsx b/packages/web/src/components/WorkItemDetailsModal.tsx index 6f0e7d50..1eb09000 100644 --- a/packages/web/src/components/WorkItemDetailsModal.tsx +++ b/packages/web/src/components/WorkItemDetailsModal.tsx @@ -1,4 +1,5 @@ import React, { useState, useEffect, useRef, useCallback } from 'react'; +import { createPortal } from 'react-dom'; import { X, User, Flag, Edit3, Save, ChevronDown, Plus, Unlink, Trash2, GitBranch, ArrowRight, ArrowLeft, Ban, Link2, Folder, Split, Copy, Shield, Bookmark, Package, @@ -513,9 +514,9 @@ export function WorkItemDetailsModal({ return getRelationshipIconElement(type as RelationshipType, "h-4 w-4"); }; - return ( + return createPortal((
e.stopPropagation()} > {/* Gradient accent line at top */} @@ -542,8 +543,8 @@ export function WorkItemDetailsModal({ }}>
- {/* Title Header */} -
+ {/* Title Header — sticky so Save/Close stay reachable while scrolling */} +
@@ -693,7 +694,7 @@ export function WorkItemDetailsModal({
{/* Enhanced Content */} -
+
{/* Enhanced Left Column - Main Content */}
{/* Enhanced Title - Always Editable */} @@ -1071,7 +1072,7 @@ export function WorkItemDetailsModal({
{/* Enhanced Right Column - Action Buttons */} -
+

@@ -1286,5 +1287,5 @@ export function WorkItemDetailsModal({

- ); + ), document.body); } \ No newline at end of file