Skip to content

feat(verification): add MediaUploadStep with drag-and-drop, file preview, and upload progress - #477

Merged
Tybravo merged 1 commit into
Tybravo:mainfrom
laurentketterle-hub:feat/media-upload-step-422
Jul 31, 2026
Merged

feat(verification): add MediaUploadStep with drag-and-drop, file preview, and upload progress#477
Tybravo merged 1 commit into
Tybravo:mainfrom
laurentketterle-hub:feat/media-upload-step-422

Conversation

@laurentketterle-hub

Copy link
Copy Markdown
Contributor

Summary

Implements the MediaUploadStep component for the verification wizard — a polished, accessible drag-and-drop file upload UI built with React Dropzone and Tailwind CSS.

✨ Features

Feature Details
Drag & Drop Full drag-and-drop zone with visual active state (blue highlight + scale)
Click to Select Click on drop zone or press Enter/Space to open file dialog
Image Preview Auto-generated thumbnails for image files
Video Preview Video thumbnails with play overlay for video files
Upload Progress Simulated progress bar with percentage indicator and "Upload complete" badge
File Validation Configurable max file size, empty file rejection, error display
Multiple Files Optional multiple prop for multi-file uploads
Controlled Mode Accept external files prop with onFilesChange callback
Dark Mode Full Tailwind dark mode support with dark: variants
Accessibility ARIA roles (button, list, listitem, alert, progressbar), keyboard navigation, labels
File Removal X button to remove files with proper cleanup of object URLs

🎨 Screenshot Description

  • Drop Zone: Centered card with upload icon, label text, and hint — switches to "Drop files here…" on drag with blue border and subtle scale animation
  • File Card: Shows thumbnail (image/video preview or file type icon), file name, size in human-readable format, category badge (Image/Video/PDF/Document), progress bar during upload, green checkmark on completion
  • Error State: Red banner with alert icon for size/validation errors

🧪 Tests

24 test cases in MediaUploadStep.test.tsx covering:

  • Rendering with default and custom labels
  • Keyboard accessibility (Enter, Space, Tab)
  • Click-to-select file dialog trigger
  • Drag-and-drop with visual active state
  • Image and video preview rendering
  • File size formatting (B, KB, MB)
  • Category badge display
  • File removal with object URL cleanup
  • Upload progress bar and completion badge
  • Size validation (too large, empty)
  • Single vs multiple file modes
  • Controlled component mode
  • Custom accept types
  • ARIA attributes (alert, list, listitem, progressbar)

📂 Files Changed

  • frontend/features/verification/components/steps/MediaUploadStep.tsx — new component (~290 lines)
  • frontend/features/verification/components/steps/__tests__/MediaUploadStep.test.tsx — test suite (~350 lines)

🔗 References

Closes #422

…and progress

- Add MediaUploadStep component with full drag-and-drop support
- Support click-to-select with keyboard accessibility (Enter/Space)
- Image and video preview thumbnails with file type icons
- Upload progress simulation with animated progress bar
- File size validation with configurable limits
- Single and multiple file modes
- Dark mode support via Tailwind CSS classes
- Full ARIA accessibility (roles, labels, live regions)
- Error handling with alert role for screen readers
- Add comprehensive Jest test suite (24 test cases)

Closes Tybravo#422
@vercel

vercel Bot commented Jul 31, 2026

Copy link
Copy Markdown

@laurentketterle-hub is attempting to deploy a commit to the DaniBravo Team on Vercel.

A member of the Team first needs to authorize it.

@Tybravo

Tybravo commented Jul 31, 2026

Copy link
Copy Markdown
Owner

@laurentketterle-hub good work done

@Tybravo
Tybravo merged commit d2875fe into Tybravo:main Jul 31, 2026
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Frontend] [Feature] Implement Media Upload Step UI (Drag-and-drop) for Wizard

2 participants