chore: archive v2.2 User Experience Polish milestone
Phases 28-31 archived to milestones/v2.2-phases/ Requirements and roadmap snapshots archived to milestones/ Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
---
|
||||
phase: 29-image-presentation
|
||||
plan: 05
|
||||
status: complete
|
||||
gap_closure: true
|
||||
started: 2026-04-13T12:00:00Z
|
||||
completed: 2026-04-13T12:10:00Z
|
||||
---
|
||||
|
||||
## Summary
|
||||
|
||||
Fixed cropped image preview not updating immediately in edit mode. Added `localCrop` state to `ImageUpload` that captures crop values from `ImageCropEditor` and passes them to `GearImage` as props. Previously, the preview only reflected crop settings after saving the form and refetching from the server.
|
||||
|
||||
## Accomplishments
|
||||
|
||||
- Added `localCrop` useState to ImageUpload for immediate crop feedback
|
||||
- Wired ImageCropEditor onSave to set localCrop before forwarding to parent
|
||||
- Passed localCrop values (cropZoom, cropX, cropY) to GearImage preview
|
||||
- Clear localCrop on image removal to prevent stale state
|
||||
|
||||
## Key Files
|
||||
|
||||
### Modified
|
||||
- `src/client/components/ImageUpload.tsx` — local crop state + GearImage prop wiring
|
||||
|
||||
## Self-Check: PASSED
|
||||
|
||||
- TypeScript compiles without errors (no new errors in ImageUpload.tsx)
|
||||
- Local crop state correctly flows: ImageCropEditor → localCrop → GearImage props
|
||||
- Image removal clears both preview and crop state
|
||||
|
||||
## Deviations
|
||||
|
||||
None — implemented exactly as planned.
|
||||
Reference in New Issue
Block a user