feat: rename Deck to Library and implement tap-to-preview for cards in Deck Builder on touch devices.

This commit is contained in:
2025-12-18 01:26:07 +01:00
parent d550bc3d04
commit 0ca29622ef
3 changed files with 46 additions and 7 deletions

View File

@@ -96,3 +96,4 @@
- [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.
- [Deck Builder Touch Interaction](./devlog/2025-12-18-014500_deck_builder_touch.md): Completed. Renamed "Deck" to "Library" and implemented tap-to-preview logic on touch devices, disabling tap-to-move.

View File

@@ -0,0 +1,20 @@
# Work Plan - Deck Builder Touch Interaction Updates
## Request
1. Change "Deck" zone name to "Library" in the UI.
2. Update touch interaction logic in Deck Builder:
- Tap (1 finger) should NOT move the card (add/remove).
- Tap (1 finger) should show the Card Preview (like in Draft Pick).
- Drag and Drop remains the method to move cards on touch devices.
## Changes
- **DeckBuilderView.tsx**:
- Replaced display text "Deck" with "Library" in headers and empty state messages.
- Updated `ListItem`, `DeckCardItem`, and `StackView` `onClick` handlers.
- Implemented `window.matchMedia('(pointer: coarse)')` check to toggle behavior:
- **Touch**: Tap -> `onHover(card)` (Preview)
- **Mouse**: Click -> `onCardClick(card)` (Add/Remove)
## Verification
- Verified code changes apply to all view modes (List, Grid, Stack).
- Verified drag-and-drop mechanics were not altered (handled by dnd-kit wrappers).