davx5-ose icon indicating copy to clipboard operation
davx5-ose copied to clipboard

Migrate to Material 3 (M3)

Open rfc2822 opened this issue 10 months ago • 6 comments

Time to have fun

https://developer.android.com/develop/ui/compose/designsystems/material2-material3#phased-approach

This is a meta-issue and can be closed when everything is M3. Please don't add things here yourself.

When rewriting things to M3, please apply the new App Architecture as discussed as well as it's possible without rewriting core features (for instance, I wouldn't touch data layer things too much during the rewrite):

  • In general, one screen has three files:
    1. SomeScreen.kt with the @Composable SomeScreen() (only UI, no or little UI logic)
    2. SomeScreenModel.kt with the ViewModel for SomeScreen (UI logic and interface to data layers, if required); usually contains a UI state data class + methods to calculate state for the UI + methods for events that come from the UI
    3. SomeActivity.kt with the Activity (if the screen is an Activity) – should only contain the contract
  • Use UiState classes as described in App Architecture. One explicit UI state data class + mutableStateOf(UiState()) private set in the model is preferred, but you may have to use Flows or other methods like multiple states if it fits better.

Tasks:

  • [ ] #731
  • [ ] Rewrite ui.intro to M3
    • [ ] #741
    • [x] #740
    • [x] #757
    • [ ] #759
    • [x] #739
    • [ ] Rewrite IntroActivity to M3
  • [ ] Rewrite TasksActivity to M3
  • [ ] Rewrite PermissionsActivity to M3
  • [ ] #742
  • [x] Rewrite AccountsActivity to M3

rfc2822 avatar Apr 01 '24 09:04 rfc2822

These themes reflect our current color scheme in M3:

material-theme-classic.zip material-theme-classic-reversed.zip

devvv4ever avatar Apr 01 '24 11:04 devvv4ever

We should also follow the recommended App Architecture more when refactoring. Like having more clear and separated UI state holders, using Compose state in ViewModels etc.

rfc2822 avatar Apr 06 '24 18:04 rfc2822

Now we don't have FABs or other accent elements yet but I also like the "reversed" theme more:

grafik

rfc2822 avatar Apr 19 '24 07:04 rfc2822

I've read a bit more into the color scheming of M3 and it seems unless we want to define everything (!) on our own we can't use our brand color green (with orange in addition) anymore.

I've adapted our colors a bit and here is an updated version for now that looks more appealing:

material-theme-moreappealing.zip

It now looks like this:

Bildschirmfoto vom 2024-04-21 13-04-22

Bildschirmfoto vom 2024-04-21 13-04-26

devvv4ever avatar Apr 21 '24 11:04 devvv4ever

I've read a bit more into the color scheming of M3 and it seems unless we want to define everything (!) on our own we can't use our brand color green (with orange in addition) anymore. [...] It now looks like this:

Well, this definetly makes for a better integration with jtxBoard. They look the same now :clinking_glasses:

sunkup avatar Apr 23 '24 09:04 sunkup

I've read a bit more into the color scheming of M3 and it seems unless we want to define everything (!) on our own we can't use our brand color green (with orange in addition) anymore. [...] It now looks like this:

Well, this definetly makes for a better integration with jtxBoard. They look the same now 🥂

but we're still green, while jtx is yellow :P wooow

devvv4ever avatar Apr 24 '24 13:04 devvv4ever

https://github.com/bitfireAT/davx5-ose/issues/691#event-12836316448

@rfc2822, when shall the next https://github.com/bitfireAT/davx5-ose/releases be, with this included? I'd like to know when to expect it on F-Droid.

RokeJulianLockhart avatar May 16 '24 16:05 RokeJulianLockhart

#691 (comment)

@rfc2822, when shall the next https://github.com/bitfireAT/davx5-ose/releases be, with this included? I'd like to know when to expect it on F-Droid.

We plan to make a public beta soon, and then release maybe in 1 week or so – if everything goes well

rfc2822 avatar May 17 '24 09:05 rfc2822