chore: UX design audit cleanup and receipt flow improvements #186

Merged
egullickson merged 25 commits from issue-162-ux-design-audit-cleanup into main 2026-02-14 03:50:23 +00:00
2 changed files with 11 additions and 4 deletions
Showing only changes of commit 83bacf0e2f - Show all commits

View File

@@ -47,11 +47,17 @@ export const AddReceiptDialog: React.FC<AddReceiptDialogProps> = ({
file.name.toLowerCase().endsWith('.heif') file.name.toLowerCase().endsWith('.heif')
); );
} }
if (format === 'application/pdf') {
return (
file.type === 'application/pdf' ||
file.name.toLowerCase().endsWith('.pdf')
);
}
return file.type === format; return file.type === format;
}); });
if (!isValidType) { if (!isValidType) {
return 'Invalid file type. Accepted formats: JPEG, PNG, HEIC'; return 'Invalid file type. Accepted formats: JPEG, PNG, HEIC, PDF';
} }
if (file.size > DEFAULT_MAX_FILE_SIZE) { if (file.size > DEFAULT_MAX_FILE_SIZE) {
@@ -207,10 +213,10 @@ export const AddReceiptDialog: React.FC<AddReceiptDialogProps> = ({
textAlign="center" textAlign="center"
fontWeight={500} fontWeight={500}
> >
{isDragging ? 'Drop image here' : 'Drag and drop an image, or tap to browse'} {isDragging ? 'Drop file here' : 'Drag and drop an image or PDF, or tap to browse'}
</Typography> </Typography>
<Typography variant="caption" color="text.secondary" textAlign="center"> <Typography variant="caption" color="text.secondary" textAlign="center">
JPEG, PNG, HEIC -- up to 10MB JPEG, PNG, HEIC, PDF -- up to 10MB
</Typography> </Typography>
</Box> </Box>
@@ -265,7 +271,7 @@ export const AddReceiptDialog: React.FC<AddReceiptDialogProps> = ({
accept={DEFAULT_ACCEPTED_FORMATS.join(',')} accept={DEFAULT_ACCEPTED_FORMATS.join(',')}
onChange={handleInputChange} onChange={handleInputChange}
style={{ display: 'none' }} style={{ display: 'none' }}
aria-label="Select receipt image" aria-label="Select receipt file"
/> />
</Dialog> </Dialog>
); );

View File

@@ -127,6 +127,7 @@ export const DEFAULT_ACCEPTED_FORMATS = [
'image/png', 'image/png',
'image/heic', 'image/heic',
'image/heif', 'image/heif',
'application/pdf',
]; ];
/** Default max file size (10MB) */ /** Default max file size (10MB) */