Research how settings for users can be saved #173
Labels
No labels
_CRITICAL_
API
app
backEnd
Blocked, waiting for further changes
bug
cleanup
close
design
duplicate
enhancement
feature request
frontEnd
help wanted
invalid
low priority
needs input
needs review
project documentation
question
research
reviewed
script
security
SQL
style
testing
topLevel
wontfix
No milestone
No project
No assignees
5 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Andras/BoundlessFlowCampus2K#173
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The user should be able to save, load and edit its dashboard, as mentioned in #87. In order for this to work something needs to be saved as a settings or config file (or something else).
Parent issue: #65
This has been assigned to Alexander L, but he hasnt got permissions yet.
idea of possible solution
Directory "config":
Collection of all possible settings the user can enable.
Settings (User conf obj.)
When the user changes the settings a "master" settings file should be generated (gets overwritten once created). This file should hold ONLY current settings to ensure the code knows that settings is in use.
ex:
rough sketch:
I'm guessing then that the config file would be saved on a server (our server) so that the settings are saved regardless of device?
Yes, perhaps it could be saved on our server in a file like "user_123.json" and on login it fetches that specific users settings file..
The model is quite hard to interpret, could we perhaps make it a little less rough?
Visualization of my thought process how user settings can be saved with postgresql to ensure that the settings persists regardless of device.
When the user changes the appearance they have to name their custom layout preset which gets saved in the database. There should always be a default layout incase the user is new or they dont want to change anything. When fetching the layout the program should look for "preset" that the user has selected in their settings. The config directory should contain every option and also store the UUID to make it possible to fetch that users specific preset. The JSON or the "master config" should only contain the selected options. This file is the preset that gets applied to the interface.
This is how i believe the user settings can be saved.
Furthermore, to make the settings apply on startup perhaps we can implement some cache that stores what preset a user last had enabled.
Draw.io link:
https://drive.google.com/file/d/1xln_3-kEF8bilJRZD2FJS6nRwMfbmPyT/view?usp=sharing
Another way of showing the flow is my quickshell i worked on a while ago which has an identical structure (except that its locally saved)
https://github.com/Liligirthlord/numbshell/tree/main/quickshell/Config
a24vinla has been assigned as reviewer.
Model looks really good!
I have some questions regarding the config directory. Is it a separate database or a directory on a local server? Since the saved data will be minimal, is there a major upside to storing the actual layout data separately? My idea was to store it all in the same DB, with layouts being their own tables.
Obviously user information would be stored separately, with some type of UID being used to reference users once logged in.
This was the one thing I was unsure about. When I made the model I was thinking of a directory on a local server I just didn't know how to draw it clearly. But I dont know how it work out in practice.
As for the question regarding the layout storing, yes that was my idea too to store the config directory with its sub directories on the same db my apologies for confusion in the model.
This issue has been researched. I close this issue.