-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compose material 3 bindings #197
Conversation
|
||
@Preview | ||
@Composable | ||
fun EnabledToggleCheckboxPreview() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all Previews should be private, we don't want to expose that in the public API
import com.mirego.trikot.viewmodels.declarative.compose.extensions.vmdModifier | ||
import com.mirego.trikot.viewmodels.declarative.compose.viewmodel.internal.FormattedVisualTransformation | ||
|
||
@OptIn(ExperimentalMaterial3Api::class) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of Opt-in, we should propagate ExperimentalMaterial3Api annotation
i.e.
@ExperimentalMaterial3Api
same for the others
after that, the sample can opt-in at the gradle level.
@@ -9,4 +9,6 @@ import com.mirego.trikot.viewmodels.declarative.content.VMDTextContent | |||
interface PickerShowcaseViewModel : ShowcaseViewModel { | |||
val textPickerTitle: VMDTextViewModel | |||
val textPicker: VMDPickerViewModel<VMDContentPickerItemViewModelImpl<VMDTextContent>> | |||
val textPickerTitle2: VMDTextViewModel |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We cannot re-use the same viewmodel here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's just weird in the sample otherwise since both picker changes each-other's value, but we could.
|
||
com.mirego.trikot.viewmodels.declarative.compose.viewmodel.material3.VMDCheckbox( | ||
modifier = Modifier | ||
.padding(start = 16.dp, top = 16.dp, end = 16.dp) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
padding(16.dp) same for the others
@@ -35,6 +35,7 @@ dependencies { | |||
|
|||
api("androidx.compose.foundation:foundation:${Versions.JETPACK_COMPOSE_RUNTIME}") | |||
api("androidx.compose.material:material:${Versions.JETPACK_COMPOSE_RUNTIME}") | |||
api("androidx.compose.material3:material3:${Versions.JETPACK_COMPOSE_MATERIAL_3}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we not use implementation here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was already added in compose-flow as api so I added it in the same way in compose-publisher but it could probably be changed in both yeah
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ouin non je confirme que ca prend bien api
Description
On ajoute une version des bindings compose qui utilise material 3.
Motivation and Context
Les bindings compose actuel utilisent tous material 1, on garde ces bindings pour ne pas causer de breaking changes ni de changement UI mais on ajoute un package material3 pour avoir le choix d'utiliser la version material3 des composants qui apporte certaines features (dynamic colors) et modifications au niveau de la gestion du thème de couleurs ainsi qu'un update visuel pour certain composants (switch/checkbox, textfield, progress).
How Has This Been Tested?
Les bindings ajoutés ont tous été ajouté dans les samples.
Types of changes