Repository navigation
Server based theming capabilities #54
Description
Activity
It will imho always have the same design and look which aligns with the Nextcloud theme in general but might differ here and there due to platform specific guidelines. Any theme changes on the server won't be reflected in the client as in the Android app, or a desktop client since it is a complete independent implementation and it is also a native one so no mobile web views.
Sorry for not having any better news here, cc @jancborchardt just in case.
Would be a nice idea taking colors etc. from the new theming app from the instance which is currently active in the app 🎨 nextcloud/server#59 😉
cc @nextcloud/designers
Reacted by William Bargent-Ball@Mar1u5 you rather need to include @nextcloud/android since this needs some research if and how to do this besides the fact that is is way harder in the client - think multi user / server account switching scenarios...
I am sure it is possible I am just not sure it is worth the effort right now since you need to implement the theming, you need an API to retrieve theming information, need to store and cache and need to think of a balanced way to refresh your caches, and you will have to recalculate colors since the server theme won't know anything about them, e.g. 700-shaded variation of the primary color is used for the systembar... You will even have to implement runtime icon tinting (tricky) so your checkboxes fit the theme all the time...
- changed the title
[-]Feature Request UI[/-][+]Server based theming capabilities[/+]on Jun 22, 2016 I honestly would like to see this implemented, at least on the web based portion where if you are sharing public documents/files you can just have your own theme installed whichever you prefer. This would be fairly unique.
@c0fe I think the web based part is already working on this, right @jancborchardt ?
@LukasReschke @schiessle @karlitschek how about an API for logo, color, name, slogan etc so we can push that out to the clients? That would be pretty cool if the app automatically changes to the values provided by the server.
(Would also be a lot of work for the case where the web interface is themed though. And might result in problems cause we need specific images at specific sizes etc. ;)
@jancborchardt or we rewrite the ownBrander (which will be done in parts with the theming app) from the EE to theme the clients 😉
@jancborchardt or we rewrite the ownBrander (which will be done in parts with the theming app) from the EE to theme the clients 😉
Oh god. You don't want to write THAT. The theming API stuff seems way more easy and reasonable 🙈
@jancborchardt we can only do this to some extend on the client side since:
- You can't change the launcher icon
- Showing the login form you are lacking the info which server the user might type in so at that time you will have to show the Nextcloud logo (and the "New to Nextcloud?" text)
- You can't change the app's name
So other than that you can probably only change colors and you will have to do this dynamically all the time which is ugly (from a technical point of view). Also please be aware that right now we cannot utilize vector graphics so the checkboxes will always be blue fur the selection screens but the color would change for the checkboxes on the settings screen... Plus with all the white colored icons this will be funny as soon as someone chooses white as the primary color 😝
On the other hand like with oC you can ignore that since the branded client (green) also shipped with oC blue UI elements...@AndyScherzinger ok, good points. Then it does actually not make a lot of sense to put work in a theming API. Because if the core things like name and logo can’t be changed (which makes total sense :D) then it’s not really worth it. I guess branding could be offered as a service.
Closing hence.
As a service makes total sense and as soon as we are done with consolidating and merging all the feature branches I have "refactoring the theme definition" on my agenda, which should make branding via some kind of branding generator a lot easier 👍
Reacted by Morris JobkeThen we can close this. Thanks a lot for this nice discussion :)
put work in a theming API
Does this API already exist? I would like to adjust the Notes Android App to use the user-defined theme color.
If there is already an API: Where can i find it? I googled, but couldn't find a documentation.
If this API does not exist yet: May i propose a theme.php that similar to the status.php that returns a json object that describes all theming-aspectsIt can be found at following URL starting with Nextcloud 11:
curl https://cloud.example.com/ocs/v2.php/cloud/capabilities -u USERNAMEThen you get something like this:
<?xml version="1.0"?> <ocs> <meta> <status>ok</status> <statuscode>200</statuscode> <message/> </meta> <data> <version> <major>9</major> <minor>1</minor> <micro>0</micro> <string>10.0</string> <edition></edition> </version> <capabilities> <core> <pollinterval>60</pollinterval> <webdav-root>remote.php/webdav</webdav-root> </core> <files_sharing> <api_enabled>1</api_enabled> <public> <enabled>1</enabled> <password> <enforced></enforced> </password> <expire_date> <enabled></enabled> </expire_date> <send_mail></send_mail> <upload>1</upload> <upload_files_drop>1</upload_files_drop> </public> <user> <send_mail></send_mail> </user> <resharing>1</resharing> <group_sharing>1</group_sharing> <federation> <outgoing>1</outgoing> <incoming>1</incoming> </federation> </files_sharing> <files> <bigfilechunking>1</bigfilechunking> <blacklisted_files> <element>.htaccess</element> </blacklisted_files> <undelete>1</undelete> <versioning>1</versioning> </files> <notifications> <ocs-endpoints> <element>list</element> <element>get</element> <element>delete</element> </ocs-endpoints> </notifications> <theming> <name>Nextcloud</name> <url>https://nextcloud.com</url> <slogan>a safe home for all your data</slogan> <color>#0082c9</color> </theming> </capabilities> </data> </ocs
@nickvergessen Mind to write documentation for this?
Well, any suggestion where to put docs for this?
Well, any suggestion where to put docs for this?
Somewhere in the developers doc? Maybe add a new category to the OCS API documentation (currently there is only sharing OCS API afaik)
@AndyScherzinger do we have a theming issue? If not, we should reopen it.
@tobiasKaminsky at the moment we do not but at the moment I also don't see theming happening in the Android client since it is rather hacky, has to be done at runetime and at the moment we would probably also have to do image processing since the background image, which would have to be out into the drawer needs to be resized to the right dimens and caches, because loading a "too large" image into the drawer will kill the performance (sliding animation going down the drain, tested on a Nexus5X!) and also the vector issue (can't really/savely be used before Android 4.1).
Anyways, sure we can open an issue to keep it in mind, but as discussed earlier, before this issue it seems to not make sense at the moment.
Will the nextcloud app eventually be able to visually look like the mobile web browser version? This way it can be themed just like our own installs are. Or Will its always have it's own design and look?