From cc0d60dc9ec775a38f671cb7cf28c43844b31fa6 Mon Sep 17 00:00:00 2001 From: dnviti Date: Wed, 17 Dec 2025 02:03:15 +0100 Subject: [PATCH] feat: limit Cube Manager sidebar to 400px max-width on large screens and update documentation. --- docs/development/CENTRAL.md | 1 + .../devlog/2025-12-17-031000_sidebar_max_width.md | 14 ++++++++++++++ src/client/src/modules/cube/CubeManager.tsx | 6 +++--- 3 files changed, 18 insertions(+), 3 deletions(-) create mode 100644 docs/development/devlog/2025-12-17-031000_sidebar_max_width.md diff --git a/docs/development/CENTRAL.md b/docs/development/CENTRAL.md index 323958e..8e9e91e 100644 --- a/docs/development/CENTRAL.md +++ b/docs/development/CENTRAL.md @@ -65,3 +65,4 @@ - [Squared Art Crops](./devlog/2025-12-17-030500_squared_art_crops.md): Completed. Enforced square aspect ratio for art-crop thumbnails to optimize visual density and stacking. - [Fix Expansion Generation Limit](./devlog/2025-12-17-024500_fix_expansion_generation_limit.md): Completed. Implemented "Unlimited Pool" mode for expansion drafts to allow generating large numbers of packs from singleton set data. - [Change Default Filter Flags](./devlog/2025-12-17-025500_change_default_flags.md): Completed. Updated client and server defaults for "Ignore Basic Lands", "Ignore Commander Sets", and "Ignore Tokens" to be unchecked (false). +- [Sidebar Max Width](./devlog/2025-12-17-031000_sidebar_max_width.md): Completed. Constrained the left sidebar in Cube Manager to a maximum width of 400px on large screens to improve layout balance. diff --git a/docs/development/devlog/2025-12-17-031000_sidebar_max_width.md b/docs/development/devlog/2025-12-17-031000_sidebar_max_width.md new file mode 100644 index 0000000..d76e5cc --- /dev/null +++ b/docs/development/devlog/2025-12-17-031000_sidebar_max_width.md @@ -0,0 +1,14 @@ + +# 2025-12-17 Left Sidebar Max Width + +## Objective +Limit the left sidebar in the Cube Manager to a maximum width of 400px on large screens to prevent it from becoming excessively wide on high-resolution displays. + +## Changes +1. **Layout Refactor (`src/client/src/modules/cube/CubeManager.tsx`)**: + * Change the main container from a CSS Grid (`grid-cols-12`) to a Flexbox layout (`flex-col lg:flex-row`). + * Set the left column width to `lg:w-1/3` with a strict `lg:max-w-[400px]` constraint. + * Set the right column to `flex-1` to take up remaining space. + +## Rationale +The previous `lg:col-span-4` (33% width) scaled indefinitely on large screens (e.g., 2560px wide -> ~850px sidebar), which wastes space and stretches control inputs. A max-width constraint ensures the controls remain compact while the main content area (packs display) benefits from the extra screen real estate. diff --git a/src/client/src/modules/cube/CubeManager.tsx b/src/client/src/modules/cube/CubeManager.tsx index 7a6a3fc..dd43d79 100644 --- a/src/client/src/modules/cube/CubeManager.tsx +++ b/src/client/src/modules/cube/CubeManager.tsx @@ -333,10 +333,10 @@ export const CubeManager: React.FC = ({ packs, setPacks, onGoT }; return ( -
+
{/* --- LEFT COLUMN: CONTROLS --- */} -
+
{/* Source Toggle */}
@@ -635,7 +635,7 @@ export const CubeManager: React.FC = ({ packs, setPacks, onGoT
{/* --- RIGHT COLUMN: PACKS --- */} -
+