Skip to content

Frontend: Implement Global UserContext for Onboarding Data Collection #150

@onlydustapp

Description

@onlydustapp

📚 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 UserContext ensures 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

  1. Review Onboarding Pages:

    • Identify and document key data fields from Onboarding Pages 1 to 11.
  2. Update UserContext:

    • Modify UserContext.tsx to include new fields required for the onboarding process.
    • Add appropriate types for the multi-step form data to maintain type safety.
  3. Create Setter Functions:

    • Implement setter functions (e.g., setUsername, setAge, setPreference, etc.) to update the context state.
  4. 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).
  5. 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

🚀 Let's ensure users have a smooth and consistent onboarding experience by centralizing and managing their data effectively!

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions