I noticed there are quite a few different approaches to styling across apps. There's the "legacy" port of "Departures" which clearly comes from the T-Skylt era with a lot of app-unrelated settings. Then there's the sub-settings for screensaver that I addressed in #12. Finally, in the latest release of clock, I noticed there's a completely different style again (see below).
I think there's a lot to improve here that I would like to discuss and fix.
- Every app should have the same styling
- Every app should share the same header, footer, way to exit the app, etc
- An app should only require HTML for its settings and use util methods to pull in styles, headers, footers
- Style base elements that we know will look the same
Every input should always look the same in this app, no need for a class. This means that every app can simply use <input type="text" /> to get a nice looking input without having to set a specific class.
- The app does not need to support both dark and light theme, it's wast of resources
- Each app should be able to rely on shared existing styling
- Removes code duplication
- Bug fixes and changes affect all apps
- No need to update existing app to update styling
- Saves space by using less code on disk
To make things a bit more complex, I introduced a concept of "building" apps in #10. This doesn't currently involve anything related to styling, but if we do have a build pipeline, we could easily make use of templates and build each app settings page. However I don't think this should be done at this point in time.
I want to start working on this to ensure all apps look the same, keep code duplication to a minimum, make it hard to do wrong when building apps, making a global shared styling. A few things to iron out before starting:
{
"name": "Last.fm",
"config": {
"Settings": {
"Username": "input",
"API key": "password"
},
"Colors": {
"Artist Color": "color",
"Title Color": "color",
"Show title": "toggle"
}
}
}
| Current style |
New style on `clock` app |
|
|
I noticed there are quite a few different approaches to styling across apps. There's the "legacy" port of "Departures" which clearly comes from the T-Skylt era with a lot of app-unrelated settings. Then there's the sub-settings for screensaver that I addressed in #12. Finally, in the latest release of
clock, I noticed there's a completely different style again (see below).I think there's a lot to improve here that I would like to discuss and fix.
Every input should always look the same in this app, no need for a class. This means that every app can simply use
<input type="text" />to get a nice looking input without having to set a specific class.To make things a bit more complex, I introduced a concept of "building" apps in #10. This doesn't currently involve anything related to styling, but if we do have a build pipeline, we could easily make use of templates and build each app settings page. However I don't think this should be done at this point in time.
I want to start working on this to ensure all apps look the same, keep code duplication to a minimum, make it hard to do wrong when building apps, making a global shared styling. A few things to iron out before starting:
settings.jsonand:{ "name": "Last.fm", "config": { "Settings": { "Username": "input", "API key": "password" }, "Colors": { "Artist Color": "color", "Title Color": "color", "Show title": "toggle" } } }clockstyle shown above is the most recent one. Posting the main screen for reference.