diff --git a/docs/development/CENTRAL.md b/docs/development/CENTRAL.md index 9c2877a..46f4f23 100644 --- a/docs/development/CENTRAL.md +++ b/docs/development/CENTRAL.md @@ -37,3 +37,4 @@ - [Cube Sticky Sidebar](./devlog/2025-12-17-003000_cube_sticky_sidebar.md): Completed. Made the Cube Manager left sidebar sticky to improve usability with long pack lists. - [Cube Full Width Layout](./devlog/2025-12-17-003500_cube_full_width.md): Completed. Updated Cube Manager to use the full screen width. - [Cube Archidekt View](./devlog/2025-12-17-004500_archidekt_view.md): Completed. Implemented column-based stacked view for packs. +- [Cube Mobile UI Fixes](./devlog/2025-12-17-005000_mobile_ui_fixes.md): Completed. Fixed overlapping elements and disabled hover previews on mobile. diff --git a/docs/development/devlog/2025-12-17-005000_mobile_ui_fixes.md b/docs/development/devlog/2025-12-17-005000_mobile_ui_fixes.md new file mode 100644 index 0000000..0669523 --- /dev/null +++ b/docs/development/devlog/2025-12-17-005000_mobile_ui_fixes.md @@ -0,0 +1,20 @@ +# Cube Manager Mobile Improvements + +## Objective +Fix usability issues on mobile devices where UI elements were overlapping and "unusable". + +## Changes +1. **Sidebar Responsiveness**: + - Modified `CubeManager.tsx` to apply `sticky` positioning to the left sidebar *only* on large screens (`lg:` prefix). On mobile, it is now standard static flow. + - Limited `max-height` and `overflow-y-auto` only to `lg:` screens. + +2. **Header Improvements**: + - Updated the "Packs" sticky header in `CubeManager.tsx` to handle wrapping gracefully. + - Added `backdrop-blur-xl` and slightly higher opacity to ensure content behind it doesn't bleed through visually (fixing "overlap" perception). + - Enabled `overflow-x-auto` for the buttons container to prevent them from breaking out of the viewport on very narrow screens. + +3. **Disable Heavy Hovers**: + - Modified `CardPreview.tsx` to disable the `FloatingPreview` (large full-card hover) on devices with width < 1024px. This prevents the preview from sticking or covering the UI on touch devices. + +## Result +The UI should now be clean and usable on mobile, with no overlapping elements and a natural scroll flow. diff --git a/src/client/src/components/CardPreview.tsx b/src/client/src/components/CardPreview.tsx index a02105c..ba383fd 100644 --- a/src/client/src/components/CardPreview.tsx +++ b/src/client/src/components/CardPreview.tsx @@ -57,6 +57,8 @@ export const CardHoverWrapper: React.FC<{ card: DraftCard; children: React.React setMousePos({ x: e.clientX, y: e.clientY }); }; + const isMobile = typeof window !== 'undefined' && window.innerWidth < 1024; // Disable on tablet/mobile + return (