refactor: export FoilOverlay component and apply it universally to foil cards in PackCard and StackView for consistent animation.
This commit is contained in:
@@ -54,3 +54,4 @@
|
||||
- [Mobile Touch Interaction](./devlog/2025-12-17-021000_mobile_touch_fix.md): Completed. Updated long-press logic to persist preview during finger movement, closing only on release.
|
||||
- [Entrance Animation Fix](./devlog/2025-12-17-021500_entrance_animation_fix.md): Completed. Implemented 'isMounted' state to ensuring scale-in animation triggers correctly on first render.
|
||||
- [Foil Bug Fix](./devlog/2025-12-17-022000_foil_bug_fix.md): Completed. Fixed regression where foil animations applied to non-foil cards on desktop.
|
||||
- [Universal Foil Application](./devlog/2025-12-17-022500_universal_foil_application.md): Completed. Applied foil animation to Grid View and Stack View card thumbnails.
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
# Universal Foil Animation
|
||||
|
||||
## Objective
|
||||
Apply the high-fidelity foil animation to **all** card image instances, including the "Grid View" and "Stack View" thumbnails, not just the magnified hover preview.
|
||||
|
||||
## Changes
|
||||
- **CardPreview.tsx**: Exported the `FoilOverlay` component so it can be reused across the application.
|
||||
- **PackCard.tsx**:
|
||||
- Imported `FoilOverlay`.
|
||||
- Replaced the previous generic static foil gradient in `Grid View` with the `<FoilOverlay />` component.
|
||||
- **StackView.tsx**:
|
||||
- Imported `FoilOverlay`.
|
||||
- Replaced the simple opacity layer for foil cards with the `<FoilOverlay />` component.
|
||||
|
||||
## Result
|
||||
Now, whenever a foil card is displayed on the screen—whether as a thumbnail in a pack grid, a card in a stack pile, or a magnified preview—it consistently features the generic holographic animation and rotating glare effect.
|
||||
Reference in New Issue
Block a user