You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
rely on local storage to store the sound settings #48931
help wantedOpen for all. You do not need permission to work on these.platform: learnUI side of the client application that needs familiarity with React, Gatsby etc.
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.
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.
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.
@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.
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.
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.
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.
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
help wantedOpen for all. You do not need permission to work on these.platform: learnUI side of the client application that needs familiarity with React, Gatsby etc.
Activity
nayabatir1 commentedon Jan 5, 2023
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.spiritanand commentedon Jan 31, 2023
@nayabatir1 any progress on this? I would like to help you out.
nayabatir1 commentedon Jan 31, 2023
@spiritanand You can start too. I haven't made any significant progress, due to some other high priority tasks.
nayabatir1 commentedon Feb 7, 2023
Help me understand difference between
fcc-soundin store andsound in user
If I change Campfire Mode is settings then only
fcc-soundvalue is changed. When doessoundinuserchange ?Sboonny commentedon Feb 12, 2023
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.
nayabatir1 commentedon Feb 12, 2023
@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.
Sboonny commentedon Feb 12, 2023
Yeab, 👍
Sembauke commentedon Feb 15, 2023
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.
nayabatir1 commentedon Feb 20, 2023
https://api.freecodecamp.org/update-my-sounddisable network call. Also remove it as it would no longer be needed.Did I get it right?
Sboonny commentedon Feb 20, 2023
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. 👍
Riya267 commentedon Aug 22, 2023
Hi just letting team know that I have started working on this issue
Riya267 commentedon Aug 24, 2023
Hey @Sboonny I have one Question do you want to move soundVolume from localstorage as well?
Sboonny commentedon Aug 24, 2023
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.
Riya267 commentedon Aug 24, 2023
Got it @Sboonny .
ShaunSHamilton commentedon Aug 24, 2023
@Sboonny Can we get the issue description updated to what we want?
What you said is the opposite of the current issue description.
[-]Use the user session instead of Local storage for Sound[/-][+]rely on local storage to store the sound settings[/+]