- Issue created by @dieterholvoet
- πΊπΈUnited States cosmicdreams Minneapolis/St. Paul
I think I understand what you're asking for. You want the administrator to be able to modify the default values for each of these settings. Is tha right?
In that context, I imagine this scenario:
- A content administrator logs into the site and uses same page preview. At this point localSettings stores a value for each setting (whether it is activated)
- A site administrator modifies what the default values for these settings
- The content administrator doesn't receive this change because the local values will override the default value.
Or rather, the default values only impact users that have never used+devices same Page Preview or have flushed out the localSettings.
- π§πͺBelgium dieterholvoet Brussels
A content administrator logs into the site and uses same page preview. At this point localSettings stores a value for each setting (whether it is activated)
I would only store settings in local storage if the user actually changed them manually. No need to store defaults in two places, right?
- πΊπΈUnited States cosmicdreams Minneapolis/St. Paul
The way localSettings work is to provide settings locally to the device. A natural consequence to having localSettings is that the device will use the localSettings before the remote settings (in this case the server provided defaults).
If we can accept this architectural limitation then we can continue to have per-device settings. If this is a deal breaker then I'll have to make this consequence clear in the documentation.
- π§πͺBelgium dieterholvoet Brussels
I think the per-device settings can still be useful, but I also think that we should only store settings on the device if the user actually changes them manually, which probably isn't going to happen that often if you're dealing with editors that aren't very tech savvy. In that case, it would be useful to be able to set good site-wide defaults.
- πΊπΈUnited States cosmicdreams Minneapolis/St. Paul
It makes sense to provide the ability to control these settings from an administrative perspective. I think what will need to be proved in user testing is where users expect to find these settings and how the interact with the controls.
I think having a settings button in the preview pane is a good place to discover these settings.
- π§πͺBelgium dieterholvoet Brussels
I'm not saying these settings shouldn't live in the preview pane. To clarify my proposition:
- We add a section to the settings form where the site administrator can set site-wide defaults for these settings. These are stored in config.
- We keep the settings in the preview pane, but we only store them in local settings when the editor actually changes one of these values in the preview pane. If not, we use the site-wide settings stored in config.
Another option would be to stop storing settings in local storage and to store them in the database, for all devices of the user. The fact that user-defined settings reset when switching devices could be considered unexpected. But that should probably be a separate discussion.
- πΊπΈUnited States cosmicdreams Minneapolis/St. Paul
For better or worse, at least for version 2.x, we've made the architectural decision to store the settings in localStorage.
We can revisit that decision later.
For the rest of your points, we can see what refinements we can make.
Please update the description on what you think the next steps are.
- π§πͺBelgium dieterholvoet Brussels
Okay, I created a separate issue for the local storage discussion ( π Stop storing default settings in local storage Active ) and I reworded the issue description.