Skip to content

rely on local storage to store the sound settings #48931

Closed

Description

@raisedadead

Edited by Sboonny:

  • Shift to local storage.
  • Sound value shouldn't be stored in user schema. Remove sound property in user schema.
  • https://api.freecodecamp.org/update-my-sound disable network call. Also deprecate/delete it as it would no longer be needed.

With #48762, we have moved to use Local storage after fetching the user data. We should align it with our needs and use the user session instead.

Previous discussions:

We're using a hybrid of local storage and the session user, right now. It would be best to remove all reliance on local storage, so that it's consistent across devices.

Originally posted by @ojeytonwilliams in #46372 (comment)

Activity

  1. added
    help wanted
    platform: learn
    on Jan 5, 2023
  2. nayabatir1 commented on Jan 5, 2023

    @nayabatir1
    Contributor

    I'll start working on this.
    My approach is to create a hook to play audio e.g. usePlayAudio. This hooks will conditionally play audio instead of conditionally calling it.

  3. spiritanand commented on Jan 31, 2023

    @spiritanand
    Contributor

    @nayabatir1 any progress on this? I would like to help you out.

  4. nayabatir1 commented on Jan 31, 2023

    @nayabatir1
    Contributor

    @spiritanand You can start too. I haven't made any significant progress, due to some other high priority tasks.

  5. nayabatir1 commented on Feb 7, 2023

    @nayabatir1
    Contributor

    Help me understand difference between fcc-sound in store and

    sound in user

    image

    If I change Campfire Mode is settings then only fcc-sound value is changed. When does sound in user change ?

  6. Sboonny commented on Feb 12, 2023

    @Sboonny
    Member

    I don't think this is a good idea at least the user experiences will be worse not better unlike themes, devices have different sound system and keeping the same sounds properties on my laptop, and having them in my phone when I don't want to, is annoying.

  7. nayabatir1 commented on Feb 12, 2023

    @nayabatir1
    Contributor

    @Sboonny I'm not sure if I understand you correctly. Basically you want user to have flexibility to use different settings for different device, but these settings are synced with user details in db.
    So if in other device user details is fetched then both device will have same settings.

  8. Sboonny commented on Feb 12, 2023

    @Sboonny
    Member

    Yeab, 👍

  9. Sembauke commented on Feb 15, 2023

    @Sembauke
    Member

    We want the user still be able to change this setting from the settings page, but it should no longer be on the user schema. Just in the local storage.

  10. nayabatir1 commented on Feb 20, 2023

    @nayabatir1
    Contributor
    • Shift from local storage to redux to store sound value
    • sound value shouldn't be stored in user schema. Remove sound property in user schema.
    • https://api.freecodecamp.org/update-my-sound disable network call. Also remove it as it would no longer be needed.

    Did I get it right?

  11. Sboonny commented on Feb 20, 2023

    @Sboonny
    Member

    Yeab, I am not sure about the first one 🤔, but yes the other two are the way to go.

    I am not sure about the first one because of lack of experience, I have no specifics. 👍

  12. Riya267 commented on Aug 22, 2023

    @Riya267
    Contributor

    Hi just letting team know that I have started working on this issue

  13. Riya267 commented on Aug 24, 2023

    @Riya267
    Contributor

    Hey @Sboonny I have one Question do you want to move soundVolume from localstorage as well?

  14. Sboonny commented on Aug 24, 2023

    @Sboonny
    Member

    Hey @Riya267, I want the sound system to not rely on db value, and it shouldn't be stored in user schema.

    I think🤔, the best experience will be provided, if it's stored in local storage, because redux value will be refreshed which will annoy the user, and user schema value will be consistent between devices, which will lead to annoyance too, because of difference sound system in different devices.

    So the requirement is similar to what @nayabatir1 said here #48931 (comment), but not the shift from local storage to redux store, and his code should stay the same.

  15. Riya267 commented on Aug 24, 2023

    @Riya267
    Contributor

    Got it @Sboonny .

  16. ShaunSHamilton commented on Aug 24, 2023

    @ShaunSHamilton
    Member

    @Sboonny Can we get the issue description updated to what we want?

    What you said is the opposite of the current issue description.

  17. changed the title [-]Use the user session instead of Local storage for Sound[/-] [+]rely on local storage to store the sound settings[/+] on Aug 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedplatform: learn

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions