From 1b8ae00da1dce16334a448ac156c770f6b11427e Mon Sep 17 00:00:00 2001 From: dnviti Date: Sun, 14 Dec 2025 21:20:37 +0100 Subject: [PATCH] feat: Simplify Cube Manager UI by conditionally displaying pack generation mode options and automatically configuring the mode based on the selected card source. --- docs/development/CENTRAL.md | 1 + .../2025-12-14-212000_ui_simplification.md | 18 +++++++++ src/client/src/modules/cube/CubeManager.tsx | 38 +++++++++++-------- 3 files changed, 42 insertions(+), 15 deletions(-) create mode 100644 docs/development/devlog/2025-12-14-212000_ui_simplification.md diff --git a/docs/development/CENTRAL.md b/docs/development/CENTRAL.md index eb404cf..d3e39b5 100644 --- a/docs/development/CENTRAL.md +++ b/docs/development/CENTRAL.md @@ -8,6 +8,7 @@ The project has successfully migrated from a .NET backend to a Node.js Modular M - **[2025-12-14] Parser Robustness**: Improving `CardParserService` to handle formats without Scryfall IDs (e.g., Arena exports). [Link](./devlog/2025-12-14-210000_fix_parser_robustness.md) - **[2025-12-14] Set Generation**: Implemented full set fetching and booster box generation (Completed). [Link](./devlog/2025-12-14-211000_set_based_generation.md) - **[2025-12-14] Cleanup**: Removed Tournament Mode and simplified pack display as requested. [Link](./devlog/2025-12-14-211500_remove_tournament_mode.md) +- **[2025-12-14] UI Tweak**: Auto-configured generation mode based on source selection. [Link](./devlog/2025-12-14-212000_ui_simplification.md) ## Active Modules 1. **Cube Manager**: Fully functional (Parsing, Fetching, Pack Generation). diff --git a/docs/development/devlog/2025-12-14-212000_ui_simplification.md b/docs/development/devlog/2025-12-14-212000_ui_simplification.md new file mode 100644 index 0000000..c79dd54 --- /dev/null +++ b/docs/development/devlog/2025-12-14-212000_ui_simplification.md @@ -0,0 +1,18 @@ +# Enhancement: UI Simplification for Set Generation + +## Status: Completed + +## Summary +Refined the Cube Manager UI to hide redundant options when generating packs from an entire expansion set. + +## Changes +1. **CubeManager.tsx**: + * **Conditional Rendering**: The "Card Source" options (Chaos Draft vs Split by Expansion) are now **hidden** when "From Expansion" mode is selected. + * **Automatic State Handling**: + * Selecting "From Expansion" automatically sets generation mode to `by_set`. + * Selecting "Custom List" resets generation mode to `mixed` (user can still change it). + * **Rationale**: Using an entire set implies preserving its structure (one set), whereas a custom list is often a cube (chaos) or a collection of specific sets where the user might want explicitly mixed packs. + +## Impact +* Reduces visual noise for the user when they simply want to draft a specific set. +* Prevents invalid configurations (e.g., selecting "Chaos Draft" for a single set, which technically works but is confusing in context of "Set Generation"). diff --git a/src/client/src/modules/cube/CubeManager.tsx b/src/client/src/modules/cube/CubeManager.tsx index 731151c..fb1f752 100644 --- a/src/client/src/modules/cube/CubeManager.tsx +++ b/src/client/src/modules/cube/CubeManager.tsx @@ -184,13 +184,19 @@ export const CubeManager: React.FC = () => { {/* Source Toggle */}