freeCodeCamp / Developer_Quiz_Site

This is a quiz site filled with over 1200+ questions on programming.
https://developerquiz.org
BSD 3-Clause "New" or "Revised" License
245 stars 348 forks source link

[EPIC] - Implement LocalStorage for Quiz Progress and previous high scores #1055

Open vvs-basanth opened 1 month ago

vvs-basanth commented 1 month ago

What feature would you like to see?

I would like to propose a feature that will enhance user experience by utilizing localStorage to save quiz progress and their previous high scores.

Feature Overview:

Quiz Progress Saving:

Implementation Details:

Benefits:

Tasks:

  1. Define the structure for storing quiz progress and user preferences.

    • [ ] Determine the data that needs to be stored for quiz progress (e.g., current question, selected answers, previous scores).
    • [ ] Define the structure for storing the progress data.
    • [ ] Choose appropriate keys for storing data in localStorage (e.g., quizProgress).
    • [ ] Decide on data types (e.g., JSON objects) for the stored information to ensure easy retrieval and manipulation.
  2. Implement methods for saving and retrieving data using localStorage.

    • [ ] Write a function to save quiz progress to localStorage.
    • [ ] Write a function to retrieve and restore quiz progress from localStorage when a user returns.
    • [ ] Handle scenarios where localStorage might be unavailable (e.g., private browsing mode).
    • [ ] Add data validation and checks to ensure that only valid data is saved and retrieved.
  3. Test across different browsers to ensure consistency.

    • [ ] Test the feature on major browsers (Chrome, Firefox, Safari, Edge) to ensure localStorage works consistently.
    • [ ] Verify that the quiz progress are correctly saved and retrieved in each browser (same session).
    • [ ] Check for any issues related to storage limits or performance.
    • [ ] Handle potential security concerns, such as data persistence and privacy.
  4. Document the feature and provide instructions for developers and users.

    • [ ] Write documentation for the new feature, explaining how it works and how developers can integrate it.
    • [ ] Include code examples for saving and retrieving data using localStorage.
    • [ ] Provide instructions for users on how to utilize the feature.
    • [ ] Update any existing documentation to reflect the new feature.
    • [ ] Add comments in the code to clarify the purpose of key functions and structures.

Please let me know if there are any additional details or considerations that should be included. I’m looking forward to contributing to this project!

### Tasks
- [ ] https://github.com/freeCodeCamp/Developer_Quiz_Site/issues/1063
- [ ] https://github.com/freeCodeCamp/Developer_Quiz_Site/issues/1064
- [ ] https://github.com/freeCodeCamp/Developer_Quiz_Site/issues/1065
- [ ] https://github.com/freeCodeCamp/Developer_Quiz_Site/issues/1066
- [ ] https://github.com/freeCodeCamp/Developer_Quiz_Site/issues/1067
- [ ] https://github.com/freeCodeCamp/Developer_Quiz_Site/issues/1068
jdwilkin4 commented 1 month ago

Saving user settings, such as selected themes, preferred programming languages, and any other customizable options.

This is outside of the scope and we are not going to be tracking all of this information. So we are not going to be implementing this functionality.

As mentioned in the original discussion, the scope of this feature was for users to track their original progress in the game and keep track of their previous scores. https://github.com/freeCodeCamp/Developer_Quiz_Site/discussions/256

jdwilkin4 commented 1 month ago

Please update your issue to remove all functionality dealing with this

Provides a more personalized experience by remembering user settings and preferences.

vvs-basanth commented 1 month ago

Hey, Okay sure, I updated the issue just now.

Please do check and let me know

jdwilkin4 commented 1 month ago

I have cleaned up the issue to remove any remaining mentions of the user preferences.

So now this is properly scoped and this will be considered the EPIC.

Moving forward, you will need to break up the work into small issues and track them in this epic. When you create these smaller issues, you will need to create design mockups for what it will look like when a user revisits the site and wants to resume where they left off so we are on the same page for what this is going to look like.

Then you can start by creating PR's for these issues and getting them reviewed.

vvs-basanth commented 1 month ago

Moving forward, you will need to break up the work into small issues and track them in this epic. When you create these smaller issues, you will need to create design mockups for what it will look like when a user revisits the site and wants to resume where they left off so we are on the same page for what this is going to look like.

So, Do I have to use a different and well-defined task list, or does the one I updated earlier work?

jdwilkin4 commented 1 month ago

If you want to copy over parts of the task list from earlier into these smaller issues, that is fine

vvs-basanth commented 1 month ago

If you want to copy over parts of the task list from earlier into these smaller issues, that is fine

Alright, I will just start working on the same task list as I already mentioned up above. Thank you!

jdwilkin4 commented 2 days ago

I am closing all of these issues due to inactivity

Epik-Whale463 commented 1 day ago

@jdwilkin4 I want to work on it , can you assign it to me please

jdwilkin4 commented 1 day ago

I have assigned you the issue @Epik-Whale463

You will need to spend some time, orienting yourself with the full context of the feature and understand what the scope is for this feature.

You will also need to review the task list issues and what needs to be done there and the PR's you will need to create.

jdwilkin4 commented 1 day ago

@Epik-Whale463 You will also need to comment on each of the issues related to this feature so you can be assigned to you. Due to GitHub's access control, I can't assign you to individual issues unless you comment on the issues