android icon indicating copy to clipboard operation
android copied to clipboard

Brander: white primary color

Open tobiasKaminsky opened this issue 3 years ago • 8 comments

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

tobiasKaminsky avatar Sep 08 '22 07:09 tobiasKaminsky

Codacy

Lint

TypemasterPR
Warnings8585
Errors00

SpotBugs

CategoryBaseNew
Bad practice2929
Correctness4646
Dodgy code354354
Experimental11
Internationalization99
Multithreaded correctness99
Performance5858
Security2828
Total534534

github-actions[bot] avatar Sep 08 '22 07:09 github-actions[bot]

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.

AlvaroBrey avatar Sep 08 '22 07:09 AlvaroBrey

APK file: https://www.kaminsky.me/nc-dev/android-artifacts/10723.apk

qrcode

To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app.

github-actions[bot] avatar Sep 08 '22 07:09 github-actions[bot]

master-IT test failed: https://www.kaminsky.me/nc-dev/android-integrationTests/5932-IT-master-07-50

nextcloud-android-bot avatar Sep 08 '22 07:09 nextcloud-android-bot

stable-IT test failed: https://www.kaminsky.me/nc-dev/android-integrationTests/5932-IT-stable-07-50

nextcloud-android-bot avatar Sep 08 '22 07:09 nextcloud-android-bot

blue-Light-Screenshot test failed: https://www.kaminsky.me/nc-dev/android-integrationTests/10723-Screenshot-blue-Light-08-03

github-actions[bot] avatar Sep 08 '22 08:09 github-actions[bot]

What Álvaro said, I also expect this to be solved with m3 in place 👍

AndyScherzinger avatar Sep 08 '22 19:09 AndyScherzinger

Awesome news! Then let us keep this open as a reminder.

tobiasKaminsky avatar Sep 09 '22 05:09 tobiasKaminsky

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.

AlvaroBrey avatar Feb 07 '23 17:02 AlvaroBrey

Does maybe this already fix the problem? https://github.com/nextcloud/server/pull/38159/files

szaimen avatar May 11 '23 13:05 szaimen