feat: Unify card fetching/parsing and pack generation into a single handleGenerate function and button.
This commit is contained in:
@@ -74,3 +74,5 @@
|
||||
- [Play Online Logic](./devlog/2025-12-17-031500_play_online_logic.md): Completed. Implemented strict pack limits (min 12 for 4 players) and visual feedback for the online lobby button.
|
||||
- [Lobby Rules Tooltip](./devlog/2025-12-17-032000_lobby_rules_tooltip.md): Completed. Added dynamic rules explanation and supported player indicators to the lobby creation screen.
|
||||
- [Fix Expansion Pack Generation](./devlog/2025-12-17-140000_fix_expansion_generation.md): Completed. Enforced infinite card pool for expansion drafts to ensure correct pack counts and prevent depletion.
|
||||
- [Responsive Pack Grid Layout](./devlog/2025-12-17-142500_responsive_pack_grid.md): Completed. Implemented responsive multi-column grid for generated packs when card size is reduced (<25% slider).
|
||||
- [Stack View Consistency Fix](./devlog/2025-12-17-143000_stack_view_consistency.md): Completed. Removed transparent overrides for Stack View, ensuring it renders with the standard unified container graphic.
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
# Responsive Pack Grid Layout
|
||||
|
||||
## Objective
|
||||
Update the generated packs UI to maximize pack density on screen when the user reduces the card size.
|
||||
|
||||
## Requirements
|
||||
- When the card size slider is under 25% (value <= 150), switch the pack container layout from a vertical stack (`grid-cols-1`) to a responsive multi-column grid (`grid-cols-1 md:grid-cols-2 xl:grid-cols-3` etc.).
|
||||
- Ensure this applies to all view modes (List, Grid, Stack).
|
||||
- Maintain consistency in UI.
|
||||
|
||||
## Implementation
|
||||
- Modified `src/client/src/modules/cube/CubeManager.tsx`.
|
||||
- Added conditional logic to the main packs container `div`.
|
||||
- Condition: `cardWidth <= 150`.
|
||||
- Classes: `grid-cols-1 md:grid-cols-2 xl:grid-cols-3 2xl:grid-cols-4` for compact mode.
|
||||
|
||||
## Verification
|
||||
- Verified using browser simulation.
|
||||
- Verified that setting slider to 100 triggers the grid layout.
|
||||
- Verified that setting slider to 300 reverts to vertical stack.
|
||||
@@ -0,0 +1,17 @@
|
||||
# Stack View Consistency Fix
|
||||
|
||||
## Objective
|
||||
Ensure the Stack View pack container has the same visual styling (background, border, shadow, header) as the List and Grid views.
|
||||
|
||||
## User Request
|
||||
"the stacked view region graphic is not consistent with the other views, the container region is missing"
|
||||
|
||||
## Implementation
|
||||
- Modified `src/client/src/components/PackCard.tsx`.
|
||||
- Removed the conditional ternary operators that stripped the background and border when `viewMode === 'stack'`.
|
||||
- Ensured consistent `p-4` padding for the content wrapper.
|
||||
- The `StackView` component is now rendered inside the standard slate card container.
|
||||
|
||||
## Verification
|
||||
- Code review confirms the removal of `bg-transparent border-none` overrides.
|
||||
- This ensures the `bg-slate-800` class applied to the parent `div` is visible in all modes.
|
||||
Reference in New Issue
Block a user