WIP: user_settings app #34
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "tasiaiso/tildefriends:user_settings"
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?
Closes #10.
Changelog
user_settings
.identity
app.identity
app has been removed./static/tildefriends-v1.css
New RPC methods (to implement on the backend):
getThemes(): string[]
Returns a list of the available themes as an array of strings;
['solarized', 'gruvbox', 'light']
.getTheme(): string
Returns the user's selected theme.
setTheme(theme: string): void
Sets the user's preferred theme.
I just need a column in the database that stores a string. When an account is created, it should be filled with a default value (solarized). That also involves to migrate the old database to the new format.
To do
What do you think of this @cory ?
I'm totally in for gathering managing identities and settings in one place. And making them not look like junk as I have.
I'm very hesitant about the coupling this introduces. I would honestly rather have every app have its own copy of the CSS it needs rather than expecting more static files be provided by Tilde Friends. Ideally the only contract would be that apps can find a theme name in some place in the database. I think that'd be
my_shared_database('preferences')
or similar, should be doable already without any core changes.This isn't just a critique of this change, but it's on my mind to get better at this in general. To many bespoke functions are exposed to apps already. Need to strive to be more like an operating system where rather than
get_theme_name()
, you getopen()/read()/close()
and can build settings files yourself. That's a fundamental part of how I ever see building an app today that still works a few years down the road.I'm also seriously considering advocating we stick with w3.css themes (https://www.w3schools.com/w3css/w3css_color_themes.asp). I don't have any particular affinity with w3schools, but I didn't have a terrible experience integrating it, it seems good enough, and it feels the right level of opinionated for me for now. I think it offers simplicity over growing our own.
That's not a complete picture of anything, but that's where my head is. I'm definitely willing to do some legwork once we're aligned.
Is there a way to have shared or per-app databases already ? Is this a thing we'd want to look at implementing ?
@tasiaiso See shared_database() and my_shared_database(). They give you somewhat namespaced key/value storage in the properties table.
I kicked around the idea of giving SQLite databases or something like a private filesystem, but everything I've wanted in practice so far has leaned toward using SSB for actual storage and key/value as a cache.
I'm going to close this. I want to figure out a way to integrate this well into Tilde Friends. I'll make a new issue/PR later.
Pull request closed