DRAFT: Settings sync implementation plan
- Prerequisites
Add highlighting settings that are different from default- Add versioning and migrations of settings - lock down current version as v0, v1 should just add version number, v2 will add profiles with simple migration turning current settings into a "default profile". All settings must be turned into a snapshot so that logged in users won't get unexpected behavior due to changed behavior.
Add save timestamp to settings (see above)- Reset to default button to the top.
- Change the way anon settings work - don't save settings for anon users (i.e. not logged in), show dialog box if user change something in settings, something like "You changed some settings, do you want to save them?". Shouldn't affect logged in users.
- Multiple profiles support - just complete separate profiles, no connection between them. Each session keeps track of which profile it uses.
- Save/load to file
- Settings sync basic
- Notification on top about settings sync landing
- Should try to fetch data from server, compare it to what's stored and if it's different - suggest making a new profile, overwriting existing one, using remote one or disabling the sync entirely. Nothing should be stored until user takes action, notification should reflect that there is a conflict to be resolved.
- Some barebones "show difference" UI should be implemented.
Sync could be disabled or enabled at any point, process should go as above
This should be sufficient for most basic usage, further improvements for advanced use could be done afterwards:
subprofiles that are partial profiles - override specific settings only, i.e. different themes on different machines or hiding attachments on some machines but not others.
Update 17/10/2022
Currently we implemented sever-side settings that are automatically kept in sync and are using some sorts of Conflict-free replicated data types, those are completely separate from normal settings, and already used for stuff like pinned navigation items.
The idea would be to migrate most settings there, either completely (i.e. wordfilter) or hybrid-like (probably most other settings). Hybrid-like means that FE can still store its own local settings... locally, so that you could override your "common" settings on specific device/session.