Repository navigation
Extract COD photo capture into dedicated sheet - #657
Merged
Merged
Conversation
Picking COD used to embed the camera inline in the customer-details sheet, so the viewfinder was squeezed small and, once a photo was added, the sheet's content outgrew the fixed-height frame with nothing to scroll it. Now COD hands off to its own full sheet (CodPhotoCaptureSheet) with a full-width viewfinder, while the details sheet gets a scrollable body with pinned action buttons. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EGS6rwnshDjEFNh2ZYFcxe
|
The latest updates on your projects. Learn more about Vercel for GitHub. 3 Skipped Deployments
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refactor the COD (Cash on Delivery) photo capture flow to use a dedicated modal sheet instead of embedding the camera capture inline within the customer details sheet.
Summary
This change improves the UX for COD photo verification by separating the photo capture step into its own dedicated sheet. Users now explicitly open a photo capture modal rather than having the camera interface appear inline, and can navigate back to the details sheet without losing previously captured photos.
Key changes
CodPhotoCaptureSheet— a dedicated modal for capturing verification photos with a back button and headerCustomerDetailsSheet:CameraCapturecomponentonCapturePhotoandonRetakePhotocallbacks with singleonOpenPhotoCapturecallbackScrollViewfor better mobile UXCheckoutUsecase):capturingPhotostate typeOPEN_PHOTO_CAPTUREaction to transition fromaskingDetailstocapturingPhotoRETAKE_PHOTOtoBACK_TO_DETAILS— navigating back preserves the captured photoCAPTURE_PHOTOnow transitions fromcapturingPhotoback toaskingDetailswith the photo savedCartHandler: Wired up the new photo capture sheet and state transitionsCameraCapture: Made viewfinder responsive (100% width with 3:4 aspect ratio) instead of fixed 280pxNotable implementation details
https://claude.ai/code/session_01EGS6rwnshDjEFNh2ZYFcxe