Is it correct that most settings are only stored in Local Storage ?
It should be possible to store this per-account. Some settings affected:
game settings
chat preferences
This is quite annoying as a lot of these settings should be set and forget type. For example to keep a good habit at reading you might want to turn off analysis permanently etc. and not have to do that every single time you reinstall your browser or switch to mobile.
How costly is it to store these settings on the server ? I have about 200KB on librewolf/firefox.
It is possible (and simple from a development perspective) to store settings per-account. There are some settings I prefer to keep device specific - the big one is my preferences around board size, since 9x9 is easier than larger boards on mobile. More minor one is, my audio settings are different for personal computer than work computer.
But I think it is worth an audit, and OGS could use per-account paradigm for a lot more settings.
Yes - we specifically implemented the ability for developers to set whether it’s stored locally or on the server, and I know that the data for one little-known feature is in fact stored on the server already
Appended is a list to get started on deciding what should be device-specific and what should be account specific. This list is not “everything” you can imagine you might want stored on the server, but it’d be a good start: I think it’s “every preference you have”.
We also need to be ready for the question “which of these should the user be able decide where are they stored for themselves, and if any: how do they control that?”
An idea, which maybe would be “good enough” for most people, would be a coarse-grained “global vs. local” setting for each page of settings, along with a “save-as-default” button when a browser is set as local.
For example, the first setting in “Game Preferences” could be something like:
“Customize Game Preferences for this device/browser (TOGGLE) [save-as-default]”
With these interactions:
TOGGLE’s value is determined by the local presence of any of this page’s settings in browser cookies
Defaults to off/global for new users/browsers
If the TOGGLE is off/global, this page’s settings consult/modify settings on the server.
If TOGGLE is flipped to on/local, settings are copied from server to browser cookies.
If the TOGGLE is on/local, this page’s settings consult/modify settings in the browser cookies, and the save-as-default button is available.
If “save-as-default” is clicked, then this page’s settings are saved to the server.
If this browser cookies don’t know about the setting in question (new setting, or new browser), the user’s last-saved setting on the server (if any) is used and saved in the cookies
If TOGGLE is flipped to off/global, settings stored in browser cookies are deleted.
Benefits:
Only one new setting per page
IMO, behaviour is predictable
It’s clear which settings the setting applies to (the ones on the same page)
Pages like “Email Preferences” and “Vacation” (which are inherently server-side) would not have this setting.
It’s intuitive what interacting with TOGGLE and save-as-default will do
Has enough flexibility that it probably caters to most use cases
Players that want everything to match across browsers can do so
Players that want to customize locally can do so
They also have the ability to save defaults (and to restore defaults, via TOGGLE off+on)
Players that mostly want to match across browsers, except in one browser (say, on mobile) can do so