android
android copied to clipboard
Brander: white primary color
TODO
- [ ] wait for M3 finished
- [ ] rebase on it
- [ ] test it again
As you know we allow any color during branding. I now tested white without enforced domain and to make server-url input screen reasonable nice, I had to change it like this.
My "problem" is now, that I had to change two other files, instead of simply relying on setup.xml. Do you have any idea how to do this better?
We might need to have a better differentiation between
- primary color as background, can be any color
- primary color used as background, but text is written onto it (e.g. primary button, login screen)
In later case white can still be primary color, but then the text color must be based on primary color.
Whatever we come up with, we then shall test it with
- NC blue
- white
- black
- random color (logic how current colors are computed are on brander: https://github.com/nextcloud-gmbh/brander/blob/19824f733dc6d1534d521ae228ae12650eba21f9/src/Brander/Worker/AndroidJobHandler.php#L445)
🤷 @AlvaroBrey @AndyScherzinger
Signed-off-by: tobiasKaminsky [email protected]
- [ ] Tests written, or not not needed
Codacy
Lint
| Type | master | PR |
| Warnings | 85 | 85 |
| Errors | 0 | 0 |
SpotBugs
| Category | Base | New |
|---|---|---|
| Bad practice | 29 | 29 |
| Correctness | 46 | 46 |
| Dodgy code | 354 | 354 |
| Experimental | 1 | 1 |
| Internationalization | 9 | 9 |
| Multithreaded correctness | 9 | 9 |
| Performance | 58 | 58 |
| Security | 28 | 28 |
| Total | 534 | 534 |
We might need to have a better differentiation between
* primary color as background, can be any color * primary color used as background, but text is written onto it (e.g. primary button, login screen)
This can be solved by material 3 on runtime (Scheme already calculates primaryContainer, onPrimary and other color variations for this kind of stuff).
We already calculate a Scheme from server color, but we can also just calculate a "default" scheme from colorPrimary and use that for the pre-login screens. I'll take a look at doing this once I get the existing theming ported to material3. If all goes right, you will again only have to change colorPrimary on brander.
APK file: https://www.kaminsky.me/nc-dev/android-artifacts/10723.apk
To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app.
master-IT test failed: https://www.kaminsky.me/nc-dev/android-integrationTests/5932-IT-master-07-50
stable-IT test failed: https://www.kaminsky.me/nc-dev/android-integrationTests/5932-IT-stable-07-50
blue-Light-Screenshot test failed: https://www.kaminsky.me/nc-dev/android-integrationTests/10723-Screenshot-blue-Light-08-03
What Álvaro said, I also expect this to be solved with m3 in place 👍
Awesome news! Then let us keep this open as a reminder.
The last time we discussed this via material color utils, we decided not to do it because the color scheme generation would alter the primary color and thus the login background color would not be the same as the normal primary color.
Since then, MCU has published a dynamic color scheme that claims to allow the primary color to remain relatively unchanged in primaryContainer, but it doesn't seem to be compatible with the normal Scheme yet.
Does maybe this already fix the problem? https://github.com/nextcloud/server/pull/38159/files