1.4 KiB
1.4 KiB
Resizable Draft Interface
Status
- Implement resizable bottom "Pool" panel.
- Implement resizable card size slider.
- Persist settings to
localStorage.
Technical Plan
src/client/src/modules/draft/DraftView.tsx
-
State Initialization:
poolHeight: number (default ~220). Load fromlocalStorage.getItem('draft_poolHeight').cardScale: number (default 1 or specific width like 224px). Load fromlocalStorage.getItem('draft_cardScale').
-
Resize Handle:
- Insert a
divcursor-row-resize between the Main Area and the Bottom Area. - Implement
onMouseDownhandler to start dragging. - Implement
onMouseMoveandonMouseUpon the window/document to handle the resize logic.
- Insert a
-
Card Size Control:
- Add a slider (
<input type="range" />) in the Top Header area to adjustcardScale. - Apply this scale to the card images/containers in the Main Area.
- Add a slider (
-
Persistence:
useEffecthooks to save state changes tolocalStorage.
-
Refactoring Styling:
- Change
h-[220px]class on the bottom panel tostyle={{ height: poolHeight }}. - Update card width class
w-56to dynamic style or class based on scale.
- Change
UX Improvements
- Add limit constraints (min height for pool, max height for pool).
- Add limit constraints for card size (min visible, max huge).