feat: set default card size and scale values to their minimum in Cube Manager, Draft View, and Deck Builder.
This commit is contained in:
@@ -95,3 +95,4 @@
|
||||
- [Persist PWA Dismissal](./devlog/2025-12-18-005300_persist_pwa_dismissal.md): Completed. Implemented logic to remember user's choice to dismiss or install the PWA, preventing repeated prompts.
|
||||
- [Create Favicon](./devlog/2025-12-18-005739_create_favicon.md): Completed. Generated and integrated a new application favicon.
|
||||
- [Mobile Touch Preview](./devlog/2025-12-18-012500_mobile_touch_preview.md): Completed. Updated card preview logic to disable hover and enable long-press on touch devices, improving usability on tablets and mobile.
|
||||
- [Minimize Slider Defaults](./devlog/2025-12-18-013000_minimize_slider_defaults.md): Completed. Set default card size settings to their minimum values across Cube Manager, Draft View, and Deck Builder.
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
# Work Plan - Set Default Slider Values to Minimum
|
||||
|
||||
## Request
|
||||
Set the default value for card size sliders to their minimum setting across all views:
|
||||
1. Cube Manager (Draft Management)
|
||||
2. Draft View (Online Draft Pick)
|
||||
3. Deck Builder
|
||||
|
||||
## Changes
|
||||
- **CubeManager.tsx**: Changed default `cardWidth` from `140` to `100`.
|
||||
- **DraftView.tsx**: Changed default `cardScale` from `0.7` to `0.5`.
|
||||
- **DeckBuilderView.tsx**: Changed default `cardWidth` from `150` to `100`.
|
||||
|
||||
## Verification
|
||||
- Verified that the new default values match the `min` attribute of the respective range inputs.
|
||||
- Verified that no other sliders exist in the codebase.
|
||||
@@ -113,7 +113,7 @@ export const CubeManager: React.FC<CubeManagerProps> = ({ packs, setPacks, avail
|
||||
|
||||
const [cardWidth, setCardWidth] = useState(() => {
|
||||
const saved = localStorage.getItem('cube_cardWidth');
|
||||
return saved ? parseInt(saved) : 140;
|
||||
return saved ? parseInt(saved) : 100;
|
||||
});
|
||||
|
||||
// --- Persistence Effects ---
|
||||
|
||||
@@ -202,7 +202,7 @@ export const DeckBuilderView: React.FC<DeckBuilderViewProps> = ({ initialPool, a
|
||||
const [timer] = useState<string>("Unlimited");
|
||||
const [layout, setLayout] = useState<'vertical' | 'horizontal'>('vertical');
|
||||
const [viewMode, setViewMode] = useState<'list' | 'grid' | 'stack'>('grid');
|
||||
const [cardWidth, setCardWidth] = useState(150);
|
||||
const [cardWidth, setCardWidth] = useState(100);
|
||||
|
||||
const [pool, setPool] = useState<any[]>(initialPool);
|
||||
const [deck, setDeck] = useState<any[]>([]);
|
||||
|
||||
@@ -66,7 +66,7 @@ export const DraftView: React.FC<DraftViewProps> = ({ draftState, currentPlayerI
|
||||
|
||||
const [cardScale, setCardScale] = useState<number>(() => {
|
||||
const saved = localStorage.getItem('draft_cardScale');
|
||||
return saved ? parseFloat(saved) : 0.7;
|
||||
return saved ? parseFloat(saved) : 0.5;
|
||||
});
|
||||
|
||||
const [layout, setLayout] = useState<'vertical' | 'horizontal'>('horizontal');
|
||||
|
||||
Reference in New Issue
Block a user