-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Currently, if a user accidentally navigates away from the report creation form or refreshes the page, all their progress is lost. This creates a poor user experience, especially for longer reports with multiple steps.
Implement form data persistence using localStorage to automatically save user progress throughout the report creation process, allowing users to resume where they left off.
- Auto-save: Automatically save form data to localStorage as users type/select options
- Step persistence: Remember which step the user was on
- Data recovery: Restore form state when user returns to the report creation flow
- Cleanup: Clear saved data after successful report submission
Data to Persist
- Current step (1-6)
- Form fields:
- Agency selection
- Topic selection (including custom topics)
- Source selection (including custom sources)
- Title
- Links (primary and secondary)
- Description
- Selected images (file references)
- Form validation state
- User preferences (reminder settings)
Implementation Details
- Storage key: misinfo_report_draft_{userId}
- Save frequency: On every field change + step navigation
- Data format: JSON object with timestamp
- Expiration: Auto-clear after 24 hours or successful submission
Files to Modify
components/reports/ReportSystem.jsx- Main form state managementcomponents/reports/ReportSteps/*.jsx- Individual step componentshooks/useLocalStorage.js- New custom hook (create this)
π Resources
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels