-
Notifications
You must be signed in to change notification settings - Fork 60
Description
📚 Overview
This feature requires designing and implementing the logic to capture and persist user data from Onboarding Page 1 through Page 11 into the UserContext. This will ensure a centralized store of user information, which is crucial for a consistent onboarding experience and later backend usage.
🔍 Context
- The onboarding process spans 11 pages and collects various pieces of user information including profile and preference details.
- Centralizing this data in
UserContextensures that the user profile is easily accessible and manageable across the application. - This update will help with smooth transitions between steps, allowing for backward navigation with previously entered data.
🎯 Implementation Tasks
-
Review Onboarding Pages:
- Identify and document key data fields from Onboarding Pages 1 to 11.
-
Update
UserContext:- Modify
UserContext.tsxto include new fields required for the onboarding process. - Add appropriate types for the multi-step form data to maintain type safety.
- Modify
-
Create Setter Functions:
- Implement setter functions (e.g.,
setUsername,setAge,setPreference, etc.) to update the context state.
- Implement setter functions (e.g.,
-
Integrate Context with Onboarding Pages:
- Update each onboarding page component to read from and write to the
UserContext. - Ensure that form inputs are controlled and initialized with current context data (supporting backward navigation).
- Update each onboarding page component to read from and write to the
-
Validation and Error Handling:
- Validate inputs on each page before allowing navigation to the next step.
📌 Contributor Reminders
✅ Check the Contribution Guidelines: 🔗 CONTRIBUTING.md
✅ Sync with the latest changes from the LogiQuest repository before working on this issue.
📸 Attach a screenshot of the working onboarding pages and context updates in your PR.
✅ Acceptance Criteria
- All data fields from onboarding pages 1–11 are properly captured and stored in
UserContext. - Each input field is a controlled component that properly reads from and writes to the context.
- Data persists correctly across onboarding steps, including when navigating backwards.
- Code is clean, modular, and aligns with existing project patterns and conventions.
💡 Technical Considerations
- Use TypeScript effectively for maintaining type safety, particularly for multi-step forms.
- Ensure that the context update process does not introduce performance overhead.
- Test edge cases such as missing or invalid input values.
📝 Additional Resources
- CONTRIBUTING Guidelines
- For project overview, check out the README.
🚀 Let's ensure users have a smooth and consistent onboarding experience by centralizing and managing their data effectively!